New mesh policy

Former-commit-id: cc5854d55e1e4bb83e5e081434b87ec22fcb8bff
This commit is contained in:
Lynix
2013-03-02 00:17:40 +01:00
parent 347b267d43
commit 0df64e03ae
19 changed files with 132 additions and 209 deletions

View File

@@ -63,6 +63,8 @@ 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.MakeZero();
NzMeshVertex* vertex = reinterpret_cast<NzMeshVertex*>(mapper.GetPointer());
unsigned int vertexCount = m_vertexBuffer->GetVertexCount();
for (unsigned int i = 0; i < vertexCount; ++i)
@@ -99,6 +101,11 @@ const NzVertexBuffer* NzStaticMesh::GetVertexBuffer() const
return m_vertexBuffer;
}
unsigned int NzStaticMesh::GetVertexCount() const
{
return m_vertexBuffer->GetVertexCount();
}
bool NzStaticMesh::IsAnimated() const
{
return false;