RigsofRods
Soft-body Physics Simulation
source
main
gameplay
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
35
namespace
RoR
{
36
37
class
SceneMouse
38
{
39
public
:
40
41
SceneMouse
();
42
43
bool
mouseMoved
(
const
OIS::MouseEvent& _arg);
44
bool
mousePressed
(
const
OIS::MouseEvent& _arg, OIS::MouseButtonID _id);
45
bool
mouseReleased
(
const
OIS::MouseEvent& _arg, OIS::MouseButtonID _id);
46
47
void
InitializeVisuals
();
48
void
UpdateSimulation
();
49
void
UpdateVisuals
();
50
void
DiscardVisuals
();
51
52
protected
:
53
54
Ogre::ManualObject*
pickLine
;
55
Ogre::SceneNode*
pickLineNode
;
56
int
mouseGrabState
;
57
58
NodeNum_t
minnode
=
NODENUM_INVALID
;
59
float
mindist
;
60
ActorPtr
grab_truck
;
61
Ogre::Vector3
lastgrabpos
;
62
int
lastMouseX
,
lastMouseY
;
63
64
void
releaseMousePick
();
65
Ogre::Ray
getMouseRay
();
66
void
reset
();
67
};
68
69
}
// namespace RoR
RoR::SceneMouse::lastMouseX
int lastMouseX
Definition:
SceneMouse.h:62
RoR::SceneMouse::mousePressed
bool mousePressed(const OIS::MouseEvent &_arg, OIS::MouseButtonID _id)
Definition:
SceneMouse.cpp:227
RoR::SceneMouse::mouseMoved
bool mouseMoved(const OIS::MouseEvent &_arg)
Definition:
SceneMouse.cpp:114
RoR::SceneMouse::reset
void reset()
Definition:
SceneMouse.cpp:101
RoR::SceneMouse::DiscardVisuals
void DiscardVisuals()
Definition:
SceneMouse.cpp:75
RoR::SceneMouse
Definition:
SceneMouse.h:37
RoR::NODENUM_INVALID
static const NodeNum_t NODENUM_INVALID
Definition:
ForwardDeclarations.h:53
RoR::SceneMouse::UpdateSimulation
void UpdateSimulation()
Definition:
SceneMouse.cpp:197
RefCountingObjectPtr< Actor >
RoR::SceneMouse::lastMouseY
int lastMouseY
Definition:
SceneMouse.h:62
RoR::SceneMouse::mouseGrabState
int mouseGrabState
Definition:
SceneMouse.h:56
RoR::SceneMouse::InitializeVisuals
void InitializeVisuals()
Definition:
SceneMouse.cpp:50
RoR::NodeNum_t
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
Definition:
ForwardDeclarations.h:52
RoR::SceneMouse::SceneMouse
SceneMouse()
Definition:
SceneMouse.cpp:41
SimData.h
Core data structures for simulation; Everything affected by by either physics, network or user intera...
RoR::SceneMouse::UpdateVisuals
void UpdateVisuals()
Definition:
SceneMouse.cpp:210
Application.h
Central state/object manager and communications hub.
RoR::SceneMouse::grab_truck
ActorPtr grab_truck
Definition:
SceneMouse.h:60
RoR::SceneMouse::mindist
float mindist
Definition:
SceneMouse.h:59
RoR::SceneMouse::getMouseRay
Ogre::Ray getMouseRay()
Definition:
SceneMouse.cpp:315
RoR::SceneMouse::pickLine
Ogre::ManualObject * pickLine
Definition:
SceneMouse.h:54
RoR::SceneMouse::lastgrabpos
Ogre::Vector3 lastgrabpos
Definition:
SceneMouse.h:61
RoR::SceneMouse::pickLineNode
Ogre::SceneNode * pickLineNode
Definition:
SceneMouse.h:55
RoR::SceneMouse::mouseReleased
bool mouseReleased(const OIS::MouseEvent &_arg, OIS::MouseButtonID _id)
Definition:
SceneMouse.cpp:303
RoR::SceneMouse::releaseMousePick
void releaseMousePick()
Definition:
SceneMouse.cpp:90
RoR::SceneMouse::minnode
NodeNum_t minnode
Definition:
SceneMouse.h:58
RoR
Definition:
AppContext.h:36
Generated by
1.8.17