Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GXAnimationKeyFrame.h

Go to the documentation of this file.
00001 #ifndef __GXANIMATIONKEYFRAME
00002 #define __GXANIMATIONKEYFRAME
00003 
00004 #include "GXStandardDefines.h"
00005 
00006 
00007 struct SGXAnimationKeyFrame
00008 {
00009         void GetD3DXMATRIX(D3DXMATRIX* pOut);
00010 
00011         inline void operator+=(SGXAnimationKeyFrame& Add)
00012         {
00013                 vPos+=Add.vPos;
00014                 vRotation+=Add.vRotation;
00015                 vScale.x+=Add.vScale.x;
00016                 vScale.y+=Add.vScale.y;
00017                 vScale.z+=Add.vScale.z;
00018         }
00019 
00020 
00021 
00022         inline void Zero()
00023         {
00024                 ZeroMemory(this, sizeof(SGXAnimationKeyFrame));
00025                 vScale.x=1.0f;
00026                 vScale.y=1.0f;
00027                 vScale.z=1.0f;
00028         }
00029 
00030         inline SGXAnimationKeyFrame operator*(float fVal)
00031         {
00032                 SGXAnimationKeyFrame RetVal;
00033 
00034                 RetVal.vPos=vPos*fVal;
00035                 RetVal.vRotation=vRotation*fVal;
00036                 RetVal.vScale=vScale*fVal;
00037 
00038                 return RetVal;
00039         }
00040 
00041 
00042         inline SGXAnimationKeyFrame operator*(float fVal) const
00043         {
00044                 SGXAnimationKeyFrame RetVal;
00045 
00046                 RetVal.vPos=vPos*fVal;
00047                 RetVal.vRotation=vRotation*fVal;
00048                 RetVal.vScale=vScale*fVal;
00049 
00050                 return RetVal;
00051         }
00052 
00053         inline SGXAnimationKeyFrame operator+(SGXAnimationKeyFrame& Add)
00054         {
00055                 SGXAnimationKeyFrame RetVal;
00056                 RetVal.vPos=vPos+Add.vPos;
00057                 RetVal.vRotation=vRotation+Add.vRotation;
00058 
00059                 RetVal.vScale.x=vScale.x+Add.vScale.x;
00060                 RetVal.vScale.y=vScale.y+Add.vScale.y;
00061                 RetVal.vScale.z=vScale.z+Add.vScale.z;
00062                 return RetVal;
00063         }
00064 
00065         D3DXVECTOR3     vPos;
00066         D3DXVECTOR3 vRotation;
00067         D3DXVECTOR3 vScale;
00068 };
00069 
00070 
00071 #endif

Generated on Thu May 23 17:51:00 2002 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001