mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-20 18:40:07 +02:00
fix bad variable name
This commit is contained in:
parent
d3ba00770f
commit
dd515f6bb9
2 changed files with 3 additions and 3 deletions
|
@ -17,13 +17,13 @@
|
||||||
const float DEFAULT_MUSCLE_STRENGTH = 0.5f * MAX_MUSCLE_STRENGTH;
|
const float DEFAULT_MUSCLE_STRENGTH = 0.5f * MAX_MUSCLE_STRENGTH;
|
||||||
|
|
||||||
MuscleConstraint::MuscleConstraint(VerletPoint* parent, VerletPoint* child)
|
MuscleConstraint::MuscleConstraint(VerletPoint* parent, VerletPoint* child)
|
||||||
: _rootPoint(parent), _childoint(child),
|
: _rootPoint(parent), _childPoint(child),
|
||||||
_parentIndex(-1), _childndex(-1), _strength(DEFAULT_MUSCLE_STRENGTH) {
|
_parentIndex(-1), _childndex(-1), _strength(DEFAULT_MUSCLE_STRENGTH) {
|
||||||
_childOffset = child->_position - parent->_position;
|
_childOffset = child->_position - parent->_position;
|
||||||
}
|
}
|
||||||
|
|
||||||
float MuscleConstraint::enforce() {
|
float MuscleConstraint::enforce() {
|
||||||
_childoint->_position = (1.0f - _strength) * _childoint->_position + _strength * (_rootPoint->_position + _childOffset);
|
_childPoint->_position = (1.0f - _strength) * _childPoint->_position + _strength * (_rootPoint->_position + _childOffset);
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
float getStrength() const { return _strength; }
|
float getStrength() const { return _strength; }
|
||||||
private:
|
private:
|
||||||
VerletPoint* _rootPoint;
|
VerletPoint* _rootPoint;
|
||||||
VerletPoint* _childoint;
|
VerletPoint* _childPoint;
|
||||||
int _parentIndex;
|
int _parentIndex;
|
||||||
int _childndex;
|
int _childndex;
|
||||||
glm::vec3 _childOffset;
|
glm::vec3 _childOffset;
|
||||||
|
|
Loading…
Reference in a new issue