6#ifndef C3DKEYKEYFRAME_CLASS_H 
    7#define C3DKEYKEYFRAME_CLASS_H 
   19BEGIN_MOOTOOLS_NAMESPACE
 
   34    BOOL IsInInterval(
int time) 
const;
 
   35    unsigned int GetLength() 
const;
 
   36    int AdjustTime(
int time) 
const;
 
 
   58    void KeyFrameChanged(); 
 
   64        KEYFRAME_TYPE_NULLID = 0, 
 
   65        KEYFRAME_TYPE_MATRIX = MAKE_CUSTOM_ID(
'M', 
'A', 
'T', 
'R'), 
 
   66        KEYFRAME_TYPE_TRANS = MAKE_CUSTOM_ID(
'T', 
'R', 
'A', 
'N'), 
 
   67        KEYFRAME_TYPE_SCALE = MAKE_CUSTOM_ID(
'S', 
'C', 
'A', 
'L'), 
 
   68        KEYFRAME_TYPE_ROT = MAKE_CUSTOM_ID(
'R', 
'O', 
'T', 
'A'), 
 
   69        KEYFRAME_TYPE_VECTOR = MAKE_CUSTOM_ID(
'V', 
'E', 
'C', 
'T'), 
 
   70        KEYFRAME_TYPE_FLOAT = MAKE_CUSTOM_ID(
'F', 
'L', 
'O', 
'A'), 
 
   71        KEYFRAME_TYPE_DOUBLE = MAKE_CUSTOM_ID(
'D', 
'O', 
'U', 
'B'), 
 
   72        KEYFRAME_TYPE_INT = MAKE_CUSTOM_ID(
' ', 
'I', 
'N', 
'T'), 
 
   73        KEYFRAME_TYPE_UINT = MAKE_CUSTOM_ID(
'U', 
'I', 
'N', 
'T'), 
 
   74        KEYFRAME_TYPE_COLOR = MAKE_CUSTOM_ID(
'C', 
'O', 
'L', 
'O'), 
 
 
   86    unsigned int GetTypeID() 
const;
 
   87    unsigned int GetContentID() 
const;
 
  100    virtual bool operator==(
const C3DKeyframe& key) 
const;
 
  105    virtual bool Dump(
int time, 
unsigned int flags) 
const;
 
 
  109#define KEYFRAMEID(classid, contentid) ((mootools::longuint)(((mootools::longuint)classid << 32) | (unsigned int)contentid)) 
  110#define KEYFRAMETYPE(classid) ((unsigned int)((mootools::longuint)classid >> 32)) 
  111#define KEYFRAMECONTENT(classid) ((unsigned int)(classid)) 
  113#define KEYFRAME_NULLID KEYFRAMEID(mootools::C3DKeyframe::KEYFRAME_TYPE_NULLID, mootools::C3DKeyframe::KEYFRAME_TYPE_NULLID) 
  114#define KEYFRAME_MATRIX KEYFRAMEID(mootools::C3DKeyframe::KEYFRAME_TYPE_MATRIX, mootools::C3DKeyframe::KEYFRAME_TYPE_NULLID) 
  115#define KEYFRAME_SCALE KEYFRAMEID(mootools::C3DKeyframe::KEYFRAME_TYPE_SCALE, mootools::C3DKeyframe::KEYFRAME_TYPE_NULLID) 
  116#define KEYFRAME_ROT KEYFRAMEID(mootools::C3DKeyframe::KEYFRAME_TYPE_ROT, mootools::C3DKeyframe::KEYFRAME_TYPE_NULLID) 
  117#define KEYFRAME_TRANS KEYFRAMEID(mootools::C3DKeyframe::KEYFRAME_TYPE_TRANS, MAKE_CUSTOM_ID('T', 'R', 'A', 'N')) 
  118#define KEYFRAME_PIVOT KEYFRAMEID(mootools::C3DKeyframe::KEYFRAME_TYPE_VECTOR, MAKE_CUSTOM_ID('P', 'I', 'V', 'O')) 
  141    virtual bool operator==(
const C3DKeyframe& key) 
const;
 
  145    virtual bool Dump(
int time, 
unsigned int flags) 
const;
 
 
  161    void SwapCoordinates(
unsigned int swapMode);
 
  163    void SetRotation(
double angle, 
const C3DVector& rotation);
 
  164    C3DVector GetRotation(
double& angle) 
const;
 
  173    using C3DMatrixKey::ToMatrix;
 
  174    using C3DMatrixKey::operator ==;
 
  177    bool Dump(
int time, 
unsigned int flags) 
const;
 
 
  191    void SwapCoordinates(
unsigned int swapMode);
 
  194    real *GetVectorPtr();
 
  201    virtual void UpdateMatrix();
 
  204    bool Dump(
int time, 
unsigned int flags) 
const;
 
 
  217    using C3DVectorKey::operator ==; 
 
  218    using C3DVectorKey::operator =;
 
 
  228    using C3DVectorKey::operator ==; 
 
  229    using C3DVectorKey::operator =;
 
 
  246    void SetValue(
TYPE value);
 
  247    TYPE GetValue() 
