mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +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;
|
||||
|
||||
MuscleConstraint::MuscleConstraint(VerletPoint* parent, VerletPoint* child)
|
||||
: _rootPoint(parent), _childoint(child),
|
||||
: _rootPoint(parent), _childPoint(child),
|
||||
_parentIndex(-1), _childndex(-1), _strength(DEFAULT_MUSCLE_STRENGTH) {
|
||||
_childOffset = child->_position - parent->_position;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
float getStrength() const { return _strength; }
|
||||
private:
|
||||
VerletPoint* _rootPoint;
|
||||
VerletPoint* _childoint;
|
||||
VerletPoint* _childPoint;
|
||||
int _parentIndex;
|
||||
int _childndex;
|
||||
glm::vec3 _childOffset;
|
||||
|
|
Loading…
Reference in a new issue