Updated ComputeAAB and TransformVertices functions
They now take sparse pointers instead of template type Former-commit-id: 92a3de59b6a321136b8bad324048239f83381534
This commit is contained in:
@@ -67,8 +67,8 @@ void NzStaticMesh::Destroy()
|
||||
bool NzStaticMesh::GenerateAABB()
|
||||
{
|
||||
// On lock le buffer pour itérer sur toutes les positions et composer notre AABB
|
||||
NzBufferMapper<NzVertexBuffer> mapper(m_vertexBuffer, nzBufferAccess_ReadOnly);
|
||||
m_aabb = NzComputeAABB(static_cast<const NzMeshVertex*>(mapper.GetPointer()), m_vertexBuffer->GetVertexCount());
|
||||
NzVertexMapper mapper(m_vertexBuffer, nzBufferAccess_ReadOnly);
|
||||
m_aabb = NzComputeAABB(mapper.GetComponentPtr<const NzVector3f>(nzVertexComponent_Position), m_vertexBuffer->GetVertexCount());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user