VR-Forces 4.6 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvOsg
DtOsgOverlayDirectionLineModelInstance.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2014 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvOsg/vrvOsg.h
>
13
#include <
vrvOsg/DtOsgModelInstance.h
>
14
15
namespace
makVrv
16
{
17
class
DtLineSegment;
18
21
class
DT_DLL_VRVOSG
DtOsgOverlayDirectionLineModelInstance
22
:
public
DtOsgModelInstance
23
{
24
public
:
25
27
DtOsgOverlayDirectionLineModelInstance
(
DtDe
& de);
28
30
virtual
~
DtOsgOverlayDirectionLineModelInstance
();
31
33
virtual
void
setVisible(
bool
);
34
36
virtual
void
setModelSet(
int
modelSet );
37
44
virtual
void
addPoint(
const
DtVector
& position,
int
index = -1);
45
47
virtual
void
setPosition(
int
index,
const
DtVector
& position);
48
50
virtual
void
setStipplePattern(
unsigned
int
stipple);
51
53
virtual
void
setColor(
float
r,
float
g,
float
b,
float
a);
54
56
virtual
void
setWidth(
float
width);
57
59
virtual
void
setEventsEnabled(
bool
,
unsigned
long
long
userData);
60
62
virtual
const
std::vector<DtVector>& points()
const
;
63
65
bool
eventsEnabled()
const
;
66
68
virtual
void
setPositionOffset(
const
DtVector
&);
69
71
virtual
void
setDirection(
int
index,
const
DtVector
& direction );
72
75
virtual
void
setLength(
int
index,
float
length );
76
78
virtual
void
update();
79
82
virtual
void
setGroup(
int
);
83
86
virtual
bool
realize(
DtModelDefinition
& definition);
87
88
89
protected
:
91
virtual
void
createLineIfNecessary();
92
94
virtual
void
updateAttributes();
95
97
virtual
void
updateGeometry();
98
100
virtual
void
set3DVertexPosition(
unsigned
int
index,
double
x,
double
y,
double
z );
101
102
protected
:
103
104
struct
DirectionAttributes
105
{
106
DirectionAttributes
()
107
: direction()
108
, length(0.0f)
109
{
110
}
111
112
DtVector
direction
;
113
float
length
;
114
};
115
116
std::vector<DtVector>
myPoints
;
117
DirectionAttributes
myDirections[2];
118
unsigned
int
myModelSet
;
119
DtLineSegment
*
myLine
;
120
121
osg::Vec4
myColor
;
122
float
myWidth
;
123
unsigned
int
myStipplePattern
;
124
125
bool
myGeometryDirty
;
126
bool
myAttributesDirty
;
127
bool
myEventsEnabled
;
128
bool
myVisibleFlag
;
129
unsigned
long
long
myUserData
;
130
131
DtVector
myPositionOffset
;
132
int
myGroup
;
133
};
134
}
135
136
Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)