(VertexMapper) Updated interface
Added access parameter Removed useless GetVertexCount method Former-commit-id: 670d16ed9668eb5df476a592929ed9c364b1f11a
This commit is contained in:
@@ -25,12 +25,12 @@ void NzStaticMesh::Center()
|
||||
{
|
||||
NzVector3f offset(m_aabb.x + m_aabb.width/2.f, m_aabb.y + m_aabb.height/2.f, m_aabb.z + m_aabb.depth/2.f);
|
||||
|
||||
NzVertexMapper mapper(this);
|
||||
NzVertexMapper mapper(m_vertexBuffer);
|
||||
NzSparsePtr<NzVector3f> position = mapper.GetComponentPtr<NzVector3f>(nzVertexComponent_Position);
|
||||
|
||||
unsigned int vertexCount = mapper.GetVertexCount();
|
||||
unsigned int vertexCount = m_vertexBuffer->GetVertexCount();
|
||||
for (unsigned int i = 0; i < vertexCount; ++i)
|
||||
position[i] -= offset;
|
||||
*position++ -= offset;
|
||||
|
||||
m_aabb.x -= offset.x;
|
||||
m_aabb.y -= offset.y;
|
||||
|
||||
Reference in New Issue
Block a user