mirror of
https://github.com/lubosz/overte.git
synced 2025-04-10 04:52:17 +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;
|
||||
}
|
||||
|
||||
QVector<int> AnimSkeleton::getChildrenOfJoint(int jointIndex) const {
|
||||
std::vector<int> AnimSkeleton::getChildrenOfJoint(int jointIndex) const {
|
||||
// Children and grandchildren, etc.
|
||||
QVector<int> result;
|
||||
for (int i = jointIndex + 1; i < (int)_joints.size(); i++) {
|
||||
if (_joints[i].parentIndex == jointIndex || result.contains(_joints[i].parentIndex)) {
|
||||
result.push_back(i);
|
||||
std::vector<int> result;
|
||||
if (jointIndex != -1) {
|
||||
for (int i = jointIndex + 1; i < (int)_joints.size(); i++) {
|
||||
if (_joints[i].parentIndex == jointIndex
|
||||
|| (std::find(result.begin(), result.end(), _joints[i].parentIndex) != result.end())) {
|
||||
result.push_back(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
const AnimPose& getPostRotationPose(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;
|
||||
|
||||
|
|
|
@ -269,8 +269,8 @@ protected:
|
|||
|
||||
int _leftEyeJointIndex { -1 };
|
||||
int _rightEyeJointIndex { -1 };
|
||||
QVector<int> _leftEyeJointChildren;
|
||||
QVector<int> _rightEyeJointChildren;
|
||||
std::vector<int> _leftEyeJointChildren;
|
||||
std::vector<int> _rightEyeJointChildren;
|
||||
|
||||
int _leftHandJointIndex { -1 };
|
||||
int _leftElbowJointIndex { -1 };
|
||||
|
|
Loading…
Reference in a new issue