Made bounding volume handing part of SceneNodes
Former-commit-id: d09d06ac4515ce09aa16fd92dd045c2a06730a99
This commit is contained in:
@@ -325,6 +325,11 @@ NzSkeletalModel& NzSkeletalModel::operator=(NzSkeletalModel&& node)
|
||||
return *this;
|
||||
}
|
||||
|
||||
void NzSkeletalModel::MakeBoundingVolume() const
|
||||
{
|
||||
m_boundingVolume.Set(m_skeleton.GetAABB());
|
||||
}
|
||||
|
||||
void NzSkeletalModel::Register()
|
||||
{
|
||||
if (m_animation)
|
||||
@@ -342,16 +347,4 @@ void NzSkeletalModel::Update()
|
||||
AdvanceAnimation(m_scene->GetUpdateTime());
|
||||
}
|
||||
|
||||
void NzSkeletalModel::UpdateBoundingVolume() const
|
||||
{
|
||||
if (m_boundingVolume.IsNull())
|
||||
m_boundingVolume.Set(m_skeleton.GetAABB());
|
||||
|
||||
if (!m_transformMatrixUpdated)
|
||||
UpdateTransformMatrix();
|
||||
|
||||
m_boundingVolume.Update(m_transformMatrix);
|
||||
m_boundingVolumeUpdated = true;
|
||||
}
|
||||
|
||||
NzSkeletalModelLoader::LoaderList NzSkeletalModel::s_loaders;
|
||||
|
||||
Reference in New Issue
Block a user