72 aiVectorKey(
double time,
const aiVector3D& value)
81 bool operator == (
const aiVectorKey& o)
const {
82 return o.mValue == this->mValue;
84 bool operator != (
const aiVectorKey& o)
const {
85 return o.mValue != this->mValue;
89 bool operator < (
const aiVectorKey& o)
const {
90 return mTime < o.mTime;
92 bool operator > (
const aiVectorKey& o)
const {
93 return mTime > o.mTime;
122 bool operator == (
const aiQuatKey& o)
const {
123 return o.mValue == this->mValue;
125 bool operator != (
const aiQuatKey& o)
const {
126 return o.mValue != this->mValue;
130 bool operator < (
const aiQuatKey& o)
const {
131 return mTime < o.mTime;
133 bool operator > (
const aiQuatKey& o)
const {
134 return mTime > o.mTime;
158 aiMeshKey(
double time,
const unsigned int value)
163 typedef unsigned int elem_type;
166 bool operator == (
const aiMeshKey& o)
const {
167 return o.mValue == this->mValue;
169 bool operator != (
const aiMeshKey& o)
const {
170 return o.mValue != this->mValue;
174 bool operator < (
const aiMeshKey& o)
const {
175 return mTime < o.mTime;
177 bool operator > (
const aiMeshKey& o)
const {
178 return mTime > o.mTime;
191 aiAnimBehaviour_DEFAULT = 0x0,
194 aiAnimBehaviour_CONSTANT = 0x1,
198 aiAnimBehaviour_LINEAR = 0x2,
204 aiAnimBehaviour_REPEAT = 0x3,
211 _aiAnimBehaviour_Force32Bit = INT_MAX
237 unsigned int mNumPositionKeys;
244 C_STRUCT aiVectorKey* mPositionKeys;
247 unsigned int mNumRotationKeys;
255 C_STRUCT aiQuatKey* mRotationKeys;
259 unsigned int mNumScalingKeys;
266 C_STRUCT aiVectorKey* mScalingKeys;
274 C_ENUM aiAnimBehaviour mPreState;
281 C_ENUM aiAnimBehaviour mPostState;
286 mNumPositionKeys = 0; mPositionKeys = NULL;
287 mNumRotationKeys = 0; mRotationKeys = NULL;
288 mNumScalingKeys = 0; mScalingKeys = NULL;
290 mPreState = mPostState = aiAnimBehaviour_DEFAULT;
295 delete [] mPositionKeys;
296 delete [] mRotationKeys;
297 delete [] mScalingKeys;
299 #endif // __cplusplus 317 unsigned int mNumKeys;
320 C_STRUCT aiMeshKey* mKeys;
351 double mTicksPerSecond;
355 unsigned int mNumChannels;
359 C_STRUCT aiNodeAnim** mChannels;
364 unsigned int mNumMeshChannels;
368 C_STRUCT aiMeshAnim** mMeshChannels;
384 if (mNumChannels && mChannels) {
385 for(
unsigned int a = 0; a < mNumChannels; a++) {
391 if (mNumMeshChannels && mMeshChannels) {
392 for(
unsigned int a = 0; a < mNumMeshChannels; a++) {
393 delete mMeshChannels[a];
396 delete [] mMeshChannels;
399 #endif // __cplusplus 414 template <
typename T>
423 void operator () (T& out,
const T& a,
const T& b,
float d)
const {
435 aiQuaternion::Interpolate(out,a,b,d);
440 struct Interpolator <unsigned int> {
441 void operator () (
unsigned int& out,
unsigned int a,
442 unsigned int b,
float d)
const 444 out = d>0.5f ? b : a;
449 struct Interpolator <aiVectorKey> {
450 void operator () (
aiVector3D& out,
const aiVectorKey& a,
451 const aiVectorKey& b,
float d)
const 453 Interpolator<aiVector3D> ipl;
454 ipl(out,a.mValue,b.mValue,d);
459 struct Interpolator <aiQuatKey> {
460 void operator () (
aiQuaternion& out,
const aiQuatKey& a,
461 const aiQuatKey& b,
float d)
const 463 Interpolator<aiQuaternion> ipl;
464 ipl(out,a.mValue,b.mValue,d);
469 struct Interpolator <aiMeshKey> {
470 void operator () (
unsigned int& out,
const aiMeshKey& a,
471 const aiMeshKey& b,
float d)
const 473 Interpolator<unsigned int> ipl;
474 ipl(out,a.mValue,b.mValue,d);
483 #endif // __cplusplus 484 #endif // AI_ANIM_H_INC Basic data types and primitives, such as vectors or colors.
Assimp's CPP-API and all internal APIs.
Definition: DefaultLogger.hpp:51
Definition: quaternion.h:119
Represents an UTF-8 string, zero byte terminated.
Definition: types.h:251
Definition: vector3.h:134
Quaternion structure, including operators when compiling in C++.