mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 21:36:12 +02:00
add VerletPoint::shift()
This commit is contained in:
parent
aa1a7307cc
commit
543bf5224c
2 changed files with 6 additions and 0 deletions
|
@ -39,6 +39,11 @@ void VerletPoint::move(const glm::vec3& deltaPosition, const glm::quat& deltaRot
|
|||
_lastPosition += deltaPosition + (deltaRotation * arm - arm);
|
||||
}
|
||||
|
||||
void VerletPoint::shift(const glm::vec3& deltaPosition) {
|
||||
_position += deltaPosition;
|
||||
_lastPosition += deltaPosition;
|
||||
}
|
||||
|
||||
void VerletPoint::setMass(float mass) {
|
||||
const float MIN_MASS = 1.0e-6f;
|
||||
const float MAX_MASS = 1.0e18f;
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
void accumulateDelta(const glm::vec3& delta);
|
||||
void applyAccumulatedDelta();
|
||||
void move(const glm::vec3& deltaPosition, const glm::quat& deltaRotation, const glm::vec3& oldPivot);
|
||||
void shift(const glm::vec3& deltaPosition);
|
||||
|
||||
void setMass(float mass);
|
||||
float getMass() const { return _mass; }
|
||||
|
|
Loading…
Reference in a new issue