mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 09:33:29 +02:00
added menu option for setting display of lookat vectors
This commit is contained in:
parent
d786fd155f
commit
83e2bf2534
4 changed files with 20 additions and 1 deletions
|
@ -1225,12 +1225,17 @@ void Application::initMenu() {
|
|||
_renderAvatarsOn->setChecked(true);
|
||||
(_renderFrameTimerOn = renderMenu->addAction("Show Timer"))->setCheckable(true);
|
||||
_renderFrameTimerOn->setChecked(false);
|
||||
|
||||
(_renderLookatOn = renderMenu->addAction("Lookat Vectors"))->setCheckable(true);
|
||||
_renderLookatOn->setChecked(false);
|
||||
|
||||
renderMenu->addAction("First Person", this, SLOT(setRenderFirstPerson(bool)), Qt::Key_P)->setCheckable(true);
|
||||
|
||||
(_oculusOn = renderMenu->addAction("Oculus", this, SLOT(setOculus(bool)), Qt::Key_O))->setCheckable(true);
|
||||
|
||||
QMenu* toolsMenu = menuBar->addMenu("Tools");
|
||||
|
||||
(_renderStatsOn = toolsMenu->addAction("Stats"))->setCheckable(true);
|
||||
|
||||
_renderStatsOn->setShortcut(Qt::Key_Slash);
|
||||
(_logOn = toolsMenu->addAction("Log"))->setCheckable(true);
|
||||
_logOn->setChecked(true);
|
||||
|
@ -1336,6 +1341,7 @@ void Application::init() {
|
|||
a.tightness = 8.0f;
|
||||
_myCamera.setMode(CAMERA_MODE_THIRD_PERSON, a);
|
||||
_myAvatar.setDisplayingHead(true);
|
||||
_myAvatar.setDisplayingLookatVectors(false);
|
||||
|
||||
QCursor::setPos(_headMouseX, _headMouseY);
|
||||
|
||||
|
@ -1713,6 +1719,12 @@ void Application::displaySide(Camera& whichCamera) {
|
|||
|
||||
// Render my own Avatar
|
||||
_myAvatar.render(_lookingInMirror->isChecked(), _myCamera.getPosition());
|
||||
|
||||
if (_renderLookatOn->isChecked()) {
|
||||
_myAvatar.setDisplayingLookatVectors(true);
|
||||
} else {
|
||||
_myAvatar.setDisplayingLookatVectors(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Render the world box
|
||||
|
|
|
@ -77,6 +77,7 @@ private slots:
|
|||
void setFullscreen(bool fullscreen);
|
||||
|
||||
void setRenderFirstPerson(bool firstPerson);
|
||||
//void setRenderLookatVectors(bool lookatVectors);
|
||||
void setOculus(bool oculus);
|
||||
|
||||
void setFrustumOffset(bool frustumOffset);
|
||||
|
@ -146,6 +147,7 @@ private:
|
|||
QAction* _oculusOn; // Whether to configure the display for the Oculus Rift
|
||||
QAction* _renderStatsOn; // Whether to show onscreen text overlay with stats
|
||||
QAction* _renderFrameTimerOn; // Whether to show onscreen text overlay with stats
|
||||
QAction* _renderLookatOn; // Whether to show lookat vectors from avatar eyes if looking at something
|
||||
QAction* _logOn; // Whether to show on-screen log
|
||||
QActionGroup* _voxelModeActions; // The group of voxel edit mode actions
|
||||
QAction* _addVoxelMode; // Whether add voxel mode is enabled
|
||||
|
|
|
@ -705,6 +705,10 @@ void Avatar::setDisplayingHead(bool displayingHead) {
|
|||
_displayingHead = displayingHead;
|
||||
}
|
||||
|
||||
void Avatar::setDisplayingLookatVectors(bool displayingLookatVectors) {
|
||||
_head.setRenderLookatVectors(displayingLookatVectors);
|
||||
}
|
||||
|
||||
static TextRenderer* textRenderer() {
|
||||
static TextRenderer* renderer = new TextRenderer(SANS_FONT_FAMILY, 24, -1, false, TextRenderer::SHADOW_EFFECT);
|
||||
return renderer;
|
||||
|
|
|
@ -114,6 +114,7 @@ public:
|
|||
void setMovedHandOffset(glm::vec3 movedHandOffset) { _movedHandOffset = movedHandOffset; }
|
||||
void updateArmIKAndConstraints( float deltaTime );
|
||||
void setDisplayingHead( bool displayingHead );
|
||||
void setDisplayingLookatVectors(bool displayingLookatVectors);
|
||||
|
||||
// Set what driving keys are being pressed to control thrust levels
|
||||
void setDriveKeys(int key, bool val) { _driveKeys[key] = val; };
|
||||
|
|
Loading…
Reference in a new issue