⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cal3d_wrapper.h

📁 Cal3D实现虚拟角色 Cal3D实现虚拟角色
💻 H
📖 第 1 页 / 共 3 页
字号:
//****************************************************************************//// cal3d_wrapper.h                                                            //// Copyright (C) 2002 Bruno 'Beosil' Heidelberger                             ////****************************************************************************//// This library is free software; you can redistribute it and/or modify it    //// under the terms of the GNU Lesser General Public License as published by   //// the Free Software Foundation; either version 2.1 of the License, or (at    //// your option) any later version.                                            ////****************************************************************************//#ifndef CAL_CAL3D_WRAPPER_H#define CAL_CAL3D_WRAPPER_H#ifdef __cplusplus#include "cal3d/global.h"#endif//****************************************************************************//// Defines for Win32 and MingW32                                              ////****************************************************************************//#ifdef _WIN32#ifdef __MINGW32__#define CAL3D_WRAPPER_API#else#pragma warning(disable : 4251)#pragma warning(disable : 4786)#pragma warning(disable : 4099)#ifdef CAL3D_WRAPPER_EXPORTS#define CAL3D_WRAPPER_API __declspec(dllexport)#else#define CAL3D_WRAPPER_API __declspec(dllimport)#endif#endif#else//****************************************************************************//// Defines for Linux, Cygwin, FreeBSD Sun and Mips...                         ////****************************************************************************//#define CAL3D_WRAPPER_API#endif //****************************************************************************//// Forward declarations                                                       ////****************************************************************************//#ifndef CAL3D_WRAPPER_EXPORTSstruct CalAnimation;struct CalAnimationAction;struct CalAnimationCycle;struct CalBone;struct CalCoreAnimation;struct CalCoreMorphAnimation;struct CalCoreBone;struct CalCoreKeyframe;struct CalCoreMaterial;struct CalCoreMesh;struct CalCoreModel;struct CalCoreSkeleton;struct CalCoreSubmesh;struct CalCoreTrack;struct CalLoader;struct CalMatrix;struct CalMesh;struct CalMixer;struct CalMorphTargetMixer;struct CalModel;struct CalPhysique;struct CalPlatform;struct CalQuaternion;struct CalRenderer;struct CalSaver;struct CalSkeleton;struct CalSpringSystem;struct CalSubmesh;struct CalVector;#ifndef __cplusplustypedef int CalIndex; #endif#endiftypedef void *CalUserData;//****************************************************************************//// Substitute for the C++ 'bool' type                                         ////****************************************************************************//#undef True#undef Falseenum Boolean{  False = 0,  True = 1};//****************************************************************************//// "C" wrapper functions declaration                                          ////****************************************************************************//#ifdef __cplusplusextern "C"{#endif//****************************************************************************//// CalAnimation wrapper functions declaration                                 ////****************************************************************************//  CAL3D_WRAPPER_API enum CalAnimationType  {    ANIMATION_TYPE_NONE = 0,    ANIMATION_TYPE_CYCLE,    ANIMATION_TYPE_POSE,    ANIMATION_TYPE_ACTION  };  CAL3D_WRAPPER_API enum CalAnimationState  {    ANIMATION_STATE_NONE = 0,    ANIMATION_STATE_SYNC,    ANIMATION_STATE_ASYNC,    ANIMATION_STATE_IN,    ANIMATION_STATE_STEADY,    ANIMATION_STATE_OUT  };  CAL3D_WRAPPER_API void CalAnimation_Delete(struct CalAnimation *self);  CAL3D_WRAPPER_API struct CalCoreAnimation *CalAnimation_GetCoreAnimation(struct CalAnimation *self);  CAL3D_WRAPPER_API enum CalAnimationState CalAnimation_GetState(struct CalAnimation *self);  CAL3D_WRAPPER_API float CalAnimation_GetTime(struct CalAnimation *self);  CAL3D_WRAPPER_API enum CalAnimationType CalAnimation_GetType(struct CalAnimation *self);  CAL3D_WRAPPER_API float CalAnimation_GetWeight(struct CalAnimation *self);//****************************************************************************//// CalAnimationAction wrapper functions declaration                           ////****************************************************************************//  CAL3D_WRAPPER_API void CalAnimationAction_Delete(struct CalAnimationAction *self);  CAL3D_WRAPPER_API enum Boolean CalAnimationAction_Execute(struct CalAnimationAction *self, float delayIn, float delayOut);  CAL3D_WRAPPER_API struct CalAnimationAction *CalAnimationAction_New(struct CalCoreAnimation *pCoreAnimation);  CAL3D_WRAPPER_API enum Boolean CalAnimationAction_Update(struct CalAnimationAction *self, float deltaTime);  CAL3D_WRAPPER_API void CalCoreAnimation_Scale(struct CalCoreAnimation *self, float factor);//****************************************************************************//// CalAnimationCycle wrapper functions declaration                            ////****************************************************************************//  CAL3D_WRAPPER_API enum Boolean CalAnimationCycle_Blend(struct CalAnimationCycle *self, float weight, float delay);  CAL3D_WRAPPER_API void CalAnimationCycle_Delete(struct CalAnimationCycle *self);  CAL3D_WRAPPER_API struct CalAnimationCycle *CalAnimationCycle_New(struct CalCoreAnimation *pCoreAnimation);  CAL3D_WRAPPER_API void CalAnimationCycle_SetAsync(struct CalAnimationCycle *self, float time, float duration);  CAL3D_WRAPPER_API enum Boolean CalAnimationCycle_Update(struct CalAnimationCycle *self, float deltaTime);//****************************************************************************//// CalBone wrapper functions declaration                                      ////****************************************************************************//  CAL3D_WRAPPER_API void CalBone_BlendState(struct CalBone *self, float weight, struct CalVector *pTranslation, struct CalQuaternion *pRotation);  CAL3D_WRAPPER_API void CalBone_CalculateState(struct CalBone *self);  CAL3D_WRAPPER_API void CalBone_ClearState(struct CalBone *self);  CAL3D_WRAPPER_API void CalBone_Delete(struct CalBone *self);  CAL3D_WRAPPER_API struct CalCoreBone *CalBone_GetCoreBone(struct CalBone *self);  CAL3D_WRAPPER_API struct CalQuaternion *CalBone_GetRotation(struct CalBone *self);  CAL3D_WRAPPER_API struct CalQuaternion *CalBone_GetRotationAbsolute(struct CalBone *self);  CAL3D_WRAPPER_API struct CalQuaternion *CalBone_GetRotationBoneSpace(struct CalBone *self);  CAL3D_WRAPPER_API struct CalVector *CalBone_GetTranslation(struct CalBone *self);  CAL3D_WRAPPER_API struct CalVector *CalBone_GetTranslationAbsolute(struct CalBone *self);  CAL3D_WRAPPER_API struct CalVector *CalBone_GetTranslationBoneSpace(struct CalBone *self);  CAL3D_WRAPPER_API void CalBone_LockState(struct CalBone *self);  CAL3D_WRAPPER_API struct CalBone *CalBone_New(struct CalCoreBone* coreBone);  CAL3D_WRAPPER_API void CalBone_SetSkeleton(struct CalBone *self, struct CalSkeleton *pSkeleton);  CAL3D_WRAPPER_API void CalBone_SetTranslation(struct CalBone *self, struct CalVector *pTranslation);  CAL3D_WRAPPER_API void CalBone_SetRotation(struct CalBone *self, struct CalQuaternion *pRotation);  CAL3D_WRAPPER_API void CalBone_SetCoreState(struct CalBone *self);  CAL3D_WRAPPER_API void CalBone_SetCoreStateRecursive(struct CalBone *self);//****************************************************************************//// CalCoreAnimation wrapper functions declaration                             ////****************************************************************************//  CAL3D_WRAPPER_API struct CalCoreAnimation *CalCoreAnimation_New();  CAL3D_WRAPPER_API void CalCoreAnimation_Delete(struct CalCoreAnimation* self);  CAL3D_WRAPPER_API float CalCoreAnimation_GetDuration(struct CalCoreAnimation *self);  CAL3D_WRAPPER_API void CalCoreAnimation_SetDuration(struct CalCoreAnimation *self, float duration);  CAL3D_WRAPPER_API void CalCoreAnimation_Scale(struct CalCoreAnimation *self, float factor);//****************************************************************************//// CalCoreMorphAnimation wrapper functions declaration                             //

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -