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