47 uint AddJoint(
const string_view &inName,
const string_view &inParentName = string_view()) { mJoints.emplace_back(inName, inParentName, -1);
return (
uint)mJoints.size() - 1; }
48 uint AddJoint(
const string_view &inName,
int inParentIndex) { mJoints.emplace_back(inName, inParentIndex >= 0? mJoints[inParentIndex].mName :
String(), inParentIndex);
return (
uint)mJoints.size() - 1; }
52 int GetJointIndex(
const string_view &inName)
const;
55 void CalculateParentJointIndices();
59 bool AreJointsCorrectlyOrdered()
const;
62 void SaveBinaryState(
StreamOut &inStream)
const;
65 static SkeletonResult sRestoreFromBinaryState(
StreamIn &inStream);
#define JPH_EXPORT
Definition Core.h:275
unsigned int uint
Definition Core.h:500
#define JPH_NAMESPACE_END
Definition Core.h:425
#define JPH_NAMESPACE_BEGIN
Definition Core.h:419
std::basic_string< char, std::char_traits< char >, STLAllocator< char > > String
Definition STLAllocator.h:107
#define JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(linkage, class_name)
Definition SerializableObject.h:80
Helper class that either contains a valid result or an error.
Definition Result.h:12
Declare internal structure for a joint.
Definition Skeleton.h:26
int mParentJointIndex
Index of parent joint (in mJoints) or -1 if it has no parent.
Definition Skeleton.h:35
String mName
Name of the joint.
Definition Skeleton.h:33
String mParentName
Name of parent joint.
Definition Skeleton.h:34
Joint(const string_view &inName, const string_view &inParentName, int inParentJointIndex)
Definition Skeleton.h:31
Resource that contains the joint hierarchy for a skeleton.
Definition Skeleton.h:18
Result< Ref< Skeleton > > SkeletonResult
Definition Skeleton.h:22
int GetJointCount() const
Definition Skeleton.h:44
const JointVector & GetJoints() const
Definition Skeleton.h:42
Joint & GetJoint(int inJoint)
Definition Skeleton.h:46
JointVector & GetJoints()
Definition Skeleton.h:43
uint AddJoint(const string_view &inName, const string_view &inParentName=string_view())
Definition Skeleton.h:47
Array< Joint > JointVector
Definition Skeleton.h:38
uint AddJoint(const string_view &inName, int inParentIndex)
Definition Skeleton.h:48
const Joint & GetJoint(int inJoint) const
Definition Skeleton.h:45
Simple binary input stream.
Definition StreamIn.h:13
Simple binary output stream.
Definition StreamOut.h:13