mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
warning fixes
This commit is contained in:
parent
1e276d113c
commit
be7a9a2383
4 changed files with 7 additions and 7 deletions
|
@ -23,12 +23,12 @@
|
|||
|
||||
AnimInverseKinematics::IKTargetVar::IKTargetVar(const QString& jointNameIn, const QString& positionVarIn, const QString& rotationVarIn,
|
||||
const QString& typeVarIn, const QString& weightVarIn, float weightIn, const std::vector<float>& flexCoefficientsIn) :
|
||||
jointName(jointNameIn),
|
||||
positionVar(positionVarIn),
|
||||
rotationVar(rotationVarIn),
|
||||
typeVar(typeVarIn),
|
||||
weightVar(weightVarIn),
|
||||
weight(weightIn),
|
||||
jointName(jointNameIn),
|
||||
numFlexCoefficients(flexCoefficientsIn.size()),
|
||||
jointIndex(-1)
|
||||
{
|
||||
|
@ -39,12 +39,12 @@ AnimInverseKinematics::IKTargetVar::IKTargetVar(const QString& jointNameIn, cons
|
|||
}
|
||||
|
||||
AnimInverseKinematics::IKTargetVar::IKTargetVar(const IKTargetVar& orig) :
|
||||
jointName(orig.jointName),
|
||||
positionVar(orig.positionVar),
|
||||
rotationVar(orig.rotationVar),
|
||||
typeVar(orig.typeVar),
|
||||
weightVar(orig.weightVar),
|
||||
weight(orig.weight),
|
||||
jointName(orig.jointName),
|
||||
numFlexCoefficients(orig.numFlexCoefficients),
|
||||
jointIndex(orig.jointIndex)
|
||||
{
|
||||
|
@ -305,7 +305,7 @@ int AnimInverseKinematics::solveTargetWithCCD(const IKTarget& target, AnimPoseVe
|
|||
// cache tip absolute position
|
||||
glm::vec3 tipPosition = absolutePoses[tipIndex].trans();
|
||||
|
||||
int chainDepth = 1;
|
||||
size_t chainDepth = 1;
|
||||
|
||||
// descend toward root, pivoting each joint to get tip closer to target position
|
||||
while (pivotIndex != _hipsIndex && pivotsParentIndex != -1) {
|
||||
|
|
|
@ -84,11 +84,11 @@ protected:
|
|||
const QString& typeVarIn, const QString& weightVarIn, float weightIn, const std::vector<float>& flexCoefficientsIn);
|
||||
IKTargetVar(const IKTargetVar& orig);
|
||||
|
||||
QString jointName;
|
||||
QString positionVar;
|
||||
QString rotationVar;
|
||||
QString typeVar;
|
||||
QString weightVar;
|
||||
QString jointName;
|
||||
float weight;
|
||||
float flexCoefficients[MAX_FLEX_COEFFICIENTS];
|
||||
size_t numFlexCoefficients;
|
||||
|
|
|
@ -21,10 +21,10 @@ void IKTarget::setFlexCoefficients(size_t numFlexCoefficientsIn, const float* fl
|
|||
}
|
||||
}
|
||||
|
||||
float IKTarget::getFlexCoefficient(int chainDepth) const {
|
||||
float IKTarget::getFlexCoefficient(size_t chainDepth) const {
|
||||
const float DEFAULT_FLEX_COEFFICIENT = 0.5f;
|
||||
|
||||
if (chainDepth >= 0 && chainDepth < _numFlexCoefficients) {
|
||||
if (chainDepth < _numFlexCoefficients) {
|
||||
return _flexCoefficients[chainDepth];
|
||||
} else {
|
||||
return DEFAULT_FLEX_COEFFICIENT;
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
void setIndex(int index) { _index = index; }
|
||||
void setType(int);
|
||||
void setFlexCoefficients(size_t numFlexCoefficientsIn, const float* flexCoefficientsIn);
|
||||
float getFlexCoefficient(int chainDepth) const;
|
||||
float getFlexCoefficient(size_t chainDepth) const;
|
||||
|
||||
void setWeight(float weight) { _weight = weight; }
|
||||
float getWeight() const { return _weight; }
|
||||
|
|
Loading…
Reference in a new issue