Sources/CcgDump/CrySkinBuilderBase.cpp
//////////////////////////////////////////////////////////////////////////
// computes the max number of bone affecting a vertex + 1
// and the total number of links to smooth vertices - the sum of numbers of links of all smooth vertices
// the total number of links per all vertices. If the whole object is rigid,
// this is the same as the number of vertices

computes the max number of bone affecting a vertex + 1
and the total number of links to smooth vertices - the sum of numbers of links of all smooth vertices
the total number of links per all vertices. If the whole object is rigid,
this is the same as the number of vertices
computes the max number of bone affecting a vertex + 1 and the total number of links to smooth vertices - the sum of numbers of links of all smooth vertices the total number of links per all vertices . If the whole object is rigid this is the same as the number of vertices
void CrySkinBuilderBase::preprocess()
{
	m_numBones = 0;
	m_numSmoothLinks = 0;
	m_numLinks = 0;
	unsigned numVertices = m_pGeometry->numVertices();
	for (unsigned nVert = 0; nVert < numVertices; ++nVert)
	{
		unsigned numVertexLinks = (unsigned)m_pGeometry->getLink(nVert).size();
		if (numVertexLinks > 1)
			m_numSmoothLinks += numVertexLinks;
		m_numBones = max(m_pGeometry->getLink(nVert).maxBoneID(), m_numBones);
		m_numLinks += numVertexLinks;
	}
	++m_numBones;
}
void CrySkinBuilderBase :: preprocess ( ) { m_numBones = 0 ; m_numSmoothLinks = 0 ; m_numLinks = 0 ; unsigned numVertices = m_pGeometry -> numVertices ( ) ; for ( unsigned nVert = 0 ; nVert < numVertices ; ++ nVert ) { unsigned numVertexLinks = ( unsigned ) m_pGeometry -> getLink ( nVert ) . size ( ) ; if ( numVertexLinks > 1 ) m_numSmoothLinks += numVertexLinks ; m_numBones = max ( m_pGeometry -> getLink ( nVert ) . maxBoneID ( ) , m_numBones ) ; m_numLinks += numVertexLinks ; } ++ m_numBones ; }
computes the max number of bone affecting a vertex + 1
and the total number of links to smooth vertices - the sum of numbers of links of all smooth vertices
the total number of links per all vertices.
computes the max number of bone affecting a vertex + 1 and the total number of links to smooth vertices - the sum of numbers of links of all smooth vertices the total number of links per all vertices .
// we need for each bone:
 // Vert:
 //  RigidVertex for each rigid vertex, and SmoothVertex for each smooth vertex
 // Aux:
 //  3 counts of vertices in each group
 //  index of target for each smooth vertex
 // the number of links for this vertex
 // if the vertex is smooth, we'll need to keep the weights and destination indices
