mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:56:25 +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);
|
_lastPosition += deltaPosition + (deltaRotation * arm - arm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VerletPoint::shift(const glm::vec3& deltaPosition) {
|
||||||
|
_position += deltaPosition;
|
||||||
|
_lastPosition += deltaPosition;
|
||||||
|
}
|
||||||
|
|
||||||
void VerletPoint::setMass(float mass) {
|
void VerletPoint::setMass(float mass) {
|
||||||
const float MIN_MASS = 1.0e-6f;
|
const float MIN_MASS = 1.0e-6f;
|
||||||
const float MAX_MASS = 1.0e18f;
|
const float MAX_MASS = 1.0e18f;
|
||||||
|
|
|
@ -25,6 +25,7 @@ public:
|
||||||
void accumulateDelta(const glm::vec3& delta);
|
void accumulateDelta(const glm::vec3& delta);
|
||||||
void applyAccumulatedDelta();
|
void applyAccumulatedDelta();
|
||||||
void move(const glm::vec3& deltaPosition, const glm::quat& deltaRotation, const glm::vec3& oldPivot);
|
void move(const glm::vec3& deltaPosition, const glm::quat& deltaRotation, const glm::vec3& oldPivot);
|
||||||
|
void shift(const glm::vec3& deltaPosition);
|
||||||
|
|
||||||
void setMass(float mass);
|
void setMass(float mass);
|
||||||
float getMass() const { return _mass; }
|
float getMass() const { return _mass; }
|
||||||
|
|
Loading…
Reference in a new issue