const;
 
  249    unsigned int GetTypeID()
 const 
  258    virtual bool operator==(
const C3DKeyframe& key) 
const;
 
  262    virtual bool Dump(
int time, 
unsigned int flags) 
const;
 
 
  272    XASSERT(KEYFRAMETYPE(classid) == GetTypeID());
 
  273    this->classid = classid;
 
  279    classid =  KEYFRAMEID(GetTypeID(), 
contentid);
 
  295    if (!C3DKeyframe::operator==(key))
 
  303    C3DKeyframe::Serialize(
ar);
 
  313    C3DKeyframe::CopyFrom(key);
 
  314    if (classid != key.GetClassID())
 
  336    if (!C3DKeyframe::Dump(time, flags))
 
  340    XTRACE(
_T(
"Type Key %d %d:\n"), GetTypeID(), GetContentID());
 
  373template<> 
inline unsigned int C3DFloatKey::GetTypeID()
 const 
  378template<> 
inline unsigned int C3DDoubleKey::GetTypeID()
 const 
  383template<> 
inline unsigned int C3DIntKey::GetTypeID()
 const 
  388template<> 
inline unsigned int C3DUIntKey::GetTypeID()
 const 
  393template<> 
inline unsigned int C3DColorKey::GetTypeID()
 const 
  405END_MOOTOOLS_NAMESPACE
 
The file defines C3DKeyCurve, C3DTCBCurve which handles interpolation curve between two keyframes.
CCustomData class is a handly class for storing any kind of data.
CRGBColor is a class that handles RGBA colors.
This keyframe stores a CRGBColor color information which can be get / set using SetValue() / GetValue...
This keyframe stores a double value information which can be get / set using SetValue() / GetValue() ...
This keyframe stores a float value information which can be get / set using SetValue() / GetValue() m...
This keyframe stores a int value information which can be get / set using SetValue() / GetValue() met...
C3DKeyCurve is the base class that determines the transition curve between a given keyframe and the n...
Definition 3DKeyCurve.h:22
This is the base class for any object that can be animated using C3DKeyframe.
Definition 3DAnimatable.h:51
This is the base class for any keyframe that is part of C3DKeyframable class.
Definition 3DKeyframe.h:49
KeyframeType
Definition 3DKeyframe.h:63
@ KEYFRAME_TYPE_NULLID
Keyframe not defined. Can be also used to retrieve any kind of keyframe.
Definition 3DKeyframe.h:64
@ KEYFRAME_TYPE_DOUBLE
C3DDoubleKey keyframe.
Definition 3DKeyframe.h:71
@ KEYFRAME_TYPE_INT
C3DIntKey keyframe.
Definition 3DKeyframe.h:72
@ KEYFRAME_TYPE_UINT
C3DUIntKey keyframe.
Definition 3DKeyframe.h:73
@ KEYFRAME_TYPE_FLOAT
C3DFloatKey keyframe.
Definition 3DKeyframe.h:70
@ KEYFRAME_TYPE_COLOR
C3DColorKey keyframe.
Definition 3DKeyframe.h:74
This is the keyframe base class for transformation keyfrrame which allows to modify the node matrix t...
Definition 3DKeyframe.h:125
Definition 3DKeyframe.h:152
Definition 3DKeyframe.h:211
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
Definition 3DKeyframe.h:222
This template class defines a keyframe of the specified TYPE.
Definition 3DKeyframe.h:238
This keyframe stores a unsigned int value information which can be get / set using SetValue() / GetVa...
Definition 3DKeyframe.h:184
CCustomData is a handly class for storing any kind of data.
Definition CustomData.h:106
The class defines a quaternion transformation.
Definition Quaternion.h:20
Definition 3DKeyframe.h:22