mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 23:56:29 +02:00
Merge remote-tracking branch 'upstream/master' into synthesis
This commit is contained in:
commit
30d6c7f68a
5 changed files with 17 additions and 9 deletions
|
@ -1386,7 +1386,7 @@ void Application::initMenu() {
|
||||||
|
|
||||||
optionsMenu->addAction("Noise", this, SLOT(setNoise(bool)), Qt::Key_N)->setCheckable(true);
|
optionsMenu->addAction("Noise", this, SLOT(setNoise(bool)), Qt::Key_N)->setCheckable(true);
|
||||||
(_gyroLook = optionsMenu->addAction("Gyro Look"))->setCheckable(true);
|
(_gyroLook = optionsMenu->addAction("Gyro Look"))->setCheckable(true);
|
||||||
_gyroLook->setChecked(true);
|
_gyroLook->setChecked(false);
|
||||||
(_mouseLook = optionsMenu->addAction("Mouse Look"))->setCheckable(true);
|
(_mouseLook = optionsMenu->addAction("Mouse Look"))->setCheckable(true);
|
||||||
_mouseLook->setChecked(false);
|
_mouseLook->setChecked(false);
|
||||||
(_showHeadMouse = optionsMenu->addAction("Head Mouse"))->setCheckable(true);
|
(_showHeadMouse = optionsMenu->addAction("Head Mouse"))->setCheckable(true);
|
||||||
|
@ -1409,6 +1409,8 @@ void Application::initMenu() {
|
||||||
_renderAtmosphereOn->setShortcut(Qt::SHIFT | Qt::Key_A);
|
_renderAtmosphereOn->setShortcut(Qt::SHIFT | Qt::Key_A);
|
||||||
(_renderAvatarsOn = renderMenu->addAction("Avatars"))->setCheckable(true);
|
(_renderAvatarsOn = renderMenu->addAction("Avatars"))->setCheckable(true);
|
||||||
_renderAvatarsOn->setChecked(true);
|
_renderAvatarsOn->setChecked(true);
|
||||||
|
(_renderAvatarBalls = renderMenu->addAction("Avatar as Balls"))->setCheckable(true);
|
||||||
|
_renderAvatarBalls->setChecked(false);
|
||||||
(_renderFrameTimerOn = renderMenu->addAction("Show Timer"))->setCheckable(true);
|
(_renderFrameTimerOn = renderMenu->addAction("Show Timer"))->setCheckable(true);
|
||||||
_renderFrameTimerOn->setChecked(false);
|
_renderFrameTimerOn->setChecked(false);
|
||||||
(_renderLookatOn = renderMenu->addAction("Lookat Vectors"))->setCheckable(true);
|
(_renderLookatOn = renderMenu->addAction("Lookat Vectors"))->setCheckable(true);
|
||||||
|
@ -1965,13 +1967,13 @@ void Application::displaySide(Camera& whichCamera) {
|
||||||
if (!avatar->isInitialized()) {
|
if (!avatar->isInitialized()) {
|
||||||
avatar->init();
|
avatar->init();
|
||||||
}
|
}
|
||||||
avatar->render(false);
|
avatar->render(false, _renderAvatarBalls->isChecked());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
agentList->unlock();
|
agentList->unlock();
|
||||||
|
|
||||||
// Render my own Avatar
|
// Render my own Avatar
|
||||||
_myAvatar.render(_lookingInMirror->isChecked());
|
_myAvatar.render(_lookingInMirror->isChecked(), _renderAvatarBalls->isChecked());
|
||||||
_myAvatar.setDisplayingLookatVectors(_renderLookatOn->isChecked());
|
_myAvatar.setDisplayingLookatVectors(_renderLookatOn->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,6 +172,7 @@ private:
|
||||||
QAction* _lookingInMirror; // Are we currently rendering one's own head as if in mirror?
|
QAction* _lookingInMirror; // Are we currently rendering one's own head as if in mirror?
|
||||||
QAction* _echoAudioMode; // Are we asking the mixer to echo back our audio?
|
QAction* _echoAudioMode; // Are we asking the mixer to echo back our audio?
|
||||||
QAction* _gyroLook; // Whether to allow the gyro data from head to move your view
|
QAction* _gyroLook; // Whether to allow the gyro data from head to move your view
|
||||||
|
QAction* _renderAvatarBalls; // Switch between voxels and joints/balls for avatar render
|
||||||
QAction* _mouseLook; // Whether the have the mouse near edge of screen move your view
|
QAction* _mouseLook; // Whether the have the mouse near edge of screen move your view
|
||||||
QAction* _showHeadMouse; // Whether the have the mouse near edge of screen move your view
|
QAction* _showHeadMouse; // Whether the have the mouse near edge of screen move your view
|
||||||
QAction* _transmitterDrives; // Whether to have Transmitter data move/steer the Avatar
|
QAction* _transmitterDrives; // Whether to have Transmitter data move/steer the Avatar
|
||||||
|
|
|
@ -927,7 +927,7 @@ void Avatar::setGravity(glm::vec3 gravity) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Avatar::render(bool lookingInMirror) {
|
void Avatar::render(bool lookingInMirror, bool renderAvatarBalls) {
|
||||||
|
|
||||||
_cameraPosition = Application::getInstance()->getCamera()->getPosition();
|
_cameraPosition = Application::getInstance()->getCamera()->getPosition();
|
||||||
|
|
||||||
|
@ -945,7 +945,7 @@ void Avatar::render(bool lookingInMirror) {
|
||||||
renderDiskShadow(_position, glm::vec3(0.0f, 1.0f, 0.0f), 0.1f, 0.2f);
|
renderDiskShadow(_position, glm::vec3(0.0f, 1.0f, 0.0f), 0.1f, 0.2f);
|
||||||
|
|
||||||
// render body
|
// render body
|
||||||
renderBody(lookingInMirror);
|
renderBody(lookingInMirror, renderAvatarBalls);
|
||||||
|
|
||||||
// if this is my avatar, then render my interactions with the other avatar
|
// if this is my avatar, then render my interactions with the other avatar
|
||||||
if (!_owningAgent) {
|
if (!_owningAgent) {
|
||||||
|
@ -1141,7 +1141,7 @@ glm::quat Avatar::computeRotationFromBodyToWorldUp(float proportion) const {
|
||||||
return glm::angleAxis(angle * proportion, axis);
|
return glm::angleAxis(angle * proportion, axis);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Avatar::renderBody(bool lookingInMirror) {
|
void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
|
||||||
|
|
||||||
const float RENDER_OPAQUE_BEYOND = 1.0f; // Meters beyond which body is shown opaque
|
const float RENDER_OPAQUE_BEYOND = 1.0f; // Meters beyond which body is shown opaque
|
||||||
const float RENDER_TRANSLUCENT_BEYOND = 0.5f;
|
const float RENDER_TRANSLUCENT_BEYOND = 0.5f;
|
||||||
|
@ -1217,6 +1217,9 @@ void Avatar::renderBody(bool lookingInMirror) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Render the body's voxels
|
||||||
|
_voxels.render(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ public:
|
||||||
void updateHeadFromGyros(float frametime, SerialInterface * serialInterface);
|
void updateHeadFromGyros(float frametime, SerialInterface * serialInterface);
|
||||||
void updateFromMouse(int mouseX, int mouseY, int screenWidth, int screenHeight);
|
void updateFromMouse(int mouseX, int mouseY, int screenWidth, int screenHeight);
|
||||||
void addBodyYaw(float y) {_bodyYaw += y;};
|
void addBodyYaw(float y) {_bodyYaw += y;};
|
||||||
void render(bool lookingInMirror);
|
void render(bool lookingInMirror, bool renderAvatarBalls);
|
||||||
|
|
||||||
//setters
|
//setters
|
||||||
void setMousePressed (bool mousePressed ) { _mousePressed = mousePressed;}
|
void setMousePressed (bool mousePressed ) { _mousePressed = mousePressed;}
|
||||||
|
@ -202,7 +202,7 @@ private:
|
||||||
// private methods...
|
// private methods...
|
||||||
glm::vec3 caclulateAverageEyePosition() { return _head.caclulateAverageEyePosition(); } // get the position smack-dab between the eyes (for lookat)
|
glm::vec3 caclulateAverageEyePosition() { return _head.caclulateAverageEyePosition(); } // get the position smack-dab between the eyes (for lookat)
|
||||||
glm::quat computeRotationFromBodyToWorldUp(float proportion = 1.0f) const;
|
glm::quat computeRotationFromBodyToWorldUp(float proportion = 1.0f) const;
|
||||||
void renderBody(bool lookingInMirror);
|
void renderBody(bool lookingInMirror, bool renderAvatarBalls);
|
||||||
void initializeBodyBalls();
|
void initializeBodyBalls();
|
||||||
void resetBodyBalls();
|
void resetBodyBalls();
|
||||||
void updateBodyBalls( float deltaTime );
|
void updateBodyBalls( float deltaTime );
|
||||||
|
@ -216,7 +216,6 @@ private:
|
||||||
void updateCollisionWithVoxels();
|
void updateCollisionWithVoxels();
|
||||||
void applyCollisionWithScene(const glm::vec3& penetration);
|
void applyCollisionWithScene(const glm::vec3& penetration);
|
||||||
void applyCollisionWithOtherAvatar( Avatar * other, float deltaTime );
|
void applyCollisionWithOtherAvatar( Avatar * other, float deltaTime );
|
||||||
void setHeadFromGyros(glm::vec3 * eulerAngles, glm::vec3 * angularVelocity, float deltaTime, float smoothingTime);
|
|
||||||
void checkForMouseRayTouching();
|
void checkForMouseRayTouching();
|
||||||
void renderJointConnectingCone(glm::vec3 position1, glm::vec3 position2, float radius1, float radius2);
|
void renderJointConnectingCone(glm::vec3 position1, glm::vec3 position2, float radius1, float radius2);
|
||||||
};
|
};
|
||||||
|
|
|
@ -104,6 +104,7 @@ void Head::simulate(float deltaTime, bool isMine) {
|
||||||
|
|
||||||
const float HEAD_MOTION_DECAY = 0.00;
|
const float HEAD_MOTION_DECAY = 0.00;
|
||||||
|
|
||||||
|
/*
|
||||||
// Decay head back to center if turned on
|
// Decay head back to center if turned on
|
||||||
if (isMine && _returnHeadToCenter) {
|
if (isMine && _returnHeadToCenter) {
|
||||||
|
|
||||||
|
@ -121,6 +122,7 @@ void Head::simulate(float deltaTime, bool isMine) {
|
||||||
if (fabs(_yaw ) < RETURN_RANGE) { _yaw *= (1.0f - RETURN_STRENGTH * deltaTime); }
|
if (fabs(_yaw ) < RETURN_RANGE) { _yaw *= (1.0f - RETURN_STRENGTH * deltaTime); }
|
||||||
if (fabs(_roll ) < RETURN_RANGE) { _roll *= (1.0f - RETURN_STRENGTH * deltaTime); }
|
if (fabs(_roll ) < RETURN_RANGE) { _roll *= (1.0f - RETURN_STRENGTH * deltaTime); }
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// decay lean
|
// decay lean
|
||||||
_leanForward *= (1.f - HEAD_MOTION_DECAY * 30 * deltaTime);
|
_leanForward *= (1.f - HEAD_MOTION_DECAY * 30 * deltaTime);
|
||||||
|
@ -151,6 +153,7 @@ void Head::simulate(float deltaTime, bool isMine) {
|
||||||
if (USING_PHYSICAL_MOHAWK) {
|
if (USING_PHYSICAL_MOHAWK) {
|
||||||
updateHairPhysics(deltaTime);
|
updateHairPhysics(deltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Head::determineIfLookingAtSomething() {
|
void Head::determineIfLookingAtSomething() {
|
||||||
|
|
Loading…
Reference in a new issue