mirror of
https://github.com/overte-org/overte.git
synced 2025-05-29 12:30:29 +02:00
More unused
This commit is contained in:
parent
34bba28775
commit
dde11c5cd1
5 changed files with 1 additions and 21 deletions
|
@ -363,7 +363,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
_scaleMirror(1.0f),
|
_scaleMirror(1.0f),
|
||||||
_rotateMirror(0.0f),
|
_rotateMirror(0.0f),
|
||||||
_raiseMirror(0.0f),
|
_raiseMirror(0.0f),
|
||||||
_cursorVisible(true),
|
|
||||||
_lastMouseMove(usecTimestampNow()),
|
_lastMouseMove(usecTimestampNow()),
|
||||||
_lastMouseMoveWasSimulated(false),
|
_lastMouseMoveWasSimulated(false),
|
||||||
_isTouchPressed(false),
|
_isTouchPressed(false),
|
||||||
|
@ -2809,10 +2808,6 @@ void Application::updateCursor(float deltaTime) {
|
||||||
lastMousePos = QCursor::pos();
|
lastMousePos = QCursor::pos();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::setCursorVisible(bool visible) {
|
|
||||||
_cursorVisible = visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Application::update(float deltaTime) {
|
void Application::update(float deltaTime) {
|
||||||
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
||||||
PerformanceWarning warn(showWarnings, "Application::update()");
|
PerformanceWarning warn(showWarnings, "Application::update()");
|
||||||
|
|
|
@ -163,7 +163,6 @@ public:
|
||||||
EntityEditPacketSender* getEntityEditPacketSender() { return &_entityEditSender; }
|
EntityEditPacketSender* getEntityEditPacketSender() { return &_entityEditSender; }
|
||||||
|
|
||||||
bool isMousePressed() const { return _mousePressed; }
|
bool isMousePressed() const { return _mousePressed; }
|
||||||
bool isMouseHidden() const { return !_cursorVisible; }
|
|
||||||
const glm::vec3& getMouseRayOrigin() const { return _mouseRayOrigin; }
|
const glm::vec3& getMouseRayOrigin() const { return _mouseRayOrigin; }
|
||||||
const glm::vec3& getMouseRayDirection() const { return _mouseRayDirection; }
|
const glm::vec3& getMouseRayDirection() const { return _mouseRayDirection; }
|
||||||
bool mouseOnScreen() const;
|
bool mouseOnScreen() const;
|
||||||
|
@ -397,12 +396,9 @@ private slots:
|
||||||
void audioMuteToggled();
|
void audioMuteToggled();
|
||||||
void faceTrackerMuteToggled();
|
void faceTrackerMuteToggled();
|
||||||
|
|
||||||
void setCursorVisible(bool visible);
|
|
||||||
void activeChanged(Qt::ApplicationState state);
|
void activeChanged(Qt::ApplicationState state);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void resetCameras(Camera& camera, const glm::uvec2& size);
|
|
||||||
|
|
||||||
void initDisplay();
|
void initDisplay();
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
|
@ -423,10 +419,6 @@ private:
|
||||||
void updateDialogs(float deltaTime);
|
void updateDialogs(float deltaTime);
|
||||||
void updateCursor(float deltaTime);
|
void updateCursor(float deltaTime);
|
||||||
|
|
||||||
Avatar* findLookatTargetAvatar(glm::vec3& eyePosition, QUuid &nodeUUID);
|
|
||||||
|
|
||||||
void renderLookatIndicator(glm::vec3 pointOfInterest);
|
|
||||||
|
|
||||||
void queryOctree(NodeType_t serverType, PacketType packetType, NodeToJurisdictionMap& jurisdictions);
|
void queryOctree(NodeType_t serverType, PacketType packetType, NodeToJurisdictionMap& jurisdictions);
|
||||||
void loadViewFrustum(Camera& camera, ViewFrustum& viewFrustum);
|
void loadViewFrustum(Camera& camera, ViewFrustum& viewFrustum);
|
||||||
|
|
||||||
|
@ -497,7 +489,6 @@ private:
|
||||||
|
|
||||||
Environment _environment;
|
Environment _environment;
|
||||||
|
|
||||||
bool _cursorVisible;
|
|
||||||
ivec2 _mouseDragStarted;
|
ivec2 _mouseDragStarted;
|
||||||
|
|
||||||
quint64 _lastMouseMove;
|
quint64 _lastMouseMove;
|
||||||
|
|
|
@ -65,10 +65,6 @@ void WindowScriptingInterface::setCursorVisible(bool visible) {
|
||||||
Q_ARG(bool, visible));
|
Q_ARG(bool, visible));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WindowScriptingInterface::isCursorVisible() const {
|
|
||||||
return !qApp->isMouseHidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
void WindowScriptingInterface::setCursorPosition(int x, int y) {
|
void WindowScriptingInterface::setCursorPosition(int x, int y) {
|
||||||
QCursor::setPos(x, y);
|
QCursor::setPos(x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,14 +27,12 @@ class WindowScriptingInterface : public QObject, public Dependency {
|
||||||
Q_PROPERTY(int innerHeight READ getInnerHeight)
|
Q_PROPERTY(int innerHeight READ getInnerHeight)
|
||||||
Q_PROPERTY(int x READ getX)
|
Q_PROPERTY(int x READ getX)
|
||||||
Q_PROPERTY(int y READ getY)
|
Q_PROPERTY(int y READ getY)
|
||||||
Q_PROPERTY(bool cursorVisible READ isCursorVisible WRITE setCursorVisible)
|
|
||||||
public:
|
public:
|
||||||
WindowScriptingInterface();
|
WindowScriptingInterface();
|
||||||
int getInnerWidth();
|
int getInnerWidth();
|
||||||
int getInnerHeight();
|
int getInnerHeight();
|
||||||
int getX();
|
int getX();
|
||||||
int getY();
|
int getY();
|
||||||
bool isCursorVisible() const;
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
QScriptValue getCursorPositionX();
|
QScriptValue getCursorPositionX();
|
||||||
|
|
|
@ -425,7 +425,7 @@ bool ApplicationCompositor::calculateRayUICollisionPoint(const glm::vec3& positi
|
||||||
|
|
||||||
//Renders optional pointers
|
//Renders optional pointers
|
||||||
void ApplicationCompositor::renderPointers(gpu::Batch& batch) {
|
void ApplicationCompositor::renderPointers(gpu::Batch& batch) {
|
||||||
if (qApp->isHMDMode() && !qApp->getLastMouseMoveWasSimulated() && !qApp->isMouseHidden()) {
|
if (qApp->isHMDMode() && !qApp->getLastMouseMoveWasSimulated()) {
|
||||||
//If we are in oculus, render reticle later
|
//If we are in oculus, render reticle later
|
||||||
auto trueMouse = qApp->getTrueMouse();
|
auto trueMouse = qApp->getTrueMouse();
|
||||||
trueMouse /= qApp->getCanvasSize();
|
trueMouse /= qApp->getCanvasSize();
|
||||||
|
|
Loading…
Reference in a new issue