Utility/Skeleton: Add GetRootJoint method
This commit is contained in:
committed by
Jérôme Leclercq
parent
7ada266917
commit
8d39441bd1
@@ -45,6 +45,8 @@ namespace Nz
|
||||
const Joint* GetJoints() const;
|
||||
std::size_t GetJointCount() const;
|
||||
std::size_t GetJointIndex(const std::string& jointName) const;
|
||||
Joint* GetRootJoint();
|
||||
const Joint* GetRootJoints() const;
|
||||
|
||||
void Interpolate(const Skeleton& skeletonA, const Skeleton& skeletonB, float interpolation);
|
||||
void Interpolate(const Skeleton& skeletonA, const Skeleton& skeletonB, float interpolation, const std::size_t* indices, std::size_t indiceCount);
|
||||
|
||||
@@ -146,6 +146,22 @@ namespace Nz
|
||||
return it->second;
|
||||
}
|
||||
|
||||
Joint* Skeleton::GetRootJoint()
|
||||
{
|
||||
NazaraAssert(m_impl, "skeleton must have been created");
|
||||
|
||||
assert(!m_impl->joints.empty());
|
||||
return &m_impl->joints.front();
|
||||
}
|
||||
|
||||
const Joint* Skeleton::GetRootJoint() const
|
||||
{
|
||||
NazaraAssert(m_impl, "skeleton must have been created");
|
||||
|
||||
assert(!m_impl->joints.empty());
|
||||
return &m_impl->joints.front();
|
||||
}
|
||||
|
||||
void Skeleton::Interpolate(const Skeleton& skeletonA, const Skeleton& skeletonB, float interpolation)
|
||||
{
|
||||
NazaraAssert(m_impl, "skeleton must have been created");
|
||||
|
||||
Reference in New Issue
Block a user