mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 06:23:35 +02:00
Merge pull request #5401 from ZappoMan/renderLaserPointers
remove renderLaserPointers()
This commit is contained in:
commit
f3dc159e33
5 changed files with 10 additions and 23 deletions
|
@ -3284,10 +3284,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se
|
||||||
sceneInterface->setEngineFeedOverlay3DItems(engineRC->_numFeedOverlay3DItems);
|
sceneInterface->setEngineFeedOverlay3DItems(engineRC->_numFeedOverlay3DItems);
|
||||||
sceneInterface->setEngineDrawnOverlay3DItems(engineRC->_numDrawnOverlay3DItems);
|
sceneInterface->setEngineDrawnOverlay3DItems(engineRC->_numDrawnOverlay3DItems);
|
||||||
}
|
}
|
||||||
//Render the sixense lasers
|
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::SixenseLasers)) {
|
|
||||||
_myAvatar->renderLaserPointers(*renderArgs->_batch);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!selfAvatarOnly) {
|
if (!selfAvatarOnly) {
|
||||||
// give external parties a change to hook in
|
// give external parties a change to hook in
|
||||||
|
|
|
@ -478,7 +478,6 @@ Menu::Menu() {
|
||||||
qApp,
|
qApp,
|
||||||
SLOT(setLowVelocityFilter(bool)));
|
SLOT(setLowVelocityFilter(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(sixenseOptionsMenu, MenuOption::SixenseMouseInput, 0, true);
|
addCheckableActionToQMenuAndActionHash(sixenseOptionsMenu, MenuOption::SixenseMouseInput, 0, true);
|
||||||
addCheckableActionToQMenuAndActionHash(sixenseOptionsMenu, MenuOption::SixenseLasers, 0, false);
|
|
||||||
|
|
||||||
MenuWrapper* leapOptionsMenu = handOptionsMenu->addMenu("Leap Motion");
|
MenuWrapper* leapOptionsMenu = handOptionsMenu->addMenu("Leap Motion");
|
||||||
addCheckableActionToQMenuAndActionHash(leapOptionsMenu, MenuOption::LeapMotionOnHMD, 0, false);
|
addCheckableActionToQMenuAndActionHash(leapOptionsMenu, MenuOption::LeapMotionOnHMD, 0, false);
|
||||||
|
|
|
@ -272,7 +272,6 @@ namespace MenuOption {
|
||||||
const QString SimpleShadows = "Simple";
|
const QString SimpleShadows = "Simple";
|
||||||
const QString SixenseEnabled = "Enable Hydra Support";
|
const QString SixenseEnabled = "Enable Hydra Support";
|
||||||
const QString SixenseMouseInput = "Enable Sixense Mouse Input";
|
const QString SixenseMouseInput = "Enable Sixense Mouse Input";
|
||||||
const QString SixenseLasers = "Enable Sixense UI Lasers";
|
|
||||||
const QString ShiftHipsForIdleAnimations = "Shift hips for idle animations";
|
const QString ShiftHipsForIdleAnimations = "Shift hips for idle animations";
|
||||||
const QString Stars = "Stars";
|
const QString Stars = "Stars";
|
||||||
const QString Stats = "Stats";
|
const QString Stats = "Stats";
|
||||||
|
|
|
@ -520,8 +520,7 @@ void SixenseManager::emulateMouse(PalmData* palm, int index) {
|
||||||
triggerButton = Qt::LeftButton;
|
triggerButton = Qt::LeftButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::SixenseLasers)
|
if (Menu::getInstance()->isOptionChecked(MenuOption::EnableVRMode)) {
|
||||||
|| Menu::getInstance()->isOptionChecked(MenuOption::EnableVRMode)) {
|
|
||||||
pos = qApp->getApplicationCompositor().getPalmClickLocation(palm);
|
pos = qApp->getApplicationCompositor().getPalmClickLocation(palm);
|
||||||
} else {
|
} else {
|
||||||
// Get directon relative to avatar orientation
|
// Get directon relative to avatar orientation
|
||||||
|
|
|
@ -491,11 +491,6 @@ void ApplicationCompositor::renderControllerPointers(gpu::Batch& batch) {
|
||||||
|
|
||||||
auto canvasSize = qApp->getCanvasSize();
|
auto canvasSize = qApp->getCanvasSize();
|
||||||
int mouseX, mouseY;
|
int mouseX, mouseY;
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::SixenseLasers)) {
|
|
||||||
QPoint res = getPalmClickLocation(palmData);
|
|
||||||
mouseX = res.x();
|
|
||||||
mouseY = res.y();
|
|
||||||
} else {
|
|
||||||
// Get directon relative to avatar orientation
|
// Get directon relative to avatar orientation
|
||||||
glm::vec3 direction = glm::inverse(myAvatar->getOrientation()) * palmData->getFingerDirection();
|
glm::vec3 direction = glm::inverse(myAvatar->getOrientation()) * palmData->getFingerDirection();
|
||||||
|
|
||||||
|
@ -508,7 +503,6 @@ void ApplicationCompositor::renderControllerPointers(gpu::Batch& batch) {
|
||||||
|
|
||||||
mouseX = (canvasSize.x / 2.0f + cursorRange * xAngle);
|
mouseX = (canvasSize.x / 2.0f + cursorRange * xAngle);
|
||||||
mouseY = (canvasSize.y / 2.0f + cursorRange * yAngle);
|
mouseY = (canvasSize.y / 2.0f + cursorRange * yAngle);
|
||||||
}
|
|
||||||
|
|
||||||
//If the cursor is out of the screen then don't render it
|
//If the cursor is out of the screen then don't render it
|
||||||
if (mouseX < 0 || mouseX >= (int)canvasSize.x || mouseY < 0 || mouseY >= (int)canvasSize.y) {
|
if (mouseX < 0 || mouseX >= (int)canvasSize.x || mouseY < 0 || mouseY >= (int)canvasSize.y) {
|
||||||
|
|
Loading…
Reference in a new issue