mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:24:24 +02:00
recreate PR #4973 with some additional changes -- removed const keyword from qinvokables for avatar getter methods such as getVelocity
This commit is contained in:
parent
968643a38c
commit
bfa0e9c234
6 changed files with 16 additions and 16 deletions
|
@ -147,9 +147,9 @@ public:
|
||||||
|
|
||||||
Q_INVOKABLE glm::vec3 getNeckPosition() const;
|
Q_INVOKABLE glm::vec3 getNeckPosition() const;
|
||||||
|
|
||||||
Q_INVOKABLE const glm::vec3& getAcceleration() const { return _acceleration; }
|
Q_INVOKABLE glm::vec3 getAcceleration() const { return _acceleration; }
|
||||||
Q_INVOKABLE const glm::vec3& getAngularVelocity() const { return _angularVelocity; }
|
Q_INVOKABLE glm::vec3 getAngularVelocity() const { return _angularVelocity; }
|
||||||
Q_INVOKABLE const glm::vec3& getAngularAcceleration() const { return _angularAcceleration; }
|
Q_INVOKABLE glm::vec3 getAngularAcceleration() const { return _angularAcceleration; }
|
||||||
|
|
||||||
|
|
||||||
/// Scales a world space position vector relative to the avatar position and scale
|
/// Scales a world space position vector relative to the avatar position and scale
|
||||||
|
|
|
@ -123,17 +123,17 @@ glm::quat AvatarMotionState::getObjectRotation() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
const glm::vec3& AvatarMotionState::getObjectLinearVelocity() const {
|
glm::vec3 AvatarMotionState::getObjectLinearVelocity() const {
|
||||||
return _avatar->getVelocity();
|
return _avatar->getVelocity();
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
const glm::vec3& AvatarMotionState::getObjectAngularVelocity() const {
|
glm::vec3 AvatarMotionState::getObjectAngularVelocity() const {
|
||||||
return _avatar->getAngularVelocity();
|
return _avatar->getAngularVelocity();
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
const glm::vec3& AvatarMotionState::getObjectGravity() const {
|
glm::vec3 AvatarMotionState::getObjectGravity() const {
|
||||||
return _avatar->getAcceleration();
|
return _avatar->getAcceleration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,9 +48,9 @@ public:
|
||||||
|
|
||||||
virtual glm::vec3 getObjectPosition() const;
|
virtual glm::vec3 getObjectPosition() const;
|
||||||
virtual glm::quat getObjectRotation() const;
|
virtual glm::quat getObjectRotation() const;
|
||||||
virtual const glm::vec3& getObjectLinearVelocity() const;
|
virtual glm::vec3 getObjectLinearVelocity() const;
|
||||||
virtual const glm::vec3& getObjectAngularVelocity() const;
|
virtual glm::vec3 getObjectAngularVelocity() const;
|
||||||
virtual const glm::vec3& getObjectGravity() const;
|
virtual glm::vec3 getObjectGravity() const;
|
||||||
|
|
||||||
virtual const QUuid& getObjectID() const;
|
virtual const QUuid& getObjectID() const;
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ public:
|
||||||
int getReceiveRate() const;
|
int getReceiveRate() const;
|
||||||
|
|
||||||
void setVelocity(const glm::vec3 velocity) { _velocity = velocity; }
|
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; }
|
const glm::vec3& getTargetVelocity() const { return _targetVelocity; }
|
||||||
|
|
||||||
bool shouldDie() const { return _owningAvatarMixer.isNull() || getUsecsSinceLastUpdate() > AVATAR_SILENCE_THRESHOLD_USECS; }
|
bool shouldDie() const { return _owningAvatarMixer.isNull() || getUsecsSinceLastUpdate() > AVATAR_SILENCE_THRESHOLD_USECS; }
|
||||||
|
|
|
@ -61,9 +61,9 @@ public:
|
||||||
|
|
||||||
virtual glm::vec3 getObjectPosition() const { return _entity->getPosition() - ObjectMotionState::getWorldOffset(); }
|
virtual glm::vec3 getObjectPosition() const { return _entity->getPosition() - ObjectMotionState::getWorldOffset(); }
|
||||||
virtual glm::quat getObjectRotation() const { return _entity->getRotation(); }
|
virtual glm::quat getObjectRotation() const { return _entity->getRotation(); }
|
||||||
virtual const glm::vec3& getObjectLinearVelocity() const { return _entity->getVelocity(); }
|
virtual glm::vec3 getObjectLinearVelocity() const { return _entity->getVelocity(); }
|
||||||
virtual const glm::vec3& getObjectAngularVelocity() const { return _entity->getAngularVelocity(); }
|
virtual glm::vec3 getObjectAngularVelocity() const { return _entity->getAngularVelocity(); }
|
||||||
virtual const glm::vec3& getObjectGravity() const { return _entity->getGravity(); }
|
virtual glm::vec3 getObjectGravity() const { return _entity->getGravity(); }
|
||||||
|
|
||||||
virtual const QUuid& getObjectID() const { return _entity->getID(); }
|
virtual const QUuid& getObjectID() const { return _entity->getID(); }
|
||||||
|
|
||||||
|
|
|
@ -112,9 +112,9 @@ public:
|
||||||
|
|
||||||
virtual glm::vec3 getObjectPosition() const = 0;
|
virtual glm::vec3 getObjectPosition() const = 0;
|
||||||
virtual glm::quat getObjectRotation() const = 0;
|
virtual glm::quat getObjectRotation() const = 0;
|
||||||
virtual const glm::vec3& getObjectLinearVelocity() const = 0;
|
virtual glm::vec3 getObjectLinearVelocity() const = 0;
|
||||||
virtual const glm::vec3& getObjectAngularVelocity() const = 0;
|
virtual glm::vec3 getObjectAngularVelocity() const = 0;
|
||||||
virtual const glm::vec3& getObjectGravity() const = 0;
|
virtual glm::vec3 getObjectGravity() const = 0;
|
||||||
|
|
||||||
virtual const QUuid& getObjectID() const = 0;
|
virtual const QUuid& getObjectID() const = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue