Utility/Skeleton: Add GetRootJoint method
This commit is contained in:
parent
7ada266917
commit
8d39441bd1
|
|
@ -45,6 +45,8 @@ namespace Nz
|
||||||
const Joint* GetJoints() const;
|
const Joint* GetJoints() const;
|
||||||
std::size_t GetJointCount() const;
|
std::size_t GetJointCount() const;
|
||||||
std::size_t GetJointIndex(const std::string& jointName) 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);
|
||||||
void Interpolate(const Skeleton& skeletonA, const Skeleton& skeletonB, float interpolation, const std::size_t* indices, std::size_t indiceCount);
|
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;
|
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)
|
void Skeleton::Interpolate(const Skeleton& skeletonA, const Skeleton& skeletonB, float interpolation)
|
||||||
{
|
{
|
||||||
NazaraAssert(m_impl, "skeleton must have been created");
|
NazaraAssert(m_impl, "skeleton must have been created");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue