00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CAL_CAL3D_WRAPPER_H
00012 #define CAL_CAL3D_WRAPPER_H
00013
00014 #ifdef __cplusplus
00015 #include "cal3d/global.h"
00016 #endif
00017
00018
00019
00020
00021
00022 #ifdef _WIN32
00023
00024 #ifdef __MINGW32__
00025
00026 #define CAL3D_WRAPPER_API
00027
00028 #else
00029
00030 #pragma warning(disable : 4251)
00031 #pragma warning(disable : 4786)
00032 #pragma warning(disable : 4099)
00033
00034 #ifdef CAL3D_WRAPPER_EXPORTS
00035 #define CAL3D_WRAPPER_API __declspec(dllexport)
00036 #else
00037 #define CAL3D_WRAPPER_API __declspec(dllimport)
00038 #endif
00039
00040 #endif
00041
00042 #endif
00043
00044
00045
00046
00047
00048 #if defined(__linux__) \
00049 || (__CYGWIN__) \
00050 || (sun) \
00051 || (mips) \
00052 || (__FreeBSD__) \
00053 || defined(__APPLE__)
00054
00055 #define CAL3D_WRAPPER_API
00056
00057 #endif
00058
00059
00060
00061
00062
00063 #ifndef CAL3D_WRAPPER_EXPORTS
00064
00065 struct CalAnimation;
00066 struct CalAnimationAction;
00067 struct CalAnimationCycle;
00068 struct CalBone;
00069 struct CalCoreAnimation;
00070 struct CalCoreBone;
00071 struct CalCoreKeyframe;
00072 struct CalCoreMaterial;
00073 struct CalCoreMesh;
00074 struct CalCoreModel;
00075 struct CalCoreSkeleton;
00076 struct CalCoreSubmesh;
00077 struct CalCoreTrack;
00078 struct CalLoader;
00079 struct CalMatrix;
00080 struct CalMesh;
00081 struct CalMixer;
00082 struct CalModel;
00083 struct CalPhysique;
00084 struct CalPlatform;
00085 struct CalQuaternion;
00086 struct CalRenderer;
00087 struct CalSaver;
00088 struct CalSkeleton;
00089 struct CalSpringSystem;
00090 struct CalSubmesh;
00091 struct CalVector;
00092
00093 #ifndef __cplusplus
00094 typedef int CalIndex;
00095 #endif
00096
00097 #endif
00098
00099
00100
00101 typedef void *CalUserData;
00102
00103
00104
00105
00106
00107 enum Boolean
00108 {
00109 False = 0,
00110 True = 1
00111 };
00112
00113
00114
00115
00116
00117 #ifdef __cplusplus
00118 extern "C"
00119 {
00120 #endif
00121
00122
00123
00124
00125
00126 CAL3D_WRAPPER_API enum CalAnimationType
00127 {
00128 ANIMATION_TYPE_NONE = 0,
00129 ANIMATION_TYPE_CYCLE,
00130 ANIMATION_TYPE_POSE,
00131 ANIMATION_TYPE_ACTION
00132 };
00133
00134 CAL3D_WRAPPER_API enum CalAnimationState
00135 {
00136 ANIMATION_STATE_NONE = 0,
00137 ANIMATION_STATE_SYNC,
00138 ANIMATION_STATE_ASYNC,
00139 ANIMATION_STATE_IN,
00140 ANIMATION_STATE_STEADY,
00141 ANIMATION_STATE_OUT
00142 };
00143
00144 CAL3D_WRAPPER_API enum Boolean CalAnimation_Create(struct CalAnimation *self, struct CalCoreAnimation *pCoreAnimation);
00145 CAL3D_WRAPPER_API void CalAnimation_Delete(struct CalAnimation *self);
00146 CAL3D_WRAPPER_API void CalAnimation_Destroy(struct CalAnimation *self);
00147 CAL3D_WRAPPER_API struct CalCoreAnimation *CalAnimation_GetCoreAnimation(struct CalAnimation *self);
00148 CAL3D_WRAPPER_API enum CalAnimationState CalAnimation_GetState(struct CalAnimation *self);
00149 CAL3D_WRAPPER_API float CalAnimation_GetTime(struct CalAnimation *self);
00150 CAL3D_WRAPPER_API enum CalAnimationType CalAnimation_GetType(struct CalAnimation *self);
00151 CAL3D_WRAPPER_API float CalAnimation_GetWeight(struct CalAnimation *self);
00152
00153
00154
00155
00156
00157 CAL3D_WRAPPER_API enum Boolean CalAnimationAction_Create(struct CalAnimationAction *self, struct CalCoreAnimation *pCoreAnimation);
00158 CAL3D_WRAPPER_API void CalAnimationAction_Delete(struct CalAnimationAction *self);
00159 CAL3D_WRAPPER_API void CalAnimationAction_Destroy(struct CalAnimationAction *self);
00160 CAL3D_WRAPPER_API enum Boolean CalAnimationAction_Execute(struct CalAnimationAction *self, float delayIn, float delayOut);
00161 CAL3D_WRAPPER_API struct CalAnimationAction *CalAnimationAction_New();
00162 CAL3D_WRAPPER_API enum Boolean CalAnimationAction_Update(struct CalAnimationAction *self, float deltaTime);
00163
00164
00165
00166
00167
00168 CAL3D_WRAPPER_API enum Boolean CalAnimationCycle_Blend(struct CalAnimationCycle *self, float weight, float delay);
00169 CAL3D_WRAPPER_API enum Boolean CalAnimationCycle_Create(struct CalAnimationCycle *self, struct CalCoreAnimation *pCoreAnimation);
00170 CAL3D_WRAPPER_API void CalAnimationCycle_Delete(struct CalAnimationCycle *self);
00171 CAL3D_WRAPPER_API void CalAnimationCycle_Destroy(struct CalAnimationCycle *self);
00172 CAL3D_WRAPPER_API struct CalAnimationCycle *CalAnimationCycle_New();
00173 CAL3D_WRAPPER_API void CalAnimationCycle_SetAsync(struct CalAnimationCycle *self, float time, float duration);
00174 CAL3D_WRAPPER_API enum Boolean CalAnimationCycle_Update(struct CalAnimationCycle *self, float deltaTime);
00175
00176
00177
00178
00179
00180 CAL3D_WRAPPER_API void CalBone_BlendState(struct CalBone *self, float weight, struct CalVector *pTranslation, struct CalQuaternion *pRotation);
00181 CAL3D_WRAPPER_API void CalBone_CalculateState(struct CalBone *self);
00182 CAL3D_WRAPPER_API void CalBone_ClearState(struct CalBone *self);
00183 CAL3D_WRAPPER_API enum Boolean CalBone_Create(struct CalBone *self, struct CalCoreBone *pCoreBone);
00184 CAL3D_WRAPPER_API void CalBone_Delete(struct CalBone *self);
00185 CAL3D_WRAPPER_API void CalBone_Destroy(struct CalBone *self);
00186 CAL3D_WRAPPER_API struct CalCoreBone *CalBone_GetCoreBone(struct CalBone *self);
00187 CAL3D_WRAPPER_API struct CalQuaternion *CalBone_GetRotation(struct CalBone *self);
00188 CAL3D_WRAPPER_API struct CalQuaternion *CalBone_GetRotationAbsolute(struct CalBone *self);
00189 CAL3D_WRAPPER_API struct CalQuaternion *CalBone_GetRotationBoneSpace(struct CalBone *self);
00190 CAL3D_WRAPPER_API struct CalVector *CalBone_GetTranslation(struct CalBone *self);
00191 CAL3D_WRAPPER_API struct CalVector *CalBone_GetTranslationAbsolute(struct CalBone *self);
00192 CAL3D_WRAPPER_API struct CalVector *CalBone_GetTranslationBoneSpace(struct CalBone *self);
00193 CAL3D_WRAPPER_API void CalBone_LockState(struct CalBone *self);
00194 CAL3D_WRAPPER_API struct CalBone *CalBone_New();
00195 CAL3D_WRAPPER_API void CalBone_SetSkeleton(struct CalBone *self, struct CalSkeleton *pSkeleton);
00196 CAL3D_WRAPPER_API void CalBone_SetTranslation(struct CalBone *self, struct CalVector *pTranslation);
00197 CAL3D_WRAPPER_API void CalBone_SetRotation(struct CalBone *self, struct CalQuaternion *pRotation);
00198 CAL3D_WRAPPER_API void CalBone_SetCoreState(struct CalBone *self);
00199 CAL3D_WRAPPER_API void CalBone_SetCoreStateRecursive(struct CalBone *self);
00200
00201
00202
00203
00204
00205
00206 CAL3D_WRAPPER_API enum Boolean CalCoreAnimation_AddCoreTrack(struct CalCoreAnimation *self, struct CalCoreTrack *pCoreTrack);
00207 CAL3D_WRAPPER_API enum Boolean CalCoreAnimation_Create(struct CalCoreAnimation *self);
00208 CAL3D_WRAPPER_API void CalCoreAnimation_Delete(struct CalCoreAnimation *self);
00209 CAL3D_WRAPPER_API void CalCoreAnimation_Destroy(struct CalCoreAnimation *self);
00210 CAL3D_WRAPPER_API struct CalCoreTrack *CalCoreAnimation_GetCoreTrack(struct CalCoreAnimation *self, int coreBoneId);
00211 CAL3D_WRAPPER_API float CalCoreAnimation_GetDuration(struct CalCoreAnimation *self);
00212
00213 CAL3D_WRAPPER_API struct CalCoreAnimation *CalCoreAnimation_New();
00214 CAL3D_WRAPPER_API void CalCoreAnimation_SetDuration(struct CalCoreAnimation *self, float duration);
00215
00216
00217
00218
00219
00220 CAL3D_WRAPPER_API enum Boolean CalCoreBone_AddChildId(struct CalCoreBone *self, int childId);
00221 CAL3D_WRAPPER_API void CalCoreBone_CalculateState(struct CalCoreBone *self);
00222 CAL3D_WRAPPER_API enum Boolean CalCoreBone_Create(struct CalCoreBone *self, char *strName);
00223 CAL3D_WRAPPER_API void CalCoreBone_Delete(struct CalCoreBone *self);
00224 CAL3D_WRAPPER_API void CalCoreBone_Destroy(struct CalCoreBone *self);
00225
00226 CAL3D_WRAPPER_API char *CalCoreBone_GetName(struct CalCoreBone *self);
00227 CAL3D_WRAPPER_API int CalCoreBone_GetParentId(struct CalCoreBone *self);
00228 CAL3D_WRAPPER_API struct CalQuaternion *CalCoreBone_GetRotation(struct CalCoreBone *self);
00229 CAL3D_WRAPPER_API struct CalQuaternion *CalCoreBone_GetRotationAbsolute(struct CalCoreBone *self);
00230 CAL3D_WRAPPER_API struct CalQuaternion *CalCoreBone_GetRotationBoneSpace(struct CalCoreBone *self);
00231 CAL3D_WRAPPER_API struct CalVector *CalCoreBone_GetTranslation(struct CalCoreBone *self);
00232 CAL3D_WRAPPER_API struct CalVector *CalCoreBone_GetTranslationAbsolute(struct CalCoreBone *self);
00233 CAL3D_WRAPPER_API struct CalVector *CalCoreBone_GetTranslationBoneSpace(struct CalCoreBone *self);
00234 CAL3D_WRAPPER_API CalUserData CalCoreBone_GetUserData(struct CalCoreBone *self);
00235 CAL3D_WRAPPER_API struct CalCoreBone *CalCoreBone_New();
00236 CAL3D_WRAPPER_API void CalCoreBone_SetCoreSkeleton(struct CalCoreBone *self, struct CalCoreSkeleton *pCoreSkeleton);
00237 CAL3D_WRAPPER_API void CalCoreBone_SetParentId(struct CalCoreBone *self, int parentId);
00238 CAL3D_WRAPPER_API void CalCoreBone_SetRotation(struct CalCoreBone *self, struct CalQuaternion *pRotation);
00239 CAL3D_WRAPPER_API void CalCoreBone_SetRotationBoneSpace(struct CalCoreBone *self, struct CalQuaternion *pRotation);
00240 CAL3D_WRAPPER_API void CalCoreBone_SetTranslation(struct CalCoreBone *self, struct CalVector *pTranslation);
00241 CAL3D_WRAPPER_API void CalCoreBone_SetTranslationBoneSpace(struct CalCoreBone *self, struct CalVector *pTranslation);
00242 CAL3D_WRAPPER_API void CalCoreBone_SetUserData(struct CalCoreBone *self, CalUserData userData);
00243
00244
00245
00246
00247
00248 CAL3D_WRAPPER_API enum Boolean CalCoreKeyframe_Create(struct CalCoreKeyframe *self);
00249 CAL3D_WRAPPER_API void CalCoreKeyframe_Delete(struct CalCoreKeyframe *self);
00250 CAL3D_WRAPPER_API void CalCoreKeyframe_Destroy(struct CalCoreKeyframe *self);
00251 CAL3D_WRAPPER_API struct CalQuaternion *CalCoreKeyframe_GetRotation(struct CalCoreKeyframe *self);
00252 CAL3D_WRAPPER_API float CalCoreKeyframe_GetTime(struct CalCoreKeyframe *self);
00253 CAL3D_WRAPPER_API struct CalVector *CalCoreKeyframe_GetTranslation(struct CalCoreKeyframe *self);
00254 CAL3D_WRAPPER_API struct CalCoreKeyframe *CalCoreKeyframe_New();
00255 CAL3D_WRAPPER_API void CalCoreKeyframe_SetRotation(struct CalCoreKeyframe *self, struct CalQuaternion *pRotation);
00256 CAL3D_WRAPPER_API void CalCoreKeyframe_SetTime(struct CalCoreKeyframe *self, float time);
00257 CAL3D_WRAPPER_API void CalCoreKeyframe_SetTranslation(struct CalCoreKeyframe *self, struct CalVector *pTranslation);
00258
00259
00260
00261
00262
00263 CAL3D_WRAPPER_API enum Boolean CalCoreMaterial_Create(struct CalCoreMaterial *self);
00264 CAL3D_WRAPPER_API void CalCoreMaterial_Delete(struct CalCoreMaterial *self);
00265 CAL3D_WRAPPER_API void CalCoreMaterial_Destroy(struct CalCoreMaterial *self);
00266
00267
00268 CAL3D_WRAPPER_API int CalCoreMaterial_GetMapCount(struct CalCoreMaterial *self);
00269 CAL3D_WRAPPER_API char *CalCoreMaterial_GetMapFilename(struct CalCoreMaterial *self, int mapId);
00270 CAL3D_WRAPPER_API CalUserData CalCoreMaterial_GetMapUserData(struct CalCoreMaterial *self, int mapId);
00271 CAL3D_WRAPPER_API float CalCoreMaterial_GetShininess(struct CalCoreMaterial *self);
00272
00273 CAL3D_WRAPPER_API CalUserData CalCoreMaterial_GetUserData(struct CalCoreMaterial *self);
00274
00275 CAL3D_WRAPPER_API struct CalCoreMaterial *CalCoreMaterial_New();
00276 CAL3D_WRAPPER_API enum Boolean CalCoreMaterial_Reserve(struct CalCoreMaterial *self, int mapCount);
00277
00278
00279
00280 CAL3D_WRAPPER_API enum Boolean CalCoreMaterial_SetMapUserData(struct CalCoreMaterial *self, int mapId, CalUserData userData);
00281 CAL3D_WRAPPER_API void CalCoreMaterial_SetShininess(struct CalCoreMaterial *self, float shininess);
00282
00283 CAL3D_WRAPPER_API void CalCoreMaterial_SetUserData(struct CalCoreMaterial *self, CalUserData userData);
00284
00285
00286
00287
00288
00289 CAL3D_WRAPPER_API int CalCoreMesh_AddCoreSubmesh(struct CalCoreMesh *self, struct CalCoreSubmesh *pCoreSubmesh);
00290 CAL3D_WRAPPER_API enum Boolean CalCoreMesh_Create(struct CalCoreMesh *self);
00291 CAL3D_WRAPPER_API void CalCoreMesh_Delete(struct CalCoreMesh *self);
00292 CAL3D_WRAPPER_API void CalCoreMesh_Destroy(struct CalCoreMesh *self);
00293 CAL3D_WRAPPER_API struct CalCoreSubmesh *CalCoreMesh_GetCoreSubmesh(struct CalCoreMesh *self, int id);
00294 CAL3D_WRAPPER_API int CalCoreMesh_GetCoreSubmeshCount(struct CalCoreMesh *self);
00295
00296 CAL3D_WRAPPER_API struct CalCoreMesh *CalCoreMesh_New();
00297
00298
00299
00300
00301
00302 CAL3D_WRAPPER_API int CalCoreModel_AddCoreAnimation(struct CalCoreModel *self, struct CalCoreAnimation *pCoreAnimation);
00303 CAL3D_WRAPPER_API int CalCoreModel_AddCoreMaterial(struct CalCoreModel *self, struct CalCoreMaterial *pCoreMaterial);
00304 CAL3D_WRAPPER_API int CalCoreModel_AddCoreMesh(struct CalCoreModel *self, struct CalCoreMesh *pCoreMesh);
00305 CAL3D_WRAPPER_API enum Boolean CalCoreModel_Create(struct CalCoreModel *self, char *strName);
00306 CAL3D_WRAPPER_API enum Boolean CalCoreModel_CreateCoreMaterialThread(struct CalCoreModel *self, int coreMaterialThreadId);
00307 CAL3D_WRAPPER_API void CalCoreModel_Delete(struct CalCoreModel *self);
00308 CAL3D_WRAPPER_API void CalCoreModel_Destroy(struct CalCoreModel *self);
00309 CAL3D_WRAPPER_API struct CalCoreAnimation *CalCoreModel_GetCoreAnimation(struct CalCoreModel *self, int coreAnimationId);
00310 CAL3D_WRAPPER_API int CalCoreModel_GetCoreAnimationCount(struct CalCoreModel *self);
00311 CAL3D_WRAPPER_API struct CalCoreMaterial *CalCoreModel_GetCoreMaterial(struct CalCoreModel *self, int coreMaterialId);
00312 CAL3D_WRAPPER_API int CalCoreModel_GetCoreMaterialCount(struct CalCoreModel *self);
00313 CAL3D_WRAPPER_API int CalCoreModel_GetCoreMaterialId(struct CalCoreModel *self, int coreMaterialThreadId, int coreMaterialSetId);
00314 CAL3D_WRAPPER_API struct CalCoreMesh *CalCoreModel_GetCoreMesh(struct CalCoreModel *self, int coreMeshId);
00315 CAL3D_WRAPPER_API int CalCoreModel_GetCoreMeshCount(struct CalCoreModel *self);
00316 CAL3D_WRAPPER_API struct CalCoreSkeleton *CalCoreModel_GetCoreSkeleton(struct CalCoreModel *self);
00317 CAL3D_WRAPPER_API CalUserData CalCoreModel_GetUserData(struct CalCoreModel *self);
00318 CAL3D_WRAPPER_API int CalCoreModel_LoadCoreAnimation(struct CalCoreModel *self, char *strFilename);
00319 CAL3D_WRAPPER_API int CalCoreModel_LoadCoreMaterial(struct CalCoreModel *self, char *strFilename);
00320 CAL3D_WRAPPER_API int CalCoreModel_LoadCoreMesh(struct CalCoreModel *self, char *strFilename);
00321 CAL3D_WRAPPER_API enum Boolean CalCoreModel_LoadCoreSkeleton(struct CalCoreModel *self, char *strFilename);
00322 CAL3D_WRAPPER_API struct CalCoreModel *CalCoreModel_New();
00323 CAL3D_WRAPPER_API enum Boolean CalCoreModel_SaveCoreAnimation(struct CalCoreModel *self, char *strFilename, int coreAnimtionId);
00324 CAL3D_WRAPPER_API enum Boolean CalCoreModel_SaveCoreMaterial(struct CalCoreModel *self, char *strFilename, int coreMaterialId);
00325 CAL3D_WRAPPER_API enum Boolean CalCoreModel_SaveCoreMesh(struct CalCoreModel *self, char *strFilename, int coreMeshId);
00326 CAL3D_WRAPPER_API enum Boolean CalCoreModel_SaveCoreSkeleton(struct CalCoreModel *self, char *strFilename);
00327 CAL3D_WRAPPER_API enum Boolean CalCoreModel_SetCoreMaterialId(struct CalCoreModel *self, int coreMaterialThreadId, int coreMaterialSetId, int coreMaterialId);
00328 CAL3D_WRAPPER_API void CalCoreModel_SetCoreSkeleton(struct CalCoreModel *self, struct CalCoreSkeleton *pCoreSkeleton);
00329 CAL3D_WRAPPER_API void CalCoreModel_SetUserData(struct CalCoreModel *self, CalUserData userData);
00330
00331
00332
00333
00334
00335 CAL3D_WRAPPER_API int CalCoreSkeleton_AddCoreBone(struct CalCoreSkeleton *self, struct CalCoreBone *pCoreBone);
00336 CAL3D_WRAPPER_API void CalCoreSkeleton_CalculateState(struct CalCoreSkeleton *self);
00337 CAL3D_WRAPPER_API enum Boolean CalCoreSkeleton_Create(struct CalCoreSkeleton *self);
00338 CAL3D_WRAPPER_API void CalCoreSkeleton_Delete(struct CalCoreSkeleton *self);
00339 CAL3D_WRAPPER_API void CalCoreSkeleton_Destroy(struct CalCoreSkeleton *self);
00340 CAL3D_WRAPPER_API struct CalCoreBone *CalCoreSkeleton_GetCoreBone(struct CalCoreSkeleton *self, int coreBoneId);
00341 CAL3D_WRAPPER_API int CalCoreSkeleton_GetCoreBoneId(struct CalCoreSkeleton *self, char *strName);
00342
00343
00344 CAL3D_WRAPPER_API struct CalCoreSkeleton *CalCoreSkeleton_New();
00345
00346
00347
00348
00349
00350 CAL3D_WRAPPER_API enum Boolean CalCoreSubmesh_Create(struct CalCoreSubmesh *self);
00351 CAL3D_WRAPPER_API void CalCoreSubmesh_Delete(struct CalCoreSubmesh *self);
00352 CAL3D_WRAPPER_API void CalCoreSubmesh_Destroy(struct CalCoreSubmesh *self);
00353 CAL3D_WRAPPER_API int CalCoreSubmesh_GetCoreMaterialThreadId(struct CalCoreSubmesh *self);
00354 CAL3D_WRAPPER_API int CalCoreSubmesh_GetFaceCount(struct CalCoreSubmesh *self);
00355 CAL3D_WRAPPER_API int CalCoreSubmesh_GetLodCount(struct CalCoreSubmesh *self);
00356 CAL3D_WRAPPER_API int CalCoreSubmesh_GetSpringCount(struct CalCoreSubmesh *self);
00357
00358
00359
00360
00361
00362 CAL3D_WRAPPER_API int CalCoreSubmesh_GetVertexCount(struct CalCoreSubmesh *self);
00363 CAL3D_WRAPPER_API struct CalCoreSubmesh *CalCoreSubmesh_New();
00364 CAL3D_WRAPPER_API enum Boolean CalCoreSubmesh_Reserve(struct CalCoreSubmesh *self, int vertexCount, int textureCoordinateCount, int faceCount, int springCount);
00365 CAL3D_WRAPPER_API void CalCoreSubmesh_SetCoreMaterialThreadId(struct CalCoreSubmesh *self, int coreMaterialThreadId);
00366
00367 CAL3D_WRAPPER_API void CalCoreSubmesh_SetLodCount(struct CalCoreSubmesh *self, int lodCount);
00368
00369
00370
00371
00372 CAL3D_WRAPPER_API enum Boolean CalCoreSubmesh_IsTangentsEnabled(struct CalCoreSubmesh *self, int mapId);
00373 CAL3D_WRAPPER_API enum Boolean CalCoreSubmesh_EnableTangents(struct CalCoreSubmesh *self, int mapId, bool enabled);
00374
00375
00376
00377
00378
00379 CAL3D_WRAPPER_API enum Boolean CalCoreTrack_AddCoreKeyframe(struct CalCoreTrack *self, struct CalCoreKeyframe *pCoreKeyframe);
00380 CAL3D_WRAPPER_API enum Boolean CalCoreTrack_Create(struct CalCoreTrack *self);
00381 CAL3D_WRAPPER_API void CalCoreTrack_Delete(struct CalCoreTrack *self);
00382 CAL3D_WRAPPER_API void CalCoreTrack_Destroy(struct CalCoreTrack *self);
00383 CAL3D_WRAPPER_API int CalCoreTrack_GetCoreBoneId(struct CalCoreTrack *self);
00384
00385 CAL3D_WRAPPER_API enum Boolean CalCoreTrack_GetState(struct CalCoreTrack *self, float time, struct CalVector *pTranslation, struct CalQuaternion *pRotation);
00386 CAL3D_WRAPPER_API struct CalCoreTrack *CalCoreTrack_New();
00387 CAL3D_WRAPPER_API enum Boolean CalCoreTrack_SetCoreBoneId(struct CalCoreTrack *self, int coreBoneId);
00388
00389
00390
00391
00392
00393 CAL3D_WRAPPER_API enum CalErrorCode
00394 {
00395 ERROR_CODE_OK = 0,
00396 ERROR_CODE_INTERNAL,
00397 ERROR_CODE_INVALID_HANDLE,
00398 ERROR_CODE_MEMORY_ALLOCATION_FAILED,
00399 ERROR_CODE_FILE_NOT_FOUND,
00400 ERROR_CODE_INVALID_FILE_FORMAT,
00401 ERROR_CODE_FILE_PARSER_FAILED,
00402 ERROR_CODE_INDEX_BUILD_FAILED,
00403 ERROR_CODE_NO_PARSER_DOCUMENT,
00404 ERROR_CODE_INVALID_ANIMATION_DURATION,
00405 ERROR_CODE_BONE_NOT_FOUND,
00406 ERROR_CODE_INVALID_ATTRIBUTE_VALUE,
00407 ERROR_CODE_INVALID_KEYFRAME_COUNT,
00408 ERROR_CODE_INVALID_ANIMATION_TYPE,
00409 ERROR_CODE_FILE_CREATION_FAILED,
00410 ERROR_CODE_FILE_WRITING_FAILED,
00411 ERROR_CODE_INCOMPATIBLE_FILE_VERSION,
00412 ERROR_CODE_NO_MESH_IN_MODEL,
00413 ERROR_CODE_MAX_ERROR_CODE
00414 };
00415
00416 CAL3D_WRAPPER_API enum CalErrorCode CalError_GetLastErrorCode();
00417 CAL3D_WRAPPER_API char *CalError_GetLastErrorDescription();
00418 CAL3D_WRAPPER_API char *CalError_GetLastErrorFile();
00419 CAL3D_WRAPPER_API int CalError_GetLastErrorLine();
00420 CAL3D_WRAPPER_API char *CalError_GetLastErrorText();
00421 CAL3D_WRAPPER_API void CalError_PrintLastError();
00422
00423
00424
00425
00426
00427
00428 CAL3D_WRAPPER_API void CalLoader_Delete(struct CalLoader *self);
00429 CAL3D_WRAPPER_API struct CalCoreAnimation *CalLoader_LoadCoreAnimation(struct CalLoader *self, char *strFilename);
00430 CAL3D_WRAPPER_API struct CalCoreMaterial *CalLoader_LoadCoreMaterial(struct CalLoader *self, char *strFilename);
00431 CAL3D_WRAPPER_API struct CalCoreMesh *CalLoader_LoadCoreMesh(struct CalLoader *self, char *strFilename);
00432 CAL3D_WRAPPER_API struct CalCoreSkeleton *CalLoader_LoadCoreSkeleton(struct CalLoader *self, char *strFilename);
00433 CAL3D_WRAPPER_API struct CalLoader *CalLoader_New();
00434
00435
00436
00437
00438
00439 CAL3D_WRAPPER_API enum Boolean CalMesh_Create(struct CalMesh *self, struct CalCoreMesh *pCoreMesh);
00440 CAL3D_WRAPPER_API void CalMesh_Delete(struct CalMesh *self);
00441 CAL3D_WRAPPER_API void CalMesh_Destroy(struct CalMesh *self);
00442 CAL3D_WRAPPER_API struct CalCoreMesh *CalMesh_GetCoreMesh(struct CalMesh *self);
00443 CAL3D_WRAPPER_API struct CalSubmesh *CalMesh_GetSubmesh(struct CalMesh *self, int id);
00444 CAL3D_WRAPPER_API int CalMesh_GetSubmeshCount(struct CalMesh *self);
00445
00446 CAL3D_WRAPPER_API struct CalMesh *CalMesh_New();
00447 CAL3D_WRAPPER_API void CalMesh_SetLodLevel(struct CalMesh *self, float lodLevel);
00448 CAL3D_WRAPPER_API void CalMesh_SetMaterialSet(struct CalMesh *self, int setId);
00449 CAL3D_WRAPPER_API void CalMesh_SetModel(struct CalMesh *self, struct CalModel *pModel);
00450
00451
00452
00453
00454
00455 CAL3D_WRAPPER_API enum Boolean CalMixer_BlendCycle(struct CalMixer *self, int id, float weight, float delay);
00456 CAL3D_WRAPPER_API enum Boolean CalMixer_ClearCycle(struct CalMixer *self, int id, float delay);
00457 CAL3D_WRAPPER_API enum Boolean CalMixer_Create(struct CalMixer *self, struct CalModel *pModel);
00458 CAL3D_WRAPPER_API void CalMixer_Delete(struct CalMixer *self);
00459 CAL3D_WRAPPER_API void CalMixer_Destroy(struct CalMixer *self);
00460 CAL3D_WRAPPER_API enum Boolean CalMixer_ExecuteAction(struct CalMixer *self, int id, float delayIn, float delayOut);
00461 CAL3D_WRAPPER_API struct CalMixer *CalMixer_New();
00462 CAL3D_WRAPPER_API void CalMixer_UpdateAnimation(struct CalMixer *self, float deltaTime);
00463 CAL3D_WRAPPER_API void CalMixer_UpdateSkeleton(struct CalMixer *self);
00464
00465
00466
00467
00468
00469 CAL3D_WRAPPER_API enum Boolean CalModel_AttachMesh(struct CalModel *self, int coreMeshId);
00470 CAL3D_WRAPPER_API enum Boolean CalModel_Create(struct CalModel *self, struct CalCoreModel *pCoreModel);
00471 CAL3D_WRAPPER_API void CalModel_Delete(struct CalModel *self);
00472 CAL3D_WRAPPER_API void CalModel_Destroy(struct CalModel *self);
00473 CAL3D_WRAPPER_API enum Boolean CalModel_DetachMesh(struct CalModel *self, int coreMeshId);
00474 CAL3D_WRAPPER_API struct CalCoreModel *CalModel_GetCoreModel(struct CalModel *self);
00475 CAL3D_WRAPPER_API struct CalMesh *CalModel_GetMesh(struct CalModel *self, int coreMeshId);
00476 CAL3D_WRAPPER_API struct CalMixer *CalModel_GetMixer(struct CalModel *self);
00477 CAL3D_WRAPPER_API struct CalPhysique *CalModel_GetPhysique(struct CalModel *self);
00478 CAL3D_WRAPPER_API struct CalRenderer *CalModel_GetRenderer(struct CalModel *self);
00479 CAL3D_WRAPPER_API struct CalSkeleton *CalModel_GetSkeleton(struct CalModel *self);
00480 CAL3D_WRAPPER_API struct CalSpringSystem *CalModel_GetSpringSystem(struct CalModel *self);
00481 CAL3D_WRAPPER_API CalUserData CalModel_GetUserData(struct CalModel *self);
00482
00483 CAL3D_WRAPPER_API struct CalModel *CalModel_New();
00484 CAL3D_WRAPPER_API void CalModel_SetLodLevel(struct CalModel *self, float lodLevel);
00485 CAL3D_WRAPPER_API void CalModel_SetMaterialSet(struct CalModel *self, int setId);
00486 CAL3D_WRAPPER_API void CalModel_SetUserData(struct CalModel *self, CalUserData userData);
00487 CAL3D_WRAPPER_API void CalModel_Update(struct CalModel *self, float deltaTime);
00488
00489
00490
00491
00492
00493 CAL3D_WRAPPER_API int CalPhysique_CalculateNormals(struct CalPhysique *self, struct CalSubmesh *pSubmesh, float *pNormalBuffer);
00494 CAL3D_WRAPPER_API int CalPhysique_CalculateVertices(struct CalPhysique *self, struct CalSubmesh *pSubmesh, float *pVertexBuffer);
00495 CAL3D_WRAPPER_API int CalPhysique_CalculateVerticesAndNormals(struct CalPhysique *self, struct CalSubmesh *pSubmesh, float *pVertexBuffer);
00496 CAL3D_WRAPPER_API int CalPhysique_CalculateVerticesNormalsAndTexCoords(struct CalPhysique *self, struct CalSubmesh *pSubmesh, float *pVertexBuffer, int NumTexCoords);
00497 CAL3D_WRAPPER_API int CalPhysique_CalculateTangentSpaces(struct CalPhysique *self, struct CalSubmesh *pSubmesh, int mapId, float *pTangentSpaceBuffer);
00498 CAL3D_WRAPPER_API enum Boolean CalPhysique_Create(struct CalPhysique *self, struct CalModel *pModel);
00499 CAL3D_WRAPPER_API void CalPhysique_Delete(struct CalPhysique *self);
00500 CAL3D_WRAPPER_API void CalPhysique_Destroy(struct CalPhysique *self);
00501 CAL3D_WRAPPER_API struct CalPhysique *CalPhysique_New();
00502 CAL3D_WRAPPER_API void CalPhysique_Update(struct CalPhysique *self);
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512 CAL3D_WRAPPER_API void CalQuaternion_Blend(struct CalQuaternion *self, float d, struct CalQuaternion *pQ);
00513 CAL3D_WRAPPER_API void CalQuaternion_Clear(struct CalQuaternion *self);
00514 CAL3D_WRAPPER_API void CalQuaternion_Conjugate(struct CalQuaternion *self);
00515 CAL3D_WRAPPER_API void CalQuaternion_Delete(struct CalQuaternion *self);
00516 CAL3D_WRAPPER_API void CalQuaternion_Equal(struct CalQuaternion *self, struct CalQuaternion *pQ);
00517 CAL3D_WRAPPER_API float *CalQuaternion_Get(struct CalQuaternion *self);
00518 CAL3D_WRAPPER_API void CalQuaternion_Multiply(struct CalQuaternion *self, struct CalQuaternion *pQ);
00519 CAL3D_WRAPPER_API void CalQuaternion_MultiplyVector(struct CalQuaternion *self, struct CalVector *pV);
00520 CAL3D_WRAPPER_API struct CalQuaternion *CalQuaternion_New();
00521 CAL3D_WRAPPER_API void CalQuaternion_Op_Multiply(struct CalQuaternion *pResult, struct CalQuaternion *pQ, struct CalQuaternion *pR);
00522 CAL3D_WRAPPER_API void CalQuaternion_Set(struct CalQuaternion *self, float qx, float qy, float qz, float qw);
00523
00524
00525
00526
00527
00528 CAL3D_WRAPPER_API enum Boolean CalRenderer_BeginRendering(struct CalRenderer *self);
00529 CAL3D_WRAPPER_API enum Boolean CalRenderer_Create(struct CalRenderer *self, struct CalModel *pModel);
00530 CAL3D_WRAPPER_API void CalRenderer_Delete(struct CalRenderer *self);
00531 CAL3D_WRAPPER_API void CalRenderer_Destroy(struct CalRenderer *self);
00532 CAL3D_WRAPPER_API void CalRenderer_EndRendering(struct CalRenderer *self);
00533 CAL3D_WRAPPER_API void CalRenderer_GetAmbientColor(struct CalRenderer *self, unsigned char *pColorBuffer);
00534 CAL3D_WRAPPER_API void CalRenderer_GetDiffuseColor(struct CalRenderer *self, unsigned char *pColorBuffer);
00535 CAL3D_WRAPPER_API int CalRenderer_GetFaceCount(struct CalRenderer *self);
00536 CAL3D_WRAPPER_API int CalRenderer_GetFaces(struct CalRenderer *self, CalIndex *pFaceBuffer);
00537 CAL3D_WRAPPER_API int CalRenderer_GetMapCount(struct CalRenderer *self);
00538 CAL3D_WRAPPER_API CalUserData CalRenderer_GetMapUserData(struct CalRenderer *self, int mapId);
00539 CAL3D_WRAPPER_API int CalRenderer_GetMeshCount(struct CalRenderer *self);
00540 CAL3D_WRAPPER_API int CalRenderer_GetNormals(struct CalRenderer *self, float *pNormalBuffer);
00541 CAL3D_WRAPPER_API float CalRenderer_GetShininess(struct CalRenderer *self);
00542 CAL3D_WRAPPER_API void CalRenderer_GetSpecularColor(struct CalRenderer *self, unsigned char *pColorBuffer);
00543 CAL3D_WRAPPER_API int CalRenderer_GetSubmeshCount(struct CalRenderer *self, int meshId);
00544 CAL3D_WRAPPER_API int CalRenderer_GetTextureCoordinates(struct CalRenderer *self, int mapId, float *pTextureCoordinateBuffer);
00545 CAL3D_WRAPPER_API int CalRenderer_GetVertexCount(struct CalRenderer *self);
00546 CAL3D_WRAPPER_API int CalRenderer_GetVertices(struct CalRenderer *self, float *pVertexBuffer);
00547 CAL3D_WRAPPER_API int CalRenderer_GetVerticesAndNormals(struct CalRenderer *self, float *pVertexBuffer);
00548 CAL3D_WRAPPER_API int CalRenderer_GetVerticesNormalsAndTexCoords(struct CalRenderer *self, float *pVertexBuffer, int NumTexCoords);
00549 CAL3D_WRAPPER_API int CalRenderer_GetTangentSpaces(struct CalRenderer *self, int mapId, float *pTangentSpaceBuffer);
00550 CAL3D_WRAPPER_API enum Boolean CalRenderer_IsTangentsEnabled(struct CalRenderer *self, int mapId);
00551 CAL3D_WRAPPER_API struct CalRenderer *CalRenderer_New();
00552 CAL3D_WRAPPER_API enum Boolean CalRenderer_SelectMeshSubmesh(struct CalRenderer *self, int meshId, int submeshId);
00553
00554
00555
00556
00557
00558 CAL3D_WRAPPER_API void CalSaver_Delete(struct CalSaver *self);
00559 CAL3D_WRAPPER_API struct CalSaver *CalSaver_New();
00560 CAL3D_WRAPPER_API enum Boolean CalSaver_SaveCoreAnimation(struct CalSaver *self, char *strFilename, struct CalCoreAnimation *pCoreAnimation);
00561 CAL3D_WRAPPER_API enum Boolean CalSaver_SaveCoreMaterial(struct CalSaver *self, char *strFilename, struct CalCoreMaterial *pCoreMaterial);
00562 CAL3D_WRAPPER_API enum Boolean CalSaver_SaveCoreMesh(struct CalSaver *self, char *strFilename, struct CalCoreMesh *pCoreMesh);
00563 CAL3D_WRAPPER_API enum Boolean CalSaver_SaveCoreSkeleton(struct CalSaver *self, char *strFilename, struct CalCoreSkeleton *pCoreSkeleton);
00564
00565
00566
00567
00568
00569 CAL3D_WRAPPER_API void CalSkeleton_CalculateState(struct CalSkeleton *self);
00570 CAL3D_WRAPPER_API void CalSkeleton_ClearState(struct CalSkeleton *self);
00571 CAL3D_WRAPPER_API enum Boolean CalSkeleton_Create(struct CalSkeleton *self, struct CalCoreSkeleton *pCoreSkeleton);
00572 CAL3D_WRAPPER_API void CalSkeleton_Delete(struct CalSkeleton *self);
00573 CAL3D_WRAPPER_API void CalSkeleton_Destroy(struct CalSkeleton *self);
00574 CAL3D_WRAPPER_API struct CalBone *CalSkeleton_GetBone(struct CalSkeleton *self, int boneId);
00575 CAL3D_WRAPPER_API struct CalCoreSkeleton *CalSkeleton_GetCoreSkeleton(struct CalSkeleton *self);
00576
00577 CAL3D_WRAPPER_API void CalSkeleton_LockState(struct CalSkeleton *self);
00578 CAL3D_WRAPPER_API struct CalSkeleton *CalSkeleton_New();
00579
00580
00581 CAL3D_WRAPPER_API int CalSkeleton_GetBonePoints(struct CalSkeleton *self, float *pPoints);
00582 CAL3D_WRAPPER_API int CalSkeleton_GetBonePointsStatic(struct CalSkeleton *self, float *pPoints);
00583 CAL3D_WRAPPER_API int CalSkeleton_GetBoneLines(struct CalSkeleton *self, float *pLines);
00584 CAL3D_WRAPPER_API int CalSkeleton_GetBoneLinesStatic(struct CalSkeleton *self, float *pLines);
00585
00586
00587
00588
00589
00590 CAL3D_WRAPPER_API void CalSpringSystem_CalculateForces(struct CalSpringSystem *self, struct CalSubmesh *pSubmesh, float deltaTime);
00591 CAL3D_WRAPPER_API void CalSpringSystem_CalculateVertices(struct CalSpringSystem *self, struct CalSubmesh *pSubmesh, float deltaTime);
00592 CAL3D_WRAPPER_API enum Boolean CalSpringSystem_Create(struct CalSpringSystem *self, struct CalModel *pModel);
00593 CAL3D_WRAPPER_API void CalSpringSystem_Delete(struct CalSpringSystem *self);
00594 CAL3D_WRAPPER_API void CalSpringSystem_Destroy(struct CalSpringSystem *self);
00595 CAL3D_WRAPPER_API struct CalSpringSystem *CalSpringSystem_New();
00596 CAL3D_WRAPPER_API void CalSpringSystem_Update(struct CalSpringSystem *self, float deltaTime);
00597
00598
00599
00600
00601
00602 CAL3D_WRAPPER_API enum Boolean CalSubmesh_Create(struct CalSubmesh *self, struct CalCoreSubmesh *pCoreSubmesh);
00603 CAL3D_WRAPPER_API void CalSubmesh_Delete(struct CalSubmesh *self);
00604 CAL3D_WRAPPER_API void CalSubmesh_Destroy(struct CalSubmesh *self);
00605 CAL3D_WRAPPER_API struct CalCoreSubmesh *CalSubmesh_GetCoreSubmesh(struct CalSubmesh *self);
00606 CAL3D_WRAPPER_API int CalSubmesh_GetCoreMaterialId(struct CalSubmesh *self);
00607 CAL3D_WRAPPER_API int CalSubmesh_GetFaceCount(struct CalSubmesh *self);
00608 CAL3D_WRAPPER_API int CalSubmesh_GetFaces(struct CalSubmesh *self, CalIndex *pFaceBuffer);
00609
00610
00611
00612
00613 CAL3D_WRAPPER_API int CalSubmesh_GetVertexCount(struct CalSubmesh *self);
00614 CAL3D_WRAPPER_API enum Boolean CalSubmesh_HasInternalData(struct CalSubmesh *self);
00615 CAL3D_WRAPPER_API struct CalSubmesh *CalSubmesh_New();
00616 CAL3D_WRAPPER_API void CalSubmesh_SetCoreMaterialId(struct CalSubmesh *self, int coreMaterialId);
00617 CAL3D_WRAPPER_API void CalSubmesh_SetLodLevel(struct CalSubmesh *self, float lodLevel);
00618
00619
00620
00621
00622
00623 CAL3D_WRAPPER_API void CalVector_Add(struct CalVector *self, struct CalVector *pV);
00624 CAL3D_WRAPPER_API void CalVector_Blend(struct CalVector *self, float d, struct CalVector *pV);
00625 CAL3D_WRAPPER_API void CalVector_Clear(struct CalVector *self);
00626 CAL3D_WRAPPER_API void CalVector_Delete(struct CalVector *self);
00627 CAL3D_WRAPPER_API void CalVector_Equal(struct CalVector *self, struct CalVector *pV);
00628 CAL3D_WRAPPER_API void CalVector_InverseScale(struct CalVector *self, float d);
00629 CAL3D_WRAPPER_API float *CalVector_Get(struct CalVector *self);
00630 CAL3D_WRAPPER_API float CalVector_Length(struct CalVector *self);
00631 CAL3D_WRAPPER_API struct CalVector *CalVector_New();
00632 CAL3D_WRAPPER_API float CalVector_Normalize(struct CalVector *self);
00633 CAL3D_WRAPPER_API void CalVector_Op_Add(struct CalVector *pResult, struct CalVector *pV, struct CalVector *pU);
00634 CAL3D_WRAPPER_API void CalVector_Op_Subtract(struct CalVector *pResult, struct CalVector *pV, struct CalVector *pU);
00635 CAL3D_WRAPPER_API void CalVector_CalVector_Op_Scale(struct CalVector *pResult, struct CalVector *pV, float d);
00636 CAL3D_WRAPPER_API void CalVector_CalVector_Op_InverseScale(struct CalVector *pResult, struct CalVector *pV, float d);
00637 CAL3D_WRAPPER_API float CalVector_Op_Scalar(struct CalVector *pV, struct CalVector *pU);
00638 CAL3D_WRAPPER_API void CalVector_Op_Cross(struct CalVector *pResult, struct CalVector *pV, struct CalVector *pU);
00639 CAL3D_WRAPPER_API void CalVector_Scale(struct CalVector *self, float d);
00640 CAL3D_WRAPPER_API void CalVector_Set(struct CalVector *self, float vx, float vy, float vz);
00641 CAL3D_WRAPPER_API void CalVector_Subtract(struct CalVector *self, struct CalVector *pV);
00642 CAL3D_WRAPPER_API void CalVector_Transform(struct CalVector *self, struct CalQuaternion *pQ);
00643
00644 #ifdef __cplusplus
00645 }
00646 #endif
00647
00648 #endif
00649
00650