VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvGraphics
DtTexturedLineSegment.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2012 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
6
7
#pragma once
8
#include <
vrvGraphics/vrvGraphics.h
>
9
#include <
vrvGraphics/DtOverlayResourceProvider.h
>
10
#include <
vrvGraphics/DtLineSegmentInterface.h
>
11
12
namespace
makVrv
13
{
14
class
DtQuadProxy;
15
class
DtQuadRenderer;
16
class
DtOverlayRenderer;
17
20
class
DT_DLL_VRVGRAPHICS
DtTexturedLineSegment
:
public
DtLineSegmentInterface
21
{
22
public
:
23
25
DtTexturedLineSegment
(
DtOverlayRenderer
& renderer);
26
28
DtTexturedLineSegment
(
DtQuadRenderer
& renderer);
29
31
virtual
~
DtTexturedLineSegment
();
32
37
void
setGroup(
float
group);
38
40
int
group()
const
;
41
43
void
set2DPosition(
unsigned
int
index0or1,
float
x,
float
y);
44
45
//Set the position of the vertex.
46
void
get2DPosition(
unsigned
int
index0or1,
float
& x,
float
& y )
const
;
47
50
void
set3DPosition(
int
index0or1,
float
dx,
float
dy,
float
z,
float
w);
51
52
//Get the 3D position of the line.
53
void
get3DPosition(
int
index0or1,
float
& dx,
float
& dy,
float
& z,
float
& w)
const
;
54
55
//Set the vertex color.
56
void
setColor(
float
r,
float
g,
float
b,
float
a);
57
58
//Get the vertex color.
59
void
getColor(
float
& r,
float
& g,
float
& b,
float
& a)
const
;
60
63
void
setWidth(
float
w);
64
66
float
width()
const
;
67
71
virtual
void
setTextureParameters(
DtOverlayResourceProvider::NativeResourceHandle
texture,
72
float
myTextureWidth,
float
left = 0.0f,
float
right = 1.0f,
73
float
bottom = 0.0f,
float
top = 1.0f );
74
76
virtual
void
setZoomFactor(
float
z);
77
79
virtual
void
set2DPositions(
float
x1,
float
y1,
float
x2,
float
y2);
80
81
//Set the vertex color.
82
virtual
void
setColor(
unsigned
int
index0or1,
float
r,
float
g,
float
b,
float
a);
83
84
//Get the vertex color.
85
virtual
void
getColor(
unsigned
int
index0or1,
float
& r,
float
& g,
float
& b,
float
& a)
const
;
86
88
virtual
void
setColors(
float
r1,
float
g1,
float
b1,
float
a1,
89
float
r2,
float
g2,
float
b2,
float
a2);
90
92
virtual
void
setRotationOffset(
float
);
93
95
protected
:
96
99
virtual
void
set3DDirection
(
unsigned
int
index0or1,
float
x,
float
y,
float
z) {};
100
102
virtual
void
get3DDirection
(
unsigned
int
index0or1,
float
& x,
float
& y,
float
& z)
const
{};
103
105
virtual
void
setDirection2DLength
(
unsigned
int
index0or1,
float
length) {};
106
108
virtual
float
direction2DLength
(
unsigned
int
index0or1)
const
{
return
0.0f; };
109
111
virtual
void
setStippleParameters(
unsigned
int
scale,
unsigned
short
pattern);
112
115
virtual
void
getStippleParameters(
unsigned
int
& scale,
unsigned
short
& pattern)
const
;
116
117
protected
:
119
virtual
void
resetTextureCoordinates();
120
121
private
:
122
123
DtTexturedLineSegment
(
const
DtTexturedLineSegment
&);
124
DtTexturedLineSegment
& operator=(
const
DtTexturedLineSegment
&);
125
126
protected
:
127
DtQuadProxy
*
myVertex
;
128
float
myVertices[2][4];
129
float
my2DVertices[2][2];
130
DtOverlayResourceProvider::NativeResourceHandle
myTexture
;
131
float
myTextureWidth
;
132
float
myZoomFactor
;
133
float
myRotationOffset
;
134
135
protected
:
136
DtTexturedLineSegment
() { myVertex = 0; };
137
};
138
139
}
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)