mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
expose MyAvatar::setSensorToWorldMatrix()
This commit is contained in:
parent
7e7803c648
commit
0f248c4540
2 changed files with 8 additions and 2 deletions
|
@ -547,8 +547,12 @@ void MyAvatar::updateJointFromController(controller::Action poseKey, ThreadSafeV
|
|||
void MyAvatar::updateSensorToWorldMatrix() {
|
||||
// update the sensor mat so that the body position will end up in the desired
|
||||
// position when driven from the head.
|
||||
glm::mat4 desiredMat = createMatFromQuatAndPos(getOrientation(), getPosition());
|
||||
_sensorToWorldMatrix = desiredMat * glm::inverse(_bodySensorMatrix);
|
||||
glm::mat4 bodyToWorld = createMatFromQuatAndPos(getOrientation(), getPosition());
|
||||
setSensorToWorldMatrix(bodyToWorld * glm::inverse(_bodySensorMatrix));
|
||||
}
|
||||
|
||||
void MyAvatar::setSensorToWorldMatrix(const glm::mat4& sensorToWorld) {
|
||||
_sensorToWorldMatrix = sensorToWorld;
|
||||
|
||||
lateUpdatePalms();
|
||||
|
||||
|
|
|
@ -126,6 +126,8 @@ public:
|
|||
// This is so the correct camera can be used for rendering.
|
||||
void updateSensorToWorldMatrix();
|
||||
|
||||
void setSensorToWorldMatrix(const glm::mat4& sensorToWorld);
|
||||
|
||||
void setRealWorldFieldOfView(float realWorldFov) { _realWorldFieldOfView.set(realWorldFov); }
|
||||
|
||||
Q_INVOKABLE glm::vec3 getDefaultEyePosition() const;
|
||||
|
|
Loading…
Reference in a new issue