mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Initial checkin
This commit is contained in:
parent
c74712dad9
commit
078564ac9e
3242 changed files with 1616395 additions and 0 deletions
30
BeefySysLib/gfx/ModelInstance.cpp
Normal file
30
BeefySysLib/gfx/ModelInstance.cpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
#include "ModelInstance.h"
|
||||
|
||||
USING_NS_BF;
|
||||
|
||||
ModelInstance::ModelInstance(ModelDef* modelDef)
|
||||
{
|
||||
mNext = NULL;
|
||||
mModelDef = modelDef;
|
||||
mJointTranslations.resize(mModelDef->mJoints.size());
|
||||
mMeshesVisible.insert(mMeshesVisible.begin(), mModelDef->mMeshes.size(), true);
|
||||
}
|
||||
|
||||
void Beefy::ModelInstance::SetJointPosition(int jointIdx, const ModelJointTranslation& jointTranslation)
|
||||
{
|
||||
mJointTranslations[jointIdx] = jointTranslation;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
BF_EXPORT void BF_CALLTYPE ModelInstance_SetJointTranslation(ModelInstance* modelInstance, int jointIdx, const ModelJointTranslation& jointTranslation)
|
||||
{
|
||||
modelInstance->SetJointPosition(jointIdx, jointTranslation);
|
||||
}
|
||||
|
||||
BF_EXPORT void BF_CALLTYPE ModelInstance_SetMeshVisibility(ModelInstance* modelInstance, int meshIdx, int visible)
|
||||
{
|
||||
modelInstance->mMeshesVisible[meshIdx] = visible != 0;
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue