Really fixed AABBs
Former-commit-id: 003979537f2ea5362849df8a65611739aea6d298
This commit is contained in:
parent
a3f8d058ec
commit
ca5fb44ecf
|
|
@ -10,7 +10,7 @@ NzBoxf NzComputeVerticesAABB(const T* vertices, unsigned int vertexCount)
|
|||
NzBoxf aabb;
|
||||
if (vertexCount > 0)
|
||||
{
|
||||
aabb.Set(vertices->position);
|
||||
aabb.Set(vertices->position.x, vertices->position.y, vertices->position.z, 0.f, 0.f, 0.f);
|
||||
vertices++;
|
||||
|
||||
for (unsigned int i = 1; i < vertexCount; ++i)
|
||||
|
|
|
|||
|
|
@ -68,7 +68,8 @@ const NzBoxf& NzSkeleton::GetAABB() const
|
|||
unsigned int jointCount = m_impl->joints.size();
|
||||
if (jointCount > 0)
|
||||
{
|
||||
m_impl->aabb.Set(m_impl->joints[0].GetPosition());
|
||||
NzVector3f pos = m_impl->joints[0].GetPosition();
|
||||
m_impl->aabb.Set(pos.x, pos.y, pos.z, 0.f, 0.f, 0.f);
|
||||
for (unsigned int i = 1; i < jointCount; ++i)
|
||||
m_impl->aabb.ExtendTo(m_impl->joints[i].GetPosition());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue