recreate PR #4973 with some additional changes -- removed const keyword from qinvokables for avatar getter methods such as getVelocity

This commit is contained in:
Seth Alves 2015-05-27 14:44:23 -07:00
parent 968643a38c
commit bfa0e9c234
6 changed files with 16 additions and 16 deletions

View file

@ -147,9 +147,9 @@ public:
Q_INVOKABLE glm::vec3 getNeckPosition() const;
Q_INVOKABLE const glm::vec3& getAcceleration() const { return _acceleration; }
Q_INVOKABLE const glm::vec3& getAngularVelocity() const { return _angularVelocity; }
Q_INVOKABLE const glm::vec3& getAngularAcceleration() const { return _angularAcceleration; }
Q_INVOKABLE glm::vec3 getAcceleration() const { return _acceleration; }
Q_INVOKABLE glm::vec3 getAngularVelocity() const { return _angularVelocity; }
Q_INVOKABLE glm::vec3 getAngularAcceleration() const { return _angularAcceleration; }
/// Scales a world space position vector relative to the avatar position and scale

View file

@ -123,17 +123,17 @@ glm::quat AvatarMotionState::getObjectRotation() const {
}
// virtual
const glm::vec3& AvatarMotionState::getObjectLinearVelocity() const {
glm::vec3 AvatarMotionState::getObjectLinearVelocity() const {
return _avatar->getVelocity();
}
// virtual
const glm::vec3& AvatarMotionState::getObjectAngularVelocity() const {
glm::vec3 AvatarMotionState::getObjectAngularVelocity() const {
return _avatar->getAngularVelocity();
}
// virtual
const glm::vec3& AvatarMotionState::getObjectGravity() const {
glm::vec3 AvatarMotionState::getObjectGravity() const {
return _avatar->getAcceleration();
}

View file

@ -48,9 +48,9 @@ public:
virtual glm::vec3 getObjectPosition() const;
virtual glm::quat getObjectRotation() const;
virtual const glm::vec3& getObjectLinearVelocity() const;
virtual const glm::vec3& getObjectAngularVelocity() const;
virtual const glm::vec3& getObjectGravity() const;
virtual glm::vec3 getObjectLinearVelocity() const;
virtual glm::vec3 getObjectAngularVelocity() const;
virtual glm::vec3 getObjectGravity() const;
virtual const QUuid& getObjectID() const;

View file

@ -301,7 +301,7 @@ public:
int getReceiveRate() const;
void setVelocity(const glm::vec3 velocity) { _velocity = velocity; }
Q_INVOKABLE const glm::vec3& getVelocity() const { return _velocity; }
Q_INVOKABLE glm::vec3 getVelocity() const { return _velocity; }
const glm::vec3& getTargetVelocity() const { return _targetVelocity; }
bool shouldDie() const { return _owningAvatarMixer.isNull() || getUsecsSinceLastUpdate() > AVATAR_SILENCE_THRESHOLD_USECS; }

View file

@ -61,9 +61,9 @@ public:
virtual glm::vec3 getObjectPosition() const { return _entity->getPosition() - ObjectMotionState::getWorldOffset(); }
virtual glm::quat getObjectRotation() const { return _entity->getRotation(); }
virtual const glm::vec3& getObjectLinearVelocity() const { return _entity->getVelocity(); }
virtual const glm::vec3& getObjectAngularVelocity() const { return _entity->getAngularVelocity(); }
virtual const glm::vec3& getObjectGravity() const { return _entity->getGravity(); }
virtual glm::vec3 getObjectLinearVelocity() const { return _entity->getVelocity(); }
virtual glm::vec3 getObjectAngularVelocity() const { return _entity->getAngularVelocity(); }
virtual glm::vec3 getObjectGravity() const { return _entity->getGravity(); }
virtual const QUuid& getObjectID() const { return _entity->getID(); }

View file

@ -112,9 +112,9 @@ public:
virtual glm::vec3 getObjectPosition() const = 0;
virtual glm::quat getObjectRotation() const = 0;
virtual const glm::vec3& getObjectLinearVelocity() const = 0;
virtual const glm::vec3& getObjectAngularVelocity() const = 0;
virtual const glm::vec3& getObjectGravity() const = 0;
virtual glm::vec3 getObjectLinearVelocity() const = 0;
virtual glm::vec3 getObjectAngularVelocity() const = 0;
virtual glm::vec3 getObjectGravity() const = 0;
virtual const QUuid& getObjectID() const = 0;