mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 22:07:35 +02:00
removed white space in MyAvatar.cpp
This commit is contained in:
parent
eff84de99f
commit
20c960c0da
1 changed files with 4 additions and 5 deletions
|
@ -3022,11 +3022,10 @@ glm::quat cancelOutRollAndPitch2(const glm::quat& q) {
|
||||||
if (fabs(zAxis.y) > 0.0) {
|
if (fabs(zAxis.y) > 0.0) {
|
||||||
// new z is the up axis, that is the direction the body is pointing
|
// new z is the up axis, that is the direction the body is pointing
|
||||||
newZ = glm::normalize(q * glm::vec3(0.0f, 1.0f, 0.0f));
|
newZ = glm::normalize(q * glm::vec3(0.0f, 1.0f, 0.0f));
|
||||||
}
|
}
|
||||||
newX = glm::cross(vec3(0.0f, 1.0f, 0.0f), newZ);
|
newX = glm::cross(vec3(0.0f, 1.0f, 0.0f), newZ);
|
||||||
newY = glm::cross(newZ, newX);
|
newY = glm::cross(newZ, newX);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
newZ = glm::normalize(vec3(zAxis.x, 0.0f, zAxis.z));
|
newZ = glm::normalize(vec3(zAxis.x, 0.0f, zAxis.z));
|
||||||
newX = glm::cross(vec3(0.0f, 1.0f, 0.0f), newZ);
|
newX = glm::cross(vec3(0.0f, 1.0f, 0.0f), newZ);
|
||||||
newY = glm::cross(newZ, newX);
|
newY = glm::cross(newZ, newX);
|
||||||
|
@ -3057,10 +3056,10 @@ glm::mat4 MyAvatar::deriveBodyUsingCgModel() const {
|
||||||
|
|
||||||
// get the new center of gravity
|
// get the new center of gravity
|
||||||
const glm::vec3 cgHipsPosition = computeCounterBalance();
|
const glm::vec3 cgHipsPosition = computeCounterBalance();
|
||||||
|
|
||||||
// find the new hips rotation using the new head-hips axis as the up axis
|
// find the new hips rotation using the new head-hips axis as the up axis
|
||||||
glm::mat4 avatarHipsMat = computeNewHipsMatrix(glmExtractRotation(avatarHeadMat), extractTranslation(avatarHeadMat), cgHipsPosition);
|
glm::mat4 avatarHipsMat = computeNewHipsMatrix(glmExtractRotation(avatarHeadMat), extractTranslation(avatarHeadMat), cgHipsPosition);
|
||||||
|
|
||||||
// convert hips from avatar to sensor space
|
// convert hips from avatar to sensor space
|
||||||
return worldToSensorMat * avatarToWorldMat * avatarHipsMat;
|
return worldToSensorMat * avatarToWorldMat * avatarHipsMat;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue