mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
pull from upstream, code review
This commit is contained in:
parent
b1c7c251ac
commit
69520ff3db
2 changed files with 1 additions and 14 deletions
|
@ -417,7 +417,7 @@ void MyAvatar::update(float deltaTime) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_DRAW_HMD_MOVING_AVERAGE
|
#ifdef DEBUG_DRAW_HMD_MOVING_AVERAGE
|
||||||
glm::vec3 p = transformPoint(getSensorToWorldMatrix(), getHeadControllerPoseInAvatarFrame() +
|
glm::vec3 p = transformPoint(getSensorToWorldMatrix(), getHeadControllerPoseInAvatarFrame() *
|
||||||
glm::vec3(_headControllerFacingMovingAverage.x, 0.0f, _headControllerFacingMovingAverage.y));
|
glm::vec3(_headControllerFacingMovingAverage.x, 0.0f, _headControllerFacingMovingAverage.y));
|
||||||
DebugDraw::getInstance().addMarker("facing-avg", getOrientation(), p, glm::vec4(1.0f));
|
DebugDraw::getInstance().addMarker("facing-avg", getOrientation(), p, glm::vec4(1.0f));
|
||||||
p = transformPoint(getSensorToWorldMatrix(), getHMDSensorPosition() +
|
p = transformPoint(getSensorToWorldMatrix(), getHMDSensorPosition() +
|
||||||
|
@ -644,7 +644,6 @@ void MyAvatar::updateFromHMDSensorMatrix(const glm::mat4& hmdSensorMatrix) {
|
||||||
|
|
||||||
_hmdSensorPosition = newHmdSensorPosition;
|
_hmdSensorPosition = newHmdSensorPosition;
|
||||||
_hmdSensorOrientation = glm::quat_cast(hmdSensorMatrix);
|
_hmdSensorOrientation = glm::quat_cast(hmdSensorMatrix);
|
||||||
// _headControllerFacing = getFacingDir2D(_hmdSensorOrientation);
|
|
||||||
auto headPose = _headControllerPoseInSensorFrameCache.get();
|
auto headPose = _headControllerPoseInSensorFrameCache.get();
|
||||||
if (headPose.isValid()) {
|
if (headPose.isValid()) {
|
||||||
_headControllerFacing = getFacingDir2D(headPose.rotation);
|
_headControllerFacing = getFacingDir2D(headPose.rotation);
|
||||||
|
@ -2328,14 +2327,6 @@ bool MyAvatar::isDriveKeyDisabled(DriveKeys key) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 MyAvatar::getWorldBodyPosition() const {
|
|
||||||
return transformPoint(_sensorToWorldMatrix, extractTranslation(_bodySensorMatrix));
|
|
||||||
}
|
|
||||||
|
|
||||||
glm::quat MyAvatar::getWorldBodyOrientation() const {
|
|
||||||
return glm::quat_cast(_sensorToWorldMatrix * _bodySensorMatrix);
|
|
||||||
}
|
|
||||||
|
|
||||||
// old school meat hook style
|
// old school meat hook style
|
||||||
glm::mat4 MyAvatar::deriveBodyFromHMDSensor() const {
|
glm::mat4 MyAvatar::deriveBodyFromHMDSensor() const {
|
||||||
glm::vec3 headPosition;
|
glm::vec3 headPosition;
|
||||||
|
|
|
@ -564,10 +564,6 @@ signals:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
glm::vec3 getWorldBodyPosition() const;
|
|
||||||
glm::quat getWorldBodyOrientation() const;
|
|
||||||
|
|
||||||
|
|
||||||
virtual QByteArray toByteArrayStateful(AvatarDataDetail dataDetail) override;
|
virtual QByteArray toByteArrayStateful(AvatarDataDetail dataDetail) override;
|
||||||
|
|
||||||
void simulate(float deltaTime);
|
void simulate(float deltaTime);
|
||||||
|
|
Loading…
Reference in a new issue