cleanup
This commit is contained in:
@@ -488,11 +488,11 @@ void Model::DrawMesh( int i ) const
|
||||
const msMesh *pMesh = &m_pGeometry->m_Meshes[i];
|
||||
|
||||
// apply mesh-specific bone (if any)
|
||||
if( pMesh->nBoneIndex != -1 )
|
||||
if( pMesh->m_iBoneIndex != -1 )
|
||||
{
|
||||
DISPLAY->PushMatrix();
|
||||
|
||||
const RageMatrix &mat = m_vpBones[pMesh->nBoneIndex].m_Final;
|
||||
const RageMatrix &mat = m_vpBones[pMesh->m_iBoneIndex].m_Final;
|
||||
DISPLAY->PreMultMatrix( mat );
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ void Model::DrawMesh( int i ) const
|
||||
const RageCompiledGeometry* TempGeometry = m_pTempGeometry ? m_pTempGeometry : m_pGeometry->m_pCompiledGeometry;
|
||||
DISPLAY->DrawCompiledGeometry( TempGeometry, i, m_pGeometry->m_Meshes );
|
||||
|
||||
if( pMesh->nBoneIndex != -1 )
|
||||
if( pMesh->m_iBoneIndex != -1 )
|
||||
DISPLAY->PopMatrix();
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ void Model::PlayAnimation( const RString &sAniName, float fPlayRate )
|
||||
vector<RageModelVertex> &Vertices = pMesh->Vertices;
|
||||
for( unsigned j = 0; j < Vertices.size(); j++ )
|
||||
{
|
||||
// int nBoneIndex = (pMesh->nBoneIndex!=-1) ? pMesh->nBoneIndex : bone;
|
||||
// int iBoneIndex = (pMesh->m_iBoneIndex!=-1) ? pMesh->m_iBoneIndex : bone;
|
||||
RageVector3 &pos = Vertices[j].p;
|
||||
int8_t bone = Vertices[j].bone;
|
||||
if( bone != -1 )
|
||||
|
||||
@@ -21,7 +21,7 @@ struct msMesh
|
||||
// OPTIMIZATION: If all verts in a mesh are transformed by the same bone,
|
||||
// then send the transform to the graphics card for the whole mesh instead
|
||||
// of transforming each vertex on the CPU;
|
||||
char nBoneIndex; // -1 = no bone
|
||||
char m_iBoneIndex; // -1 = no bone
|
||||
|
||||
vector<msTriangle> Triangles;
|
||||
};
|
||||
|
||||
@@ -30,11 +30,11 @@ void RageModelGeometry::OptimizeBones()
|
||||
// check to see if all vertices have the same bone index
|
||||
bool bAllVertsUseSameBone = true;
|
||||
|
||||
char nBoneIndex = mesh.Vertices[0].bone;
|
||||
char iBoneIndex = mesh.Vertices[0].bone;
|
||||
|
||||
for (unsigned j = 1; j < mesh.Vertices.size(); j++)
|
||||
{
|
||||
if( mesh.Vertices[j].bone != nBoneIndex )
|
||||
if( mesh.Vertices[j].bone != iBoneIndex )
|
||||
{
|
||||
bAllVertsUseSameBone = false;
|
||||
break;
|
||||
@@ -43,7 +43,7 @@ void RageModelGeometry::OptimizeBones()
|
||||
|
||||
if( bAllVertsUseSameBone )
|
||||
{
|
||||
mesh.nBoneIndex = nBoneIndex;
|
||||
mesh.m_iBoneIndex = iBoneIndex;
|
||||
|
||||
// clear all vertex/bone associations;
|
||||
for (unsigned j = 0; j < mesh.Vertices.size(); j++)
|
||||
@@ -149,7 +149,7 @@ void RageModelGeometry::LoadMilkshapeAscii( const RString& _sPath, bool bNeedsNo
|
||||
// mesh.nFlags = nFlags;
|
||||
mesh.nMaterialIndex = (uint8_t) nIndex;
|
||||
|
||||
mesh.nBoneIndex = -1;
|
||||
mesh.m_iBoneIndex = -1;
|
||||
|
||||
//
|
||||
// vertices
|
||||
|
||||
Reference in New Issue
Block a user