rename fronts to forwards

This commit is contained in:
Triplelexx 2017-03-22 18:41:06 +00:00
parent 2fc8dd48de
commit c2cff55427
2 changed files with 4 additions and 4 deletions

View file

@ -558,7 +558,7 @@ static const std::vector<float> LATERAL_SPEEDS = { 0.2f, 0.65f }; // m/s
void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPosition, const glm::vec3& worldVelocity, const glm::quat& worldRotation, CharacterControllerState ccState) { void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPosition, const glm::vec3& worldVelocity, const glm::quat& worldRotation, CharacterControllerState ccState) {
glm::vec3 front = worldRotation * IDENTITY_FORWARD; glm::vec3 forward = worldRotation * IDENTITY_FORWARD;
glm::vec3 workingVelocity = worldVelocity; glm::vec3 workingVelocity = worldVelocity;
{ {
@ -566,7 +566,7 @@ void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPos
float forwardSpeed = glm::dot(localVel, IDENTITY_FORWARD); float forwardSpeed = glm::dot(localVel, IDENTITY_FORWARD);
float lateralSpeed = glm::dot(localVel, IDENTITY_RIGHT); float lateralSpeed = glm::dot(localVel, IDENTITY_RIGHT);
float turningSpeed = glm::orientedAngle(front, _lastFront, IDENTITY_UP) / deltaTime; float turningSpeed = glm::orientedAngle(forward, _lastForward, IDENTITY_UP) / deltaTime;
// filter speeds using a simple moving average. // filter speeds using a simple moving average.
_averageForwardSpeed.updateAverage(forwardSpeed); _averageForwardSpeed.updateAverage(forwardSpeed);
@ -852,7 +852,7 @@ void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPos
_lastEnableInverseKinematics = _enableInverseKinematics; _lastEnableInverseKinematics = _enableInverseKinematics;
} }
_lastFront = front; _lastForward = forward;
_lastPosition = worldPosition; _lastPosition = worldPosition;
_lastVelocity = workingVelocity; _lastVelocity = workingVelocity;
} }

View file

@ -267,7 +267,7 @@ protected:
int _rightElbowJointIndex { -1 }; int _rightElbowJointIndex { -1 };
int _rightShoulderJointIndex { -1 }; int _rightShoulderJointIndex { -1 };
glm::vec3 _lastFront; glm::vec3 _lastForward;
glm::vec3 _lastPosition; glm::vec3 _lastPosition;
glm::vec3 _lastVelocity; glm::vec3 _lastVelocity;