expose MyAvatar::setSensorToWorldMatrix()

This commit is contained in:
Andrew Meadows 2016-09-09 16:31:36 -07:00
parent 7e7803c648
commit 0f248c4540
2 changed files with 8 additions and 2 deletions

View file

@ -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();

View file

@ -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;