Made idRenderModelGLTF::rootID private

This commit is contained in:
Robert Beckebans 2023-04-08 15:17:07 +02:00
parent d2115c1a07
commit bc5b4d97e9
2 changed files with 14 additions and 6 deletions

View file

@ -367,7 +367,7 @@ void idRenderModelGLTF::InitFromFile( const char* fileName, const idImportOption
auto nodes = data->NodeList();
assert( nodes.Num() );
//determine root node
// determine root node
if( !meshName[0] && data->MeshList().Num() )
{
gltfMesh* firstMesh = data->MeshList()[0];
@ -735,7 +735,7 @@ static bool GatherBoneInfo( gltfData* data, gltfAnimation* gltfAnim, idList<int,
{
//Gather Bones;
bool boneLess = false;
int targetNode = lastMeshFromFile->rootID;
int targetNode = lastMeshFromFile->GetRootID();
auto skin = data->GetSkin( gltfAnim );
auto targets = data->GetAnimTargets( gltfAnim );

View file

@ -54,16 +54,24 @@ public:
{
return true;
}
static idFile_Memory* GetAnimBin( const idStr& animName, const ID_TIME_T sourceTimeStamp, const idImportOptions* options );
int rootID;
static idFile_Memory* GetAnimBin( const idStr& animName, const ID_TIME_T sourceTimeStamp, const idImportOptions* options );
int GetRootID() const
{
return rootID;
}
private:
void ProcessNode_r( gltfNode* modelNode, const idMat4& parentTransform, const idMat4& globalTransform, gltfData* data );
void UpdateSurface( const struct renderEntity_s* ent, const idJointMat* entJoints, const idJointMat* entJointsInverted, modelSurface_t* surf, const modelSurface_t& sourceSurf );
void UpdateMd5Joints();
const idMD5Joint* FindMD5Joint( const idStr& name ) const;
gltfData* data;
gltfNode* root;
gltfData* data;
gltfNode* root;
int rootID;
bool fileExclusive;
bool hasAnimations;