VR-Forces 4.3.1 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
DtCuboidModelInstance.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2009 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: DtCuboidModelInstance.h,v $ $Revision: 1.0 $ $State: Exp $
7
******************************************************************************/
8
12
13
#ifndef DtCuboidModelInstance_H_
14
#define DtCuboidModelInstance_H_
15
16
#include <
vrvOsg/vrvOsg.h
>
17
#include <
vrvOsg/DtOsgModelInstance.h
>
18
19
#include <osg/Geode>
20
21
namespace
makVrv
22
{
25
class
DT_DLL_VRVOSG
DtCuboidModelInstance
:
public
DtOsgModelInstance
26
{
27
public
:
28
29
struct
CuboidParameters
30
{
31
float
xLength
;
// x dimension
32
float
yLength
;
// y dimension
33
float
zLength
;
// z dimension
34
float
rColor
;
// RGBA red value
35
float
gColor
;
// RGBA green value
36
float
bColor
;
// RGBA blue value
37
float
aColor
;
// RGBA alpha value
38
bool
flashing
;
// Like HTML blink
39
};
40
42
static
const
CuboidParameters
defaultParameters
;
43
44
friend
class
DtCuboidModelInstanceCreator
;
45
47
virtual
~
DtCuboidModelInstance
();
48
50
virtual
void
setDimensions(
double
x,
double
y,
double
z);
51
53
virtual
void
setColor(
float
r,
float
g,
float
b,
float
a);
54
57
virtual
bool
realize(
DtModelDefinition
& definition);
58
60
virtual
void
addToConnector(
DtOsgSceneConnector
* connector );
61
63
virtual
bool
removeFromConnector(
DtOsgSceneConnector
* connector );
64
66
virtual
void
setVisible
(
bool
isVisible) {}
67
68
protected
:
70
DtCuboidModelInstance
(
DtDe
& de);
71
73
virtual
void
build(
const
CuboidParameters& parameters);
74
76
CuboidParameters
myParameters
;
77
78
osg::ref_ptr<osg::Geode>
myGeode
;
79
};
80
83
class
DT_DLL_VRVOSG
DtCuboidModelInstanceCreator
:
public
DtModelInstanceCreator
84
{
85
public
:
86
88
static
void
registerCreator(
DtDe
& de);
89
91
virtual
~
DtCuboidModelInstanceCreator
();
92
94
virtual
DtModelInstance
* create(
DtDe
& de);
95
96
protected
:
97
98
DtCuboidModelInstanceCreator
();
99
};
100
}
101
102
#endif
103
Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)