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

📄 cal3d_wrapper.cpp

📁 Cal3D实现虚拟角色 Cal3D实现虚拟角色
💻 CPP
📖 第 1 页 / 共 3 页
字号:
  return self->getCoreAnimationCount();}CalCoreMaterial *CalCoreModel_GetCoreMaterial(CalCoreModel *self, int coreMaterialId){  return self->getCoreMaterial(coreMaterialId);}int CalCoreModel_GetCoreMaterialCount(CalCoreModel *self){  return self->getCoreMaterialCount();}int CalCoreModel_GetCoreMaterialId(CalCoreModel *self, int coreMaterialThreadId, int coreMaterialSetId){  return self->getCoreMaterialId(coreMaterialThreadId, coreMaterialSetId);}CalCoreMesh *CalCoreModel_GetCoreMesh(CalCoreModel *self, int coreMeshId){  return self->getCoreMesh(coreMeshId);}int CalCoreModel_GetCoreMeshCount(CalCoreModel *self){  return self->getCoreMeshCount();}CalCoreSkeleton *CalCoreModel_GetCoreSkeleton(CalCoreModel *self){  return self->getCoreSkeleton();}CalUserData CalCoreModel_GetUserData(CalCoreModel *self){  return self->getUserData();}int CalCoreModel_GetCoreMorphAnimationCount(CalCoreModel *self){  return self->getCoreMorphAnimationCount();}int CalCoreModel_LoadCoreAnimation(CalCoreModel *self, char *strFilename){  return self->loadCoreAnimation(strFilename);}int CalCoreModel_LoadCoreMaterial(CalCoreModel *self, char *strFilename){  return self->loadCoreMaterial(strFilename);}int CalCoreModel_LoadCoreMesh(CalCoreModel *self, char *strFilename){  return self->loadCoreMesh(strFilename);}Boolean CalCoreModel_LoadCoreSkeleton(CalCoreModel *self, char *strFilename){  return self->loadCoreSkeleton(strFilename) ? True : False;}CalCoreModel *CalCoreModel_New(const char* name){  return new CalCoreModel(name);}Boolean CalCoreModel_SaveCoreAnimation(CalCoreModel *self, char *strFilename, int coreAnimationId){  return self->saveCoreAnimation(strFilename, coreAnimationId) ? True : False;}Boolean CalCoreModel_SaveCoreMaterial(CalCoreModel *self, char *strFilename, int coreMaterialId){  return self->saveCoreMaterial(strFilename, coreMaterialId) ? True : False;}Boolean CalCoreModel_SaveCoreMesh(CalCoreModel *self, char *strFilename, int coreMeshId){  return self->saveCoreMesh(strFilename, coreMeshId) ? True : False;}Boolean CalCoreModel_SaveCoreSkeleton(CalCoreModel *self, char *strFilename){  return self->saveCoreSkeleton(strFilename) ? True : False;}Boolean CalCoreModel_SetCoreMaterialId(CalCoreModel *self, int coreMaterialThreadId, int coreMaterialSetId, int coreMaterialId){  return self->setCoreMaterialId(coreMaterialThreadId, coreMaterialSetId, coreMaterialId) ? True : False;}void CalCoreModel_SetCoreSkeleton(CalCoreModel *self, CalCoreSkeleton *pCoreSkeleton){  self->setCoreSkeleton(pCoreSkeleton);}void CalCoreModel_SetUserData(CalCoreModel *self, CalUserData userData){  self->setUserData(userData);}//****************************************************************************//// CalCoreSkeleton wrapper functions definition                               ////****************************************************************************//int CalCoreSkeleton_AddCoreBone(CalCoreSkeleton *self, CalCoreBone *pCoreBone){  return self->addCoreBone(pCoreBone);}void CalCoreSkeleton_CalculateState(CalCoreSkeleton *self){  self->calculateState();}CalCoreSkeleton *CalCoreSkeleton_New(){    return explicitIncRef(new CalCoreSkeleton());}void CalCoreSkeleton_Delete(CalCoreSkeleton *self){    explicitDecRef(self);}CalCoreBone *CalCoreSkeleton_GetCoreBone(CalCoreSkeleton *self, int coreBoneId){  return self->getCoreBone(coreBoneId);}int CalCoreSkeleton_GetCoreBoneId(CalCoreSkeleton *self, char *strName){  return self->getCoreBoneId(strName);}/*std::list<int>& CalCoreSkeleton_GetListRootCoreBoneId(CalCoreSkeleton *self){  return self->getlistRootCoreBoneId();}*//*std::vector<CalCoreBone *>& CalCoreSkeleton_GetVectorCoreBone(CalCoreSkeleton *self){  return self->getVectorCoreBone();}*/void CalCoreSkeleton_Scale(CalCoreSkeleton *self,float factor){	self->scale(factor);}void CalSkeleton_GetBoneBoundingBox(CalSkeleton *self, float *min, float *max){	self->getBoneBoundingBox(min, max);}void CalSkeleton_CalculateBoundingBoxes(CalSkeleton *self){	self->calculateBoundingBoxes();}//****************************************************************************//// CalCoreSubmesh wrapper functions definition                                ////****************************************************************************//void CalCoreSubmesh_Delete(CalCoreSubmesh *self){  delete self;}int CalCoreSubmesh_GetCoreMaterialThreadId(CalCoreSubmesh *self){  return self->getCoreMaterialThreadId();}int CalCoreSubmesh_GetFaceCount(CalCoreSubmesh *self){  return self->getFaceCount();}int CalCoreSubmesh_GetLodCount(CalCoreSubmesh *self){  return self->getLodCount();}int CalCoreSubmesh_GetSpringCount(CalCoreSubmesh *self){  return self->getSpringCount();}/*std::vector<CalCoreSubmesh::Face>& CalCoreSubmesh_GetVectorFace(CalCoreSubmesh *self){  return self->getVectorFace();}*//*std::vector<CalCoreSubmesh::PhysicalProperty>& CalCoreSubmesh_GetVectorPhysicalProperty(CalCoreSubmesh *self){  return self->getVectorPhysicalProperty();}*//*std::vector<CalCoreSubmesh::Spring>& CalCoreSubmesh_GetVectorSpring(CalCoreSubmesh *self){  return self->getVectorSpring();}*//*std::vector<std::vector<CalCoreSubmesh::TextureCoordinate> >& CalCoreSubmesh_GetVectorVectorTextureCoordinate(CalCoreSubmesh *self){  return self->getVectorVectorTextureCoordinate();}*//*std::vector<CalCoreSubmesh::Vertex>& CalCoreSubmesh_GetVectorVertex(CalCoreSubmesh *self){  return self->getVectorVertex();}*/int CalCoreSubmesh_GetVertexCount(CalCoreSubmesh *self){  return self->getVertexCount();}CalCoreSubmesh *CalCoreSubmesh_New(){  return new CalCoreSubmesh();}Boolean CalCoreSubmesh_Reserve(CalCoreSubmesh *self, int vertexCount, int textureCoordinateCount, int faceCount, int springCount){  return self->reserve(vertexCount, textureCoordinateCount, faceCount, springCount) ? True : False;}void CalCoreSubmesh_SetCoreMaterialThreadId(CalCoreSubmesh *self, int coreMaterialThreadId){  self->setCoreMaterialThreadId(coreMaterialThreadId);}/*Boolean CalCoreSubmesh_SetFace(CalCoreSubmesh *self, int faceId, CalCoreSubmesh::Face *pFace){  return self->setFace(faceId, *pFace) ? True : False;}*/void CalCoreSubmesh_SetLodCount(CalCoreSubmesh *self, int lodCount){  self->setLodCount(lodCount);}/*Boolean CalCoreSubmesh_SetPhysicalProperty(CalCoreSubmesh *self, int vertexId, CalCoreSubmesh::PhysicalProperty *pPhysicalProperty){  return self->setPhysicalProperty(vertexId, *pPhysicalProperty) ? True : False;}*//*Boolean CalCoreSubmesh_SetSpring(CalCoreSubmesh *self, int springId, CalCoreSubmesh::Spring *pSpring){  return self->setSpring(springId, *pSpring) ? True : False;}*//*Boolean CalCoreSubmesh_SetTextureCoordinate(CalCoreSubmesh *self, int vertexId, int textureCoordinateId, CalCoreSubmesh::TextureCoordinate *pTextureCoordinate){  return self->setTextureCoordinate(vertexId, textureCoordinateId, *pTextureCoordinate) ? True : False;}*//*Boolean CalCoreSubmesh_SetVertex(CalCoreSubmesh *self, int vertexId, CalCoreSubmesh::Vertex *pVertex){  return self->setVertex(vertexId, *pVertex) ? True : False;}*/Boolean CalCoreSubmesh_IsTangentsEnabled(CalCoreSubmesh *self, int mapId){  return self->isTangentsEnabled(mapId) ? True : False;}Boolean CalCoreSubmesh_EnableTangents(CalCoreSubmesh *self, int mapId, bool enabled){  return self->enableTangents(mapId, enabled) ? True : False;}//****************************************************************************//// CalError wrapper functions definition                                      ////****************************************************************************//CalErrorCode CalError_GetLastErrorCode(){  return (CalErrorCode)CalError::getLastErrorCode();}char *CalError_GetLastErrorDescription(){  static std::string strDescription;  strDescription = CalError::getLastErrorDescription();  return const_cast<char *>(strDescription.c_str());}char *CalError_GetLastErrorFile(){  return const_cast<char *>(CalError::getLastErrorFile().c_str());}int CalError_GetLastErrorLine(){  return CalError::getLastErrorLine();}char *CalError_GetLastErrorText(){  return const_cast<char *>(CalError::getLastErrorText().c_str());}void CalError_PrintLastError(){  CalError::printLastError();}void CalError_SetLastError(CalErrorCode code, char *strFile, int line, char *strText){  CalError::setLastError((CalError::Code)code, strFile, line, strText);}//****************************************************************************//// CalLoader wrapper functions definition                                     ////****************************************************************************//void CalLoader_Delete(CalLoader *self){  delete self;}CalCoreAnimation *CalLoader_LoadCoreAnimation(CalLoader *self, char *strFilename){  return explicitIncRef(self->loadCoreAnimation(strFilename).get());}CalCoreMaterial *CalLoader_LoadCoreMaterial(CalLoader *self, char *strFilename){  return explicitIncRef(self->loadCoreMaterial(strFilename).get());}CalCoreMesh *CalLoader_LoadCoreMesh(CalLoader *self, char *strFilename){  return explicitIncRef(self->loadCoreMesh(strFilename).get());}CalCoreSkeleton *CalLoader_LoadCoreSkeleton(CalLoader *self, char *strFilename){  return explicitIncRef(self->loadCoreSkeleton(strFilename).get());}CalLoader *CalLoader_New(){  return new CalLoader();}//****************************************************************************//// CalMesh wrapper functions definition                                       ////****************************************************************************//void CalMesh_Delete(CalMesh *self){  delete self;}CalCoreMesh *CalMesh_GetCoreMesh(CalMesh *self){  return self->getCoreMesh();}CalSubmesh *CalMesh_GetSubmesh(CalMesh *self, int id){  return self->getSubmesh(id);}int CalMesh_GetSubmeshCount(CalMesh *self){  return self->getSubmeshCount();}/*std::vector<CalSubmesh *>& CalMesh_GetVectorSubmesh(CalMesh *self){  return self->getVectorSubmesh();}*/CalMesh *CalMesh_New(CalCoreMesh *pCoreMesh){  return new CalMesh(pCoreMesh);}void CalMesh_SetLodLevel(CalMesh *self, float lodLevel){  self->setLodLevel(lodLevel);}void CalMesh_SetMaterialSet(CalMesh *self, int setId){  self->setMaterialSet(setId);}void CalMesh_SetModel(CalMesh *self, CalModel *pModel){  self->setModel(pModel);}//****************************************************************************//// CalMixer wrapper functions definition                                      ////****************************************************************************//Boolean CalMixer_BlendCycle(CalMixer *self, int id, float weight, float delay){  return self->blendCycle(id, weight, delay) ? True : False;}Boolean CalMixer_ClearCycle(CalMixer *self, int id, float delay){  return self->clearCycle(id, delay) ? True : False;}void CalMixer_Delete(CalMixer *self){  delete self;}Boolean CalMixer_ExecuteAction(CalMixer *self, int id, float delayIn, float delayOut, enum Boolean autoLock){  return self->executeAction(id, delayIn, delayOut, 1.0f,  autoLock) ? True : False;}CalMixer *CalMixer_New(CalModel* pModel){  return new CalMixer(pModel);}void CalMixer_UpdateAnimation(CalMixer *self, float deltaTime){  self->updateAnimation(deltaTime);}void CalMixer_UpdateSkeleton(CalMixer *self){  self->updateSkeleton();}void CalMixer_RemoveAction(CalMixer *self,int id){  self->removeAction(id);}//****************************************************************************//// CalMorphTargetMixer wrapper functions definition                           ////****************************************************************************//Boolean CalMorphTargetMixer_Blend(struct CalMorphTargetMixer *self, int id, float weight, float delay){  return self->blend(id, weight, delay) ? True : False;}Boolean CalMorphTargetMixer_Clear(struct CalMorphTargetMixer *self, int id, float delay){  return self->clear(id, delay) ? True : False;}void CalMorphTargetMixer_Delete(struct CalMorphTargetMixer *self){  delete self;}struct CalMorphTargetMixer *CalMorphTargetMixer_New(struct CalModel *pModel){  return new CalMorphTargetMixer(pModel);}void CalMorphTargetMixer_Update(struct CalMorphTargetMixer *self, float deltaTime){  self->update(deltaTime);}int CalMorphTargetMixer_GetMorphTargetCount(struct CalMorphTargetMixer *self){  return self->getMorphTargetCount();}//****************************************************************************//// CalModel wrapper functions definition                                      ////****************************************************************************//Boolean CalModel_AttachMesh(CalModel *self, int coreMeshId){  return self->attachMesh(coreMeshId) ? True : False;}void CalModel_Delete(CalModel *self){  delete self;}Boolean CalModel_DetachMesh(CalModel *self, int coreMeshId){  return self->detachMesh(coreMeshId) ? True : False;}CalCoreModel *CalModel_GetCoreModel(CalModel *self){  return self->getCoreModel();}CalMesh *CalModel_GetMesh(CalModel *self, int coreMeshId){  return self->getMesh(coreMeshId);}CalMixer *CalModel_GetMixer(CalModel *self){  return self->getMixer();}CalMorphTargetMixer *CalModel_GetMorphTargetMixer(CalModel *self){  return self->getMorphTargetMixer();}CalPhysique *CalModel_GetPhysique(CalModel *self){  return self->getPhysique();}CalRenderer *CalModel_GetRenderer(CalModel *self){  return self->getRenderer();}CalSkeleton *CalModel_GetSkeleton(CalModel *self){  return self->getSkeleton();}CalSpringSystem *CalModel_GetSpringSystem(CalModel *self){  return self->getSpringSystem();}CalUserData CalModel_GetUserData(CalModel *self){  return self->getUserData();}/*

⌨️ 快捷键说明

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