mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:10:49 +02:00
Use std::vector<> instead of QVector
This commit is contained in:
parent
5acc605ba0
commit
945858876e
3 changed files with 11 additions and 8 deletions
|
@ -78,12 +78,15 @@ int AnimSkeleton::getParentIndex(int jointIndex) const {
|
||||||
return _joints[jointIndex].parentIndex;
|
return _joints[jointIndex].parentIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<int> AnimSkeleton::getChildrenOfJoint(int jointIndex) const {
|
std::vector<int> AnimSkeleton::getChildrenOfJoint(int jointIndex) const {
|
||||||
// Children and grandchildren, etc.
|
// Children and grandchildren, etc.
|
||||||
QVector<int> result;
|
std::vector<int> result;
|
||||||
for (int i = jointIndex + 1; i < (int)_joints.size(); i++) {
|
if (jointIndex != -1) {
|
||||||
if (_joints[i].parentIndex == jointIndex || result.contains(_joints[i].parentIndex)) {
|
for (int i = jointIndex + 1; i < (int)_joints.size(); i++) {
|
||||||
result.push_back(i);
|
if (_joints[i].parentIndex == jointIndex
|
||||||
|
|| (std::find(result.begin(), result.end(), _joints[i].parentIndex) != result.end())) {
|
||||||
|
result.push_back(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
const AnimPose& getPostRotationPose(int jointIndex) const;
|
const AnimPose& getPostRotationPose(int jointIndex) const;
|
||||||
|
|
||||||
int getParentIndex(int jointIndex) const;
|
int getParentIndex(int jointIndex) const;
|
||||||
QVector<int> getChildrenOfJoint(int jointIndex) const;
|
std::vector<int> getChildrenOfJoint(int jointIndex) const;
|
||||||
|
|
||||||
AnimPose getAbsolutePose(int jointIndex, const AnimPoseVec& relativePoses) const;
|
AnimPose getAbsolutePose(int jointIndex, const AnimPoseVec& relativePoses) const;
|
||||||
|
|
||||||
|
|
|
@ -269,8 +269,8 @@ protected:
|
||||||
|
|
||||||
int _leftEyeJointIndex { -1 };
|
int _leftEyeJointIndex { -1 };
|
||||||
int _rightEyeJointIndex { -1 };
|
int _rightEyeJointIndex { -1 };
|
||||||
QVector<int> _leftEyeJointChildren;
|
std::vector<int> _leftEyeJointChildren;
|
||||||
QVector<int> _rightEyeJointChildren;
|
std::vector<int> _rightEyeJointChildren;
|
||||||
|
|
||||||
int _leftHandJointIndex { -1 };
|
int _leftHandJointIndex { -1 };
|
||||||
int _leftElbowJointIndex { -1 };
|
int _leftElbowJointIndex { -1 };
|
||||||
|
|
Loading…
Reference in a new issue