Nebula
Loading...
Searching...
No Matches
animsamplebuffer.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
15#include "core/refcounted.h"
16#include "animation.h"
17
18//------------------------------------------------------------------------------
19namespace CoreAnimation
20{
22{
23public:
27 virtual ~AnimSampleBuffer();
28
34 void operator=(AnimSampleBuffer&& rhs);
36 void operator=(const AnimSampleBuffer& rhs);
37
39 void Setup(const AnimationId& animResource);
41 void Discard();
43 bool IsValid() const;
44
46 void Reset();
47
49 SizeT GetNumSamples() const;
50
52 float* GetSamplesPointer() const;
55
56private:
59 float* samples;
61};
62
63//------------------------------------------------------------------------------
66inline bool
68{
69 return this->animResource != InvalidAnimationId;
70}
71
72//------------------------------------------------------------------------------
75inline SizeT
77{
78 return this->numSamples;
79}
80
81//------------------------------------------------------------------------------
84inline float*
86{
87 return this->samples;
88}
89
90//------------------------------------------------------------------------------
93inline uchar*
98
99} // namespace CoreAnimation
100//------------------------------------------------------------------------------
Stores the result of an animation sampling operation, stores samples key values and sample-counts whi...
Definition animsamplebuffer.h:22
float * GetSamplesPointer() const
get direct pointer to samples
Definition animsamplebuffer.h:85
void Setup(const AnimationId &animResource)
setup the object from an animation resource
Definition animsamplebuffer.cc:129
void Reset()
Reset the sample buffer.
uchar * GetSampleCountsPointer() const
get direct pointer to sample counts
Definition animsamplebuffer.h:94
SizeT GetNumSamples() const
get the number of samples in the buffer
Definition animsamplebuffer.h:76
void operator=(AnimSampleBuffer &&rhs)
assign move operator
Definition animsamplebuffer.cc:82
float * samples
Definition animsamplebuffer.h:59
void Discard()
discard the object
Definition animsamplebuffer.cc:153
uchar * sampleCounts
Definition animsamplebuffer.h:60
SizeT numSamples
Definition animsamplebuffer.h:58
bool IsValid() const
return true if the object has been setup
Definition animsamplebuffer.h:67
AnimSampleBuffer()
constructor
Definition animsamplebuffer.cc:15
AnimationId animResource
Definition animsamplebuffer.h:57
virtual ~AnimSampleBuffer()
destructor
Definition animsamplebuffer.cc:26
An animation resource holds a set of animations from a loaded NAX file.
Definition charactercontext.h:40
Definition animation.h:25
unsigned char uchar
Definition types.h:33
int SizeT
Definition types.h:49