Esempio n. 1
0
void CGrannyMesh::DeformPNTVertices(void * dstBaseVertices, D3DXMATRIX * boneMatrices, granny_mesh_binding* pgrnMeshBinding) const
{
	assert(dstBaseVertices != NULL);
	assert(boneMatrices != NULL);
	assert(m_pgrnMeshDeformer != NULL);

	const granny_mesh * pgrnMesh = GetGrannyMeshPointer();

	TPNTVertex * srcVertices = (TPNTVertex *) GrannyGetMeshVertices(pgrnMesh);
	TPNTVertex * dstVertices = ((TPNTVertex *) dstBaseVertices) + m_vtxBasePos;
	
	int vtxCount = GrannyGetMeshVertexCount(pgrnMesh);

	// WORK
	int * boneIndices = (int*)GrannyGetMeshBindingToBoneIndices(pgrnMeshBinding);
	// END_OF_WORK

	GrannyDeformVertices(
		m_pgrnMeshDeformer, 
		boneIndices, 
		(float *)boneMatrices,
		vtxCount,
		srcVertices,
		dstVertices);
}
int* CGrannyModelInstance::__GetMeshBoneIndices(unsigned int iMeshBinding) const
{
	assert(iMeshBinding<m_vct_pgrnMeshBinding.size());
	return GrannyGetMeshBindingToBoneIndices(m_vct_pgrnMeshBinding[iMeshBinding]);
}
Esempio n. 3
0
// WORK
int * CGrannyMesh::GetDefaultBoneIndices() const
{
	return (int*)GrannyGetMeshBindingToBoneIndices(m_pgrnMeshBindingTemp);
}