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
DtRibbonModelInstance.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright (c) 2012 MAK Technologies, Inc.
3
* All rights reserved.
4
*****************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvOsg/vrvOsg.h
>
13
14
#include <
vrvOsg/DtOsgModelInstance.h
>
15
#include <
vrvOsg/DtOsgRibbon.h
>
16
17
#include <
vrvUtil/DtSignalConnectionManager.h
>
18
19
#include <matrix/vlVector.h>
20
21
#include <osg/ref_ptr>
22
23
namespace
osg
24
{
25
class
Geode;
26
class
Group
;
27
}
28
29
namespace
makVrv
30
{
31
32
class
DtOsgRibbon;
33
class
DtSceneObject;
34
38
class
DT_DLL_VRVOSG
DtRibbonModelInstance
:
public
DtOsgModelInstance
39
{
40
public
:
41
43
virtual
~
DtRibbonModelInstance
();
44
47
virtual
bool
realize(
DtModelDefinition
& definition );
48
50
virtual
void
addToConnector(
DtOsgSceneConnector
* connector );
51
52
virtual
void
updateRibbonWidth();
53
55
virtual
bool
removeFromConnector(
DtOsgSceneConnector
* connector );
56
58
virtual
void
setParentSceneObject(
const
DtUniqueID
& sceneObjID );
59
62
virtual
DtSceneObject
* parentSceneObject();
63
66
virtual
void
setOcclusionEnabled(
bool
enabled );
67
69
virtual
void
setRibbonSpacing(
float
spacing );
70
75
virtual
void
setRibbonLength(
int
maxSamples );
76
78
virtual
void
setColor(
const
osg::Vec4& color );
79
81
virtual
void
setVisible
(
bool
isVisible ) {}
82
84
virtual
void
update();
85
86
osg::Node* sensorNode()
87
{
88
if
(myRibbon)
89
{
90
return
myRibbon->node();
91
}
else
92
{
93
return
NULL;
94
}
95
}
96
97
const
osg::Node* sensorNode()
const
98
{
99
if
(myRibbon)
100
{
101
return
myRibbon->node();
102
}
else
103
{
104
return
NULL;
105
}
106
}
107
108
protected
:
109
110
friend
class
DtRibbonModelInstanceCreator
;
111
113
DtRibbonModelInstance
(
DtDe
& de );
114
116
virtual
osg::Node* findFromCache(
DtModelDefinition
& definition );
117
118
DtSignalConnectionManager
myConnections
;
119
protected
:
120
121
osg::ref_ptr<DtOsgRibbon>
myRibbon
;
122
DtUniqueID
myParentId
;
123
bool
myOcclusionEnabled
;
124
float
myRibbonSpacing
;
125
int
myRibbonLength
;
126
bool
myColorSet
;
127
osg::Vec4
myColor
;
128
129
};
130
131
134
class
DT_DLL_VRVOSG
DtRibbonModelInstanceCreator
135
:
public
DtModelInstanceCreator
136
{
137
public
:
138
140
static
void
registerCreator(
DtDe
& de );
141
143
virtual
~
DtRibbonModelInstanceCreator
();
144
146
virtual
DtModelInstance
* create(
DtDe
& de );
147
148
protected
:
149
151
DtRibbonModelInstanceCreator
();
152
153
};
154
155
}
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
)