mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 06:09:55 +02:00
fix GCC compiler warning
This commit is contained in:
parent
f715dbe243
commit
d33400f6ad
4 changed files with 16 additions and 16 deletions
|
@ -60,7 +60,7 @@ bool ObjectActionTractor::getTarget(float deltaTimeStep, glm::quat& rotation, gl
|
||||||
}
|
}
|
||||||
if (other && otherIsReady) {
|
if (other && otherIsReady) {
|
||||||
bool success;
|
bool success;
|
||||||
glm::vec3 otherWorldPosition = other->getWorldPosition(_otherJointIndex, success);
|
glm::vec3 otherWorldPosition = other->getJointWorldPosition(_otherJointIndex, success);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
linearTimeScale = FLT_MAX;
|
linearTimeScale = FLT_MAX;
|
||||||
angularTimeScale = FLT_MAX;
|
angularTimeScale = FLT_MAX;
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool success;
|
bool success;
|
||||||
Transform jointWorldTransform = nestable->getTransform(_jointIndex, success);
|
Transform jointWorldTransform = nestable->getJointTransform(_jointIndex, success);
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
return Transform();
|
return Transform();
|
||||||
|
|
|
@ -92,7 +92,7 @@ Transform SpatiallyNestable::getParentTransform(bool& success, int depth) const
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (parent) {
|
if (parent) {
|
||||||
result = parent->getTransform(_parentJointIndex, success, depth + 1);
|
result = parent->getJointTransform(_parentJointIndex, success, depth + 1);
|
||||||
if (getScalesWithParent()) {
|
if (getScalesWithParent()) {
|
||||||
result.setScale(parent->scaleForChildren());
|
result.setScale(parent->scaleForChildren());
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ glm::vec3 SpatiallyNestable::worldToLocal(const glm::vec3& position,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent) {
|
if (parent) {
|
||||||
parentTransform = parent->getTransform(parentJointIndex, success);
|
parentTransform = parent->getJointTransform(parentJointIndex, success);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
return glm::vec3(0.0f);
|
return glm::vec3(0.0f);
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ glm::quat SpatiallyNestable::worldToLocal(const glm::quat& orientation,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent) {
|
if (parent) {
|
||||||
parentTransform = parent->getTransform(parentJointIndex, success);
|
parentTransform = parent->getJointTransform(parentJointIndex, success);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
return glm::quat();
|
return glm::quat();
|
||||||
}
|
}
|
||||||
|
@ -350,7 +350,7 @@ glm::vec3 SpatiallyNestable::localToWorld(const glm::vec3& position,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent) {
|
if (parent) {
|
||||||
parentTransform = parent->getTransform(parentJointIndex, success);
|
parentTransform = parent->getJointTransform(parentJointIndex, success);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
return glm::vec3(0.0f);
|
return glm::vec3(0.0f);
|
||||||
}
|
}
|
||||||
|
@ -390,7 +390,7 @@ glm::quat SpatiallyNestable::localToWorld(const glm::quat& orientation,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent) {
|
if (parent) {
|
||||||
parentTransform = parent->getTransform(parentJointIndex, success);
|
parentTransform = parent->getJointTransform(parentJointIndex, success);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
return glm::quat();
|
return glm::quat();
|
||||||
}
|
}
|
||||||
|
@ -525,8 +525,8 @@ glm::vec3 SpatiallyNestable::getWorldPosition() const {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 SpatiallyNestable::getWorldPosition(int jointIndex, bool& success) const {
|
glm::vec3 SpatiallyNestable::getJointWorldPosition(int jointIndex, bool& success) const {
|
||||||
return getTransform(jointIndex, success).getTranslation();
|
return getJointTransform(jointIndex, success).getTranslation();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpatiallyNestable::setWorldPosition(const glm::vec3& position, bool& success, bool tellPhysics) {
|
void SpatiallyNestable::setWorldPosition(const glm::vec3& position, bool& success, bool tellPhysics) {
|
||||||
|
@ -579,7 +579,7 @@ glm::quat SpatiallyNestable::getWorldOrientation() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::quat SpatiallyNestable::getWorldOrientation(int jointIndex, bool& success) const {
|
glm::quat SpatiallyNestable::getWorldOrientation(int jointIndex, bool& success) const {
|
||||||
return getTransform(jointIndex, success).getRotation();
|
return getJointTransform(jointIndex, success).getRotation();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpatiallyNestable::setWorldOrientation(const glm::quat& orientation, bool& success, bool tellPhysics) {
|
void SpatiallyNestable::setWorldOrientation(const glm::quat& orientation, bool& success, bool tellPhysics) {
|
||||||
|
@ -765,7 +765,7 @@ void SpatiallyNestable::breakParentingLoop() const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const Transform SpatiallyNestable::getTransform(int jointIndex, bool& success, int depth) const {
|
const Transform SpatiallyNestable::getJointTransform(int jointIndex, bool& success, int depth) const {
|
||||||
// this returns the world-space transform for this object. It finds its parent's transform (which may
|
// this returns the world-space transform for this object. It finds its parent's transform (which may
|
||||||
// cause this object's parent to query its parent, etc) and multiplies this object's local transform onto it.
|
// cause this object's parent to query its parent, etc) and multiplies this object's local transform onto it.
|
||||||
Transform jointInWorldFrame;
|
Transform jointInWorldFrame;
|
||||||
|
@ -832,8 +832,8 @@ glm::vec3 SpatiallyNestable::getSNScale(bool& success) const {
|
||||||
return getTransform(success).getScale();
|
return getTransform(success).getScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 SpatiallyNestable::getSNScale(int jointIndex, bool& success) const {
|
glm::vec3 SpatiallyNestable::getJointSNScale(int jointIndex, bool& success) const {
|
||||||
return getTransform(jointIndex, success).getScale();
|
return getJointTransform(jointIndex, success).getScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpatiallyNestable::setSNScale(const glm::vec3& scale) {
|
void SpatiallyNestable::setSNScale(const glm::vec3& scale) {
|
||||||
|
|
|
@ -129,9 +129,9 @@ public:
|
||||||
virtual void setSNScale(const glm::vec3& scale, bool& success);
|
virtual void setSNScale(const glm::vec3& scale, bool& success);
|
||||||
|
|
||||||
// get world-frame values for a specific joint
|
// get world-frame values for a specific joint
|
||||||
virtual const Transform getTransform(int jointIndex, bool& success, int depth = 0) const;
|
virtual const Transform getJointTransform(int jointIndex, bool& success, int depth = 0) const;
|
||||||
virtual glm::vec3 getWorldPosition(int jointIndex, bool& success) const;
|
virtual glm::vec3 getJointWorldPosition(int jointIndex, bool& success) const;
|
||||||
virtual glm::vec3 getSNScale(int jointIndex, bool& success) const;
|
virtual glm::vec3 getJointSNScale(int jointIndex, bool& success) const;
|
||||||
|
|
||||||
// object's parent's frame
|
// object's parent's frame
|
||||||
virtual Transform getLocalTransform() const;
|
virtual Transform getLocalTransform() const;
|
||||||
|
|
Loading…
Reference in a new issue