mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:03:53 +02:00
undo unnessary changes
This commit is contained in:
parent
28d8af0b44
commit
ee9ac3e7f9
3 changed files with 1 additions and 32 deletions
|
@ -279,18 +279,6 @@ bool CompositorHelper::getReticleOverDesktop() const {
|
|||
return _isOverDesktop;
|
||||
}
|
||||
|
||||
bool CompositorHelper::isPositionOverDesktop(glm::vec2 position) const {
|
||||
if (isHMD()) {
|
||||
glm::vec2 maxOverlayPosition = _currentDisplayPlugin->getRecommendedUiSize();
|
||||
static const glm::vec2 minOverlayPosition;
|
||||
if (glm::any(glm::lessThan(position, minOverlayPosition)) ||
|
||||
glm::any(glm::greaterThan(position, maxOverlayPosition))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return _isOverDesktop;
|
||||
}
|
||||
|
||||
glm::vec2 CompositorHelper::getReticleMaximumPosition() const {
|
||||
glm::vec2 result;
|
||||
if (isHMD()) {
|
||||
|
@ -480,7 +468,3 @@ void ReticleInterface::setScale(float scale) {
|
|||
auto& cursorManager = Cursor::Manager::instance();
|
||||
cursorManager.setScale(scale);
|
||||
}
|
||||
|
||||
bool ReticleInterface::isPointOnSystemOverlay(QVariant position) {
|
||||
return !_compositor->isPositionOverDesktop(vec2FromVariant(position));
|
||||
}
|
||||
|
|
|
@ -106,7 +106,6 @@ public:
|
|||
|
||||
/// if the reticle is pointing to a system overlay (a dialog box for example) then the function returns true otherwise false
|
||||
bool getReticleOverDesktop() const;
|
||||
bool isPositionOverDesktop(glm::vec2 position) const;
|
||||
void setReticleOverDesktop(bool value) { _isOverDesktop = value; }
|
||||
|
||||
void setDisplayPlugin(const DisplayPluginPointer& displayPlugin) { _currentDisplayPlugin = displayPlugin; }
|
||||
|
@ -196,7 +195,6 @@ public:
|
|||
Q_INVOKABLE void setAllowMouseCapture(bool value) { return _compositor->setAllowMouseCapture(value); }
|
||||
|
||||
Q_INVOKABLE bool isPointingAtSystemOverlay() { return !_compositor->getReticleOverDesktop(); }
|
||||
Q_INVOKABLE bool isPointOnSystemOverlay(QVariant position);
|
||||
|
||||
Q_INVOKABLE bool getVisible() { return _compositor->getReticleVisible(); }
|
||||
Q_INVOKABLE void setVisible(bool visible) { _compositor->setReticleVisible(visible); }
|
||||
|
|
|
@ -40,8 +40,7 @@
|
|||
entityHasActions:true,
|
||||
ensureDynamic:true,
|
||||
findGroupParent:true,
|
||||
BUMPER_ON_VALUE:true,
|
||||
isPointingAtUI: true
|
||||
BUMPER_ON_VALUE:true
|
||||
*/
|
||||
|
||||
MSECS_PER_SEC = 1000.0;
|
||||
|
@ -311,18 +310,6 @@ findGroupParent = function (controllerData, targetProps) {
|
|||
return targetProps;
|
||||
};
|
||||
|
||||
isPointingAtUI = function(intersection) {
|
||||
var MARGIN = 25;
|
||||
var reticleMinX = MARGIN, reticleMaxX, reticleMinY = MARGIN, reticleMaxY;
|
||||
var dims = Controller.getViewportDimensions();
|
||||
reticleMaxX = dims.x - MARGIN;
|
||||
reticleMaxY = dims.y - MARGIN;
|
||||
var point2d = HMD.overlayFromWorldPoint(intersection.intersection);
|
||||
point2d.x = Math.max(reticleMinX, Math.min(point2d.x, reticleMaxX));
|
||||
point2d.y = Math.max(reticleMinY, Math.min(point2d.y, reticleMaxY));
|
||||
return point2d;
|
||||
}
|
||||
|
||||
if (typeof module !== 'undefined') {
|
||||
module.exports = {
|
||||
makeDispatcherModuleParameters: makeDispatcherModuleParameters,
|
||||
|
|
Loading…
Reference in a new issue