mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 04:42:34 +02:00
remove HoverVoxel
This commit is contained in:
parent
633f358319
commit
cb4219b775
2 changed files with 0 additions and 29 deletions
|
@ -139,7 +139,6 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
||||||
_touchAvgY(0.0f),
|
_touchAvgY(0.0f),
|
||||||
_isTouchPressed(false),
|
_isTouchPressed(false),
|
||||||
_mousePressed(false),
|
_mousePressed(false),
|
||||||
_isHoverVoxel(false),
|
|
||||||
_isHighlightVoxel(false),
|
_isHighlightVoxel(false),
|
||||||
_chatEntryOn(false),
|
_chatEntryOn(false),
|
||||||
_audio(&_audioScope, STARTUP_JITTER_SAMPLES),
|
_audio(&_audioScope, STARTUP_JITTER_SAMPLES),
|
||||||
|
@ -1029,11 +1028,6 @@ void Application::mousePressEvent(QMouseEvent* event) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_isHoverVoxel || _myAvatar->getLookAtTargetAvatar()) {
|
|
||||||
// disable for now
|
|
||||||
// _pieMenu.mousePressEvent(_mouseX, _mouseY);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (event->button() == Qt::RightButton) {
|
} else if (event->button() == Qt::RightButton) {
|
||||||
// right click items here
|
// right click items here
|
||||||
}
|
}
|
||||||
|
@ -1701,9 +1695,6 @@ void Application::updateMyAvatarLookAtPosition() {
|
||||||
if (_myAvatar->getLookAtTargetAvatar()) {
|
if (_myAvatar->getLookAtTargetAvatar()) {
|
||||||
distance = glm::distance(_mouseRayOrigin,
|
distance = glm::distance(_mouseRayOrigin,
|
||||||
static_cast<Avatar*>(_myAvatar->getLookAtTargetAvatar())->getHead()->calculateAverageEyePosition());
|
static_cast<Avatar*>(_myAvatar->getLookAtTargetAvatar())->getHead()->calculateAverageEyePosition());
|
||||||
|
|
||||||
} else if (_isHoverVoxel) {
|
|
||||||
distance = glm::distance(_mouseRayOrigin, getMouseVoxelWorldCoordinates(_hoverVoxel));
|
|
||||||
}
|
}
|
||||||
const float FIXED_MIN_EYE_DISTANCE = 0.3f;
|
const float FIXED_MIN_EYE_DISTANCE = 0.3f;
|
||||||
float minEyeDistance = FIXED_MIN_EYE_DISTANCE + (_myCamera.getMode() == CAMERA_MODE_FIRST_PERSON ? 0.0f :
|
float minEyeDistance = FIXED_MIN_EYE_DISTANCE + (_myCamera.getMode() == CAMERA_MODE_FIRST_PERSON ? 0.0f :
|
||||||
|
@ -1734,17 +1725,6 @@ void Application::updateMyAvatarLookAtPosition() {
|
||||||
_myAvatar->getHead()->setLookAtPosition(lookAtSpot);
|
_myAvatar->getHead()->setLookAtPosition(lookAtSpot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::updateHoverVoxels(float deltaTime, float& distance, BoxFace& face) {
|
|
||||||
|
|
||||||
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
|
||||||
PerformanceWarning warn(showWarnings, "Application::updateHoverVoxels()");
|
|
||||||
|
|
||||||
if (!_mousePressed) {
|
|
||||||
PerformanceWarning warn(showWarnings, "Application::updateHoverVoxels() _voxels.findRayIntersection()");
|
|
||||||
_isHoverVoxel = getVoxelTree()->findRayIntersectionDetail(_mouseRayOrigin, _mouseRayDirection, _hoverVoxel, distance, face);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Application::updateHandAndTouch(float deltaTime) {
|
void Application::updateHandAndTouch(float deltaTime) {
|
||||||
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
||||||
PerformanceWarning warn(showWarnings, "Application::updateHandAndTouch()");
|
PerformanceWarning warn(showWarnings, "Application::updateHandAndTouch()");
|
||||||
|
@ -1893,11 +1873,6 @@ void Application::update(float deltaTime) {
|
||||||
_myAvatar->updateLookAtTargetAvatar();
|
_myAvatar->updateLookAtTargetAvatar();
|
||||||
updateMyAvatarLookAtPosition();
|
updateMyAvatarLookAtPosition();
|
||||||
|
|
||||||
// Find the voxel we are hovering over, and respond if clicked
|
|
||||||
float distance;
|
|
||||||
BoxFace face;
|
|
||||||
|
|
||||||
updateHoverVoxels(deltaTime, distance, face); // clicking on voxels and making sounds
|
|
||||||
updateHandAndTouch(deltaTime); // Update state for touch sensors
|
updateHandAndTouch(deltaTime); // Update state for touch sensors
|
||||||
updateLeap(deltaTime); // Leap finger-sensing device
|
updateLeap(deltaTime); // Leap finger-sensing device
|
||||||
updateSixense(deltaTime); // Razer Hydra controllers
|
updateSixense(deltaTime); // Razer Hydra controllers
|
||||||
|
|
|
@ -292,7 +292,6 @@ private:
|
||||||
void updateFaceshift();
|
void updateFaceshift();
|
||||||
void updateVisage();
|
void updateVisage();
|
||||||
void updateMyAvatarLookAtPosition();
|
void updateMyAvatarLookAtPosition();
|
||||||
void updateHoverVoxels(float deltaTime, float& distance, BoxFace& face);
|
|
||||||
void updateHandAndTouch(float deltaTime);
|
void updateHandAndTouch(float deltaTime);
|
||||||
void updateLeap(float deltaTime);
|
void updateLeap(float deltaTime);
|
||||||
void updateSixense(float deltaTime);
|
void updateSixense(float deltaTime);
|
||||||
|
@ -429,9 +428,6 @@ private:
|
||||||
|
|
||||||
bool _mousePressed; // true if mouse has been pressed (clear when finished)
|
bool _mousePressed; // true if mouse has been pressed (clear when finished)
|
||||||
|
|
||||||
VoxelDetail _hoverVoxel; // Stuff about the voxel I am hovering or clicking
|
|
||||||
bool _isHoverVoxel;
|
|
||||||
|
|
||||||
VoxelDetail _highlightVoxel;
|
VoxelDetail _highlightVoxel;
|
||||||
bool _isHighlightVoxel;
|
bool _isHighlightVoxel;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue