vrecko
virtual reality framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
vrecko
Vrecko - the Virtual Reality Engine
Dynamic Art module
L-system plant modeler - module for Vrecko
Head Up Display module
Space Partitioning - module for Vrecko
Todo List
Deprecated List
Namespaces
Classes
Files
File List
include
base
AP_base.h
Avatar.h
Display.h
hand.h
Light.h
MouseHand.h
MTMatrixTransform.h
Rotate.h
ShowFDH.h
ShowFDHModel.h
SystemInfo.h
helpers
vrecko
vreckoAP
vreckoDP
vreckoUtils
src
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
MouseHand.h
Go to the documentation of this file.
1
#ifndef MOUSEHAND_H
2
#define MOUSEHAND_H
3
4
#include <string>
5
6
#include <
vrecko/Ability.h
>
7
8
#include <
vrecko/EnvironmentObject.h
>
9
10
using namespace
vrecko;
11
12
namespace
base {
13
14
class
MouseHand
:
public
Ability
{
15
public
:
16
static
const
std::string
GRAB_EVENT
;
17
static
const
std::string
GRAB_RELEASE_EVENT
;
18
static
const
std::string
BRICK_MOVE_EVENT
;
19
20
MouseHand
();
21
~MouseHand
() {};
22
23
// ------ BaseClass functions ------------------------
25
void
processEvent(
const
std::string &input_name,
void
*value);
26
// ---------------------------------------------------
27
28
void
update(
void
);
29
30
void
preInitialize
() {owner = (
EnvironmentObject
*)pOwner;}
31
32
protected
:
33
osg::Vec3 _grab_position, _actual_position,
_last_position
;
34
osg::Matrix _grab_rotation, _actual_rotation,
_last_rotation
;
35
osg::Matrix
_parent_rotation
, _parent_inverse_rotation;
36
bool
_first
;
37
bool
dyn_version
;
38
39
EnvironmentObject
*
selected_object
;
40
Ability
*
ab_with_input_Use
;
41
bool
manipulate
;
42
43
osg::Vec3 _last_positions[200];
44
int
_current_pos
;
45
osg::Matrix
_grab_rotation2
;
46
osg::Vec3
_grab_position2
;
47
osg::Vec3
force
;
48
bool
first
;
49
50
osg::Vec2
mouse_position
;
51
osg::Vec3
scene_mouse_position
;
52
float
z_position,
z_step
;
53
54
// new
55
osg::Matrix grab_transform, current_transform,
last_transform
;
56
osg::Matrix grab_transform_SO,
SOparent_mat
;
57
58
EnvironmentObject
*
owner
;
59
60
61
DECLARE_INPUT
(Grab, MessageBool);
62
DECLARE_INPUT
(Position,
MessageVec2
);
63
DECLARE_INPUT
(ZChange, MessageFloat);
64
65
DECLARE_OUTPUT
(Grab, MessageObjectID);
66
DECLARE_OUTPUT
(GrabRelease, MessageObjectID);
67
DECLARE_OUTPUT
(BrickMove, MessageObjectID);
68
};
69
70
}
71
72
#endif
include
base
MouseHand.h
Generated on Tue Feb 19 2013 10:23:40 for vrecko by
1.8.3.1