mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 22:13:12 +02:00
cache indeces to toe joints
This commit is contained in:
parent
e1085a6cbb
commit
7f4e0c206c
2 changed files with 14 additions and 2 deletions
|
@ -1067,6 +1067,8 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
||||||
QString jointHeadID;
|
QString jointHeadID;
|
||||||
QString jointLeftHandID;
|
QString jointLeftHandID;
|
||||||
QString jointRightHandID;
|
QString jointRightHandID;
|
||||||
|
QString jointLeftToeID;
|
||||||
|
QString jointRightToeID;
|
||||||
|
|
||||||
QVector<QString> humanIKJointNames;
|
QVector<QString> humanIKJointNames;
|
||||||
for (int i = 0;; i++) {
|
for (int i = 0;; i++) {
|
||||||
|
@ -1166,11 +1168,17 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
||||||
} else if (name == jointHeadName) {
|
} else if (name == jointHeadName) {
|
||||||
jointHeadID = getID(object.properties);
|
jointHeadID = getID(object.properties);
|
||||||
|
|
||||||
} else if (name == jointLeftHandName) {
|
} else if (name == jointLeftHandName || name == "LeftHand" || name == "joint_L_hand") {
|
||||||
jointLeftHandID = getID(object.properties);
|
jointLeftHandID = getID(object.properties);
|
||||||
|
|
||||||
} else if (name == jointRightHandName) {
|
} else if (name == jointRightHandName || name == "RightHand" || name == "joint_R_hand") {
|
||||||
jointRightHandID = getID(object.properties);
|
jointRightHandID = getID(object.properties);
|
||||||
|
|
||||||
|
} else if (name == "LeftToe" || name == "joint_L_toe" || name == "LeftToe_End") {
|
||||||
|
jointLeftToeID = getID(object.properties);
|
||||||
|
|
||||||
|
} else if (name == "RightToe" || name == "joint_R_toe" || name == "RightToe_End") {
|
||||||
|
jointRightToeID = getID(object.properties);
|
||||||
}
|
}
|
||||||
int humanIKJointIndex = humanIKJointNames.indexOf(name);
|
int humanIKJointIndex = humanIKJointNames.indexOf(name);
|
||||||
if (humanIKJointIndex != -1) {
|
if (humanIKJointIndex != -1) {
|
||||||
|
@ -1595,6 +1603,8 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
||||||
geometry.headJointIndex = modelIDs.indexOf(jointHeadID);
|
geometry.headJointIndex = modelIDs.indexOf(jointHeadID);
|
||||||
geometry.leftHandJointIndex = modelIDs.indexOf(jointLeftHandID);
|
geometry.leftHandJointIndex = modelIDs.indexOf(jointLeftHandID);
|
||||||
geometry.rightHandJointIndex = modelIDs.indexOf(jointRightHandID);
|
geometry.rightHandJointIndex = modelIDs.indexOf(jointRightHandID);
|
||||||
|
geometry.leftToeJointIndex = modelIDs.indexOf(jointLeftToeID);
|
||||||
|
geometry.rightToeJointIndex = modelIDs.indexOf(jointRightToeID);
|
||||||
|
|
||||||
foreach (const QString& id, humanIKJointIDs) {
|
foreach (const QString& id, humanIKJointIDs) {
|
||||||
geometry.humanIKJointIndices.append(modelIDs.indexOf(id));
|
geometry.humanIKJointIndices.append(modelIDs.indexOf(id));
|
||||||
|
|
|
@ -201,6 +201,8 @@ public:
|
||||||
int headJointIndex;
|
int headJointIndex;
|
||||||
int leftHandJointIndex;
|
int leftHandJointIndex;
|
||||||
int rightHandJointIndex;
|
int rightHandJointIndex;
|
||||||
|
int leftToeJointIndex;
|
||||||
|
int rightToeJointIndex;
|
||||||
|
|
||||||
QVector<int> humanIKJointIndices;
|
QVector<int> humanIKJointIndices;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue