Nebula
Loading...
Searching...
No Matches
animkeybuffer.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
12#include "core/refcounted.h"
13#include "timing/time.h"
14
15//------------------------------------------------------------------------------
16namespace CoreAnimation
17{
19{
21public:
28
32 virtual ~AnimKeyBuffer();
34 void Setup(SizeT numIntervals, SizeT numKeys, void* intervalPtr, void* keyPtr);
36 void Discard();
38 bool IsValid() const;
40 SizeT GetNumKeys() const;
42 SizeT GetByteSize() const;
44 const float* GetKeyBufferPointer() const;
47
48private:
52 float* keyBuffer;
54};
55
56//------------------------------------------------------------------------------
59inline bool
61{
62 return (0 != this->intervalBuffer);
63}
64
65//------------------------------------------------------------------------------
68inline SizeT
70{
71 return this->numKeys;
72}
73
74//------------------------------------------------------------------------------
77inline SizeT
79{
80 return this->numKeys * sizeof(float);
81}
82
83//------------------------------------------------------------------------------
86inline const float*
88{
89 return this->keyBuffer;
90}
91
92//------------------------------------------------------------------------------
95inline const AnimKeyBuffer::Interval*
100
101} // namespace CoreAnimation
102//------------------------------------------------------------------------------
103
The common base class of Nebula.
Definition refcounted.h:38
A simple buffer of vec4 animation keys.
Definition animkeybuffer.h:19
bool IsValid() const
return true if the object has been setup
Definition animkeybuffer.h:60
SizeT GetNumKeys() const
get number of keys in buffer
Definition animkeybuffer.h:69
void Discard()
discard the buffer
Definition animkeybuffer.cc:59
virtual ~AnimKeyBuffer()
destructor
Definition animkeybuffer.cc:31
const AnimKeyBuffer::Interval * GetIntervalBufferPointer() const
get direct pointer to interval buffer
Definition animkeybuffer.h:96
AnimKeyBuffer()
constructor
Definition animkeybuffer.cc:18
uint mapCount
Definition animkeybuffer.h:51
void Setup(SizeT numIntervals, SizeT numKeys, void *intervalPtr, void *keyPtr)
setup the buffer
Definition animkeybuffer.cc:43
SizeT numKeys
Definition animkeybuffer.h:49
SizeT GetByteSize() const
get buffer size in bytes
Definition animkeybuffer.h:78
AnimKeyBuffer::Interval * intervalBuffer
Definition animkeybuffer.h:53
const float * GetKeyBufferPointer() const
Get direct pointer to keys.
Definition animkeybuffer.h:87
SizeT numIntervals
Definition animkeybuffer.h:50
float * keyBuffer
Definition animkeybuffer.h:52
An animation resource holds a set of animations from a loaded NAX file.
Definition charactercontext.h:40
int Tick
the tick datatype (one tick == 1 millisecond)
Definition time.h:20
Definition animkeybuffer.h:23
uint key0
Definition animkeybuffer.h:25
uint key1
Definition animkeybuffer.h:25
Timing::Tick end
Definition animkeybuffer.h:24
Timing::Tick start
Definition animkeybuffer.h:24
float duration
Definition animkeybuffer.h:26
Typedefs for the Timing subsystem.
int SizeT
Definition types.h:49
unsigned int uint
Definition types.h:31