Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
SceneMouse.h
Go to the documentation of this file.
1/*
2 This source file is part of Rigs of Rods
3 Copyright 2005-2012 Pierre-Michel Ricordel
4 Copyright 2007-2012 Thomas Fischer
5 Copyright 2013-2014 Petr Ohlidal
6
7 For more information, see http://www.rigsofrods.org/
8
9 Rigs of Rods is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License version 3, as
11 published by the Free Software Foundation.
12
13 Rigs of Rods is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20*/
21
26
27#pragma once
28
29#include "Application.h"
30#include "SimData.h"
31
32#include <OIS.h>
33#include <Ogre.h>
34
35namespace RoR {
36
38{
39public:
40
41 SceneMouse();
42
43 bool handleMouseMoved();
44 bool handleMousePressed();
46
47 void InitializeVisuals();
48 void UpdateSimulation();
49 void UpdateVisuals();
50 void DiscardVisuals();
51
52protected:
53
54 Ogre::ManualObject* pickLine;
55 Ogre::SceneNode* pickLineNode;
57
59 float mindist;
61 Ogre::Vector3 lastgrabpos;
63
64 void releaseMousePick();
65 Ogre::Ray getMouseRay();
66 void reset();
67};
68
69} // namespace RoR
Central state/object manager and communications hub.
Core data structures for simulation; Everything affected by by either physics, network or user intera...
void InitializeVisuals()
void UpdateSimulation()
void DiscardVisuals()
void releaseMousePick()
Ogre::SceneNode * pickLineNode
Definition SceneMouse.h:55
Ogre::ManualObject * pickLine
Definition SceneMouse.h:54
bool handleMousePressed()
NodeNum_t minnode
Definition SceneMouse.h:58
Ogre::Ray getMouseRay()
Ogre::Vector3 lastgrabpos
Definition SceneMouse.h:61
bool handleMouseMoved()
bool handleMouseReleased()
ActorPtr grab_truck
Definition SceneMouse.h:60
static const NodeNum_t NODENUM_INVALID
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.