mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:48:09 +02:00
removed hand lasers because they had been renamed so they weren't removed
This commit is contained in:
parent
2bb7a20578
commit
782a5c491e
5 changed files with 11 additions and 24 deletions
|
@ -2838,7 +2838,7 @@ void Application::emulateMouse(Hand* hand, float click, float shift, int index)
|
||||||
|
|
||||||
unsigned int deviceID = index == 0 ? CONTROLLER_0_EVENT : CONTROLLER_1_EVENT;
|
unsigned int deviceID = index == 0 ? CONTROLLER_0_EVENT : CONTROLLER_1_EVENT;
|
||||||
|
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::HandLasers) || qApp->isHMDMode()) {
|
if (qApp->isHMDMode()) {
|
||||||
pos = qApp->getApplicationCompositor().getPalmClickLocation(palm);
|
pos = qApp->getApplicationCompositor().getPalmClickLocation(palm);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -3551,11 +3551,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se
|
||||||
sceneInterface->setEngineDrawnOverlay3DItems(engineRC->_numDrawnOverlay3DItems);
|
sceneInterface->setEngineDrawnOverlay3DItems(engineRC->_numDrawnOverlay3DItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Render the sixense lasers
|
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::HandLasers)) {
|
|
||||||
_myAvatar->renderLaserPointers(*renderArgs->_batch);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!selfAvatarOnly) {
|
if (!selfAvatarOnly) {
|
||||||
// give external parties a change to hook in
|
// give external parties a change to hook in
|
||||||
{
|
{
|
||||||
|
|
|
@ -437,7 +437,6 @@ Menu::Menu() {
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::DisplayHands, 0, true);
|
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::DisplayHands, 0, true);
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::DisplayHandTargets, 0, false);
|
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::DisplayHandTargets, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::HandMouseInput, 0, true);
|
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::HandMouseInput, 0, true);
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::HandLasers, 0, false);
|
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::LowVelocityFilter, 0, true,
|
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::LowVelocityFilter, 0, true,
|
||||||
qApp, SLOT(setLowVelocityFilter(bool)));
|
qApp, SLOT(setLowVelocityFilter(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::ShowIKConstraints, 0, false);
|
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::ShowIKConstraints, 0, false);
|
||||||
|
|
|
@ -196,7 +196,6 @@ namespace MenuOption {
|
||||||
const QString FullscreenMirror = "Fullscreen Mirror";
|
const QString FullscreenMirror = "Fullscreen Mirror";
|
||||||
const QString GlowWhenSpeaking = "Glow When Speaking";
|
const QString GlowWhenSpeaking = "Glow When Speaking";
|
||||||
const QString HandMouseInput = "Enable Hand Mouse Input";
|
const QString HandMouseInput = "Enable Hand Mouse Input";
|
||||||
const QString HandLasers = "Enable Hand UI Lasers";
|
|
||||||
const QString IncreaseAvatarSize = "Increase Avatar Size";
|
const QString IncreaseAvatarSize = "Increase Avatar Size";
|
||||||
const QString IndependentMode = "Independent Mode";
|
const QString IndependentMode = "Independent Mode";
|
||||||
const QString InputMenu = "Avatar>Input Devices";
|
const QString InputMenu = "Avatar>Input Devices";
|
||||||
|
|
|
@ -511,24 +511,19 @@ 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::HandLasers)) {
|
|
||||||
QPoint res = getPalmClickLocation(palmData);
|
|
||||||
mouseX = res.x();
|
|
||||||
mouseY = res.y();
|
|
||||||
} else {
|
|
||||||
// Get directon relative to avatar orientation
|
|
||||||
glm::vec3 direction = glm::inverse(myAvatar->getOrientation()) * palmData->getFingerDirection();
|
|
||||||
|
|
||||||
// Get the angles, scaled between (-0.5,0.5)
|
// Get directon relative to avatar orientation
|
||||||
float xAngle = (atan2f(direction.z, direction.x) + PI_OVER_TWO);
|
glm::vec3 direction = glm::inverse(myAvatar->getOrientation()) * palmData->getFingerDirection();
|
||||||
float yAngle = 0.5f - ((atan2f(direction.z, direction.y) + (float)PI_OVER_TWO));
|
|
||||||
|
|
||||||
// Get the pixel range over which the xAngle and yAngle are scaled
|
// Get the angles, scaled between (-0.5,0.5)
|
||||||
float cursorRange = canvasSize.x * InputDevice::getCursorPixelRangeMult();
|
float xAngle = (atan2f(direction.z, direction.x) + PI_OVER_TWO);
|
||||||
|
float yAngle = 0.5f - ((atan2f(direction.z, direction.y) + (float)PI_OVER_TWO));
|
||||||
|
|
||||||
mouseX = (canvasSize.x / 2.0f + cursorRange * xAngle);
|
// Get the pixel range over which the xAngle and yAngle are scaled
|
||||||
mouseY = (canvasSize.y / 2.0f + cursorRange * yAngle);
|
float cursorRange = canvasSize.x * InputDevice::getCursorPixelRangeMult();
|
||||||
}
|
|
||||||
|
mouseX = (canvasSize.x / 2.0f + cursorRange * xAngle);
|
||||||
|
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) {
|
||||||
|
|
|
@ -147,7 +147,6 @@ public:
|
||||||
NamesAboveHeads,
|
NamesAboveHeads,
|
||||||
GoToUser,
|
GoToUser,
|
||||||
HandMouseInput,
|
HandMouseInput,
|
||||||
HandLasers,
|
|
||||||
HMDTools,
|
HMDTools,
|
||||||
IncreaseAvatarSize,
|
IncreaseAvatarSize,
|
||||||
KeyboardMotorControl,
|
KeyboardMotorControl,
|
||||||
|
|
Loading…
Reference in a new issue