00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GE_MOTION_H
00023 #define GE_MOTION_H
00024
00025
00026
00027
00028
00029
00030
00031 #include <stdio.h>
00032 #include "basetype.h"
00033 #include "path.h"
00034 #include "vfile.h"
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040
00041 typedef struct geMotion geMotion;
00042
00043 GENESISAPI geMotion *GENESISCC geMotion_Create(geBoolean ManageNames);
00044
00045 GENESISAPI void GENESISCC geMotion_Destroy(geMotion **PM);
00046
00047
00048
00049 GENESISAPI geBoolean GENESISCC geMotion_IsValid(const geMotion *M);
00050
00051
00052 GENESISAPI geBoolean GENESISCC geMotion_AddPath(geMotion *M, gePath *P,const char *Name,int *Index);
00053
00054 GENESISAPI geBoolean GENESISCC geMotion_HasNames(const geMotion *M);
00055 GENESISAPI int32 GENESISCC geMotion_GetNameChecksum(const geMotion *M);
00056
00057 GENESISAPI geBoolean GENESISCC geMotion_RemoveNames(geMotion *M);
00058
00059 GENESISAPI void GENESISCC geMotion_SampleChannels(const geMotion *M, int PathIndex, geFloat Time, geQuaternion *Rotation, geVec3d *Translation);
00060 GENESISAPI geBoolean GENESISCC geMotion_SampleChannelsNamed(const geMotion *M, const char *PathName, geFloat Time, geQuaternion *Rotation, geVec3d *Translation);
00061
00062 GENESISAPI void GENESISCC geMotion_Sample(const geMotion *M, int PathIndex, geFloat Time, geXForm3d *Transform);
00063 GENESISAPI geBoolean GENESISCC geMotion_SampleNamed(const geMotion *M, const char *PathName, geFloat Time, geXForm3d *Transform);
00064
00065
00066
00067
00068
00069 GENESISAPI gePath *GENESISCC geMotion_GetPathNamed(const geMotion *M,const char *Name);
00070 GENESISAPI const char *GENESISCC geMotion_GetNameOfPath(const geMotion *M, int Index);
00071
00072
00073 GENESISAPI gePath *GENESISCC geMotion_GetPath(const geMotion *M,int Index);
00074 GENESISAPI int GENESISCC geMotion_GetPathCount(const geMotion *M);
00075
00076
00077 GENESISAPI geBoolean GENESISCC geMotion_SetName(geMotion *M, const char * Name);
00078 GENESISAPI const char *GENESISCC geMotion_GetName(const geMotion *M);
00079
00080
00081
00082
00083
00084 GENESISAPI int GENESISCC geMotion_GetSubMotionCount(const geMotion*M);
00085
00086
00087
00088
00089
00090 GENESISAPI geMotion *GENESISCC geMotion_GetSubMotion(const geMotion *M,int Index);
00091 GENESISAPI geMotion *GENESISCC geMotion_GetSubMotionNamed(const geMotion *M,const char *Name);
00092 GENESISAPI geBoolean GENESISCC geMotion_AddSubMotion(
00093 geMotion *ParentMotion,
00094 geFloat TimeScale,
00095 geFloat TimeOffset,
00096 geMotion *SubMotion,
00097 geFloat StartTime,
00098 geFloat StartMagnitude,
00099 geFloat EndTime,
00100 geFloat EndMagnitude,
00101 const geXForm3d *Transform,
00102 int *Index);
00103
00104 GENESISAPI geMotion *GENESISCC geMotion_RemoveSubMotion(geMotion *ParentMotion, int SubMotionIndex);
00105
00106
00107
00108 GENESISAPI geFloat GENESISCC geMotion_GetTimeOffset( const geMotion *M,int SubMotionIndex );
00109 GENESISAPI geBoolean GENESISCC geMotion_SetTimeOffset( geMotion *M,int SubMotionIndex,geFloat TimeOffset );
00110
00111
00112
00113 GENESISAPI geFloat GENESISCC geMotion_GetTimeScale( const geMotion *M,int SubMotionIndex );
00114 GENESISAPI geBoolean GENESISCC geMotion_SetTimeScale( geMotion *M,int SubMotionIndex,geFloat TimeScale );
00115
00116
00117 GENESISAPI geFloat GENESISCC geMotion_GetBlendAmount( const geMotion *M, int SubMotionIndex, geFloat Time);
00118
00119
00120 GENESISAPI gePath *GENESISCC geMotion_GetBlendPath( const geMotion *M,int SubMotionIndex );
00121 GENESISAPI geBoolean GENESISCC geMotion_SetBlendPath( geMotion *M,int SubMotionIndex, gePath *Blend );
00122
00123 GENESISAPI const geXForm3d *GENESISCC geMotion_GetBaseTransform( const geMotion *M,int SubMotionIndex );
00124 GENESISAPI geBoolean GENESISCC geMotion_SetBaseTransform( geMotion *M,int SubMotionIndex, geXForm3d *BaseTransform );
00125 GENESISAPI geBoolean GENESISCC geMotion_GetTransform(const geMotion *M, geFloat Time, geXForm3d *Transform);
00126
00127
00128
00129
00130
00131
00132
00133
00134 GENESISAPI geBoolean GENESISCC geMotion_GetTimeExtents(const geMotion *M,geFloat *StartTime,geFloat *EndTime);
00135
00136
00137
00138 GENESISAPI geBoolean GENESISCC geMotion_InsertEvent(geMotion *M, geFloat tKey, const char* String);
00139
00140
00141 GENESISAPI geBoolean GENESISCC geMotion_DeleteEvent(geMotion *M, geFloat tKey);
00142
00143
00144 GENESISAPI void GENESISCC geMotion_SetupEventIterator(
00145 geMotion *M,
00146 geFloat StartTime,
00147 geFloat EndTime);
00148
00149
00150
00151
00152 GENESISAPI geBoolean GENESISCC geMotion_GetNextEvent(
00153 geMotion *M,
00154 geFloat *pTime,
00155 const char **ppEventString);
00156
00157
00158
00159
00160
00161
00162
00163 GENESISAPI geBoolean GENESISCC geMotion_GetEventExtents(const geMotion *M,
00164 geFloat *FirstEventTime,
00165 geFloat *LastEventTime);
00166
00167
00168
00169
00170
00171 GENESISAPI geMotion *GENESISCC geMotion_CreateFromFile(geVFile *f);
00172 GENESISAPI geBoolean GENESISCC geMotion_WriteToFile(const geMotion *M, geVFile *f);
00173 GENESISAPI geBoolean GENESISCC geMotion_WriteToBinaryFile(const geMotion *M,geVFile *pFile);
00174
00175 #ifdef __cplusplus
00176 }
00177 #endif
00178
00179
00180 #endif