VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrvOsg
DtArticulatingCylinderModelInstance.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2009 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: DtArticulatingCylinderModelInstance.h,v $ $Revision: 1.0 $ $State: Exp $
7
******************************************************************************/
8
12
13
#ifndef DtArticulatingCylinderModelInstance_H_
14
#define DtArticulatingCylinderModelInstance_H_
15
16
#include <
vrvOsg/vrvOsg.h
>
17
#include <
vrvOsg/DtOsgModelInstance.h
>
18
19
#include <osg/Geode>
20
#include <osg/MatrixTransform>
21
#include <osg/ShapeDrawable>
22
23
namespace
makVrv
24
{
27
class
DT_DLL_VRVOSG
DtArticulatingCylinderModelInstance
28
:
public
DtOsgModelInstance
29
{
30
public
:
31
32
struct
AttachedCylinderParameters
33
{
34
float
xLength
;
// x dimension
35
float
yLength
;
// y dimension
36
float
zLength
;
// z dimension
37
float
rColor
;
// RGBA red value
38
float
gColor
;
// RGBA green value
39
float
bColor
;
// RGBA blue value
40
float
aColor
;
// RGBA alpha value
41
bool
flashing
;
// Like HTML blink
42
};
43
45
static
const
AttachedCylinderParameters
defaultParameters
;
46
48
DtArticulatingCylinderModelInstance
(
DtDe
& de);
49
51
virtual
~
DtArticulatingCylinderModelInstance
();
52
54
virtual
void
setDimensions(
double
x,
double
y,
double
z);
55
57
virtual
void
setColor(
float
r,
float
g,
float
b,
float
a);
58
60
virtual
void
setLightingEnabled(
bool
enabled );
61
64
virtual
bool
realize(
DtModelDefinition
& definition);
65
67
virtual
void
addToConnector(
DtOsgSceneConnector
* connector );
68
70
virtual
bool
removeFromConnector(
DtOsgSceneConnector
* connector );
71
73
virtual
void
setVisible
(
bool
isVisible) {}
74
75
protected
:
76
78
virtual
void
buildGeometry(
const
AttachedCylinderParameters& parameters);
79
81
virtual
void
buildState(
const
AttachedCylinderParameters& parameters);
82
84
AttachedCylinderParameters
myParameters
;
85
86
osg::ref_ptr<osg::ShapeDrawable>
myCylinderDrawable
;
87
89
osg::ref_ptr<osg::Geode>
myFrontGeode
;
90
92
osg::ref_ptr<osg::Geode>
myBackGeode
;
93
94
osg::ref_ptr<osg::MatrixTransform>
myTransform
;
95
};
96
}
97
98
#endif
99
Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)