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