This commit is contained in:
Glenn Maynard
2004-08-19 00:16:50 +00:00
parent 19207b986e
commit b0084f0951
3 changed files with 15 additions and 15 deletions
+1 -15
View File
@@ -104,21 +104,7 @@ void Model::LoadPieces( CString sMeshesPath, CString sMaterialsPath, CString sBo
//
// Setup temp vertices (if necessary)
//
bool bHasAnyPerVertexBones = false;
for( unsigned i = 0; i < m_pGeometry->m_Meshes.size(); ++i )
{
const msMesh& mesh = m_pGeometry->m_Meshes[i];
for( unsigned j = 0; j < mesh.Vertices.size(); ++j )
{
if( mesh.Vertices[j].bone != -1 )
{
bHasAnyPerVertexBones = true;
break;
}
}
}
if( bHasAnyPerVertexBones )
if( m_pGeometry->HasAnyPerVertexBones() )
{
m_vTempMeshes = m_pGeometry->m_Meshes;
m_pTempGeometry = DISPLAY->CreateCompiledGeometry();
+13
View File
@@ -56,6 +56,19 @@ void RageModelGeometry::OptimizeBones()
}
}
bool RageModelGeometry::HasAnyPerVertexBones() const
{
for( unsigned i = 0; i < m_Meshes.size(); ++i )
{
const msMesh& mesh = m_Meshes[i];
for( unsigned j = 0; j < mesh.Vertices.size(); ++j )
if( mesh.Vertices[j].bone != -1 )
return true;
}
return false;
}
#define THROW RageException::Throw( "Parse error in \"%s\" at line %d: '%s'", sPath.c_str(), iLineNum, sLine.c_str() );
void RageModelGeometry::LoadMilkshapeAscii( CString sPath )
+1
View File
@@ -20,6 +20,7 @@ public:
public:
void LoadMilkshapeAscii( CString sMilkshapeAsciiFile );
void OptimizeBones();
bool HasAnyPerVertexBones() const;
int m_iRefCount;