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
vrvGraphics
DtTriangleRenderer.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright (c) 2011 MAK Technologies, Inc.
3
* All rights reserved.
4
*****************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvGraphics/vrvGraphics.h
>
13
14
#include <
vrvGraphics/DtPrimitiveRenderer.h
>
15
16
#include <vector>
17
18
namespace
makVrv
19
{
20
21
class
DtBufferObject;
22
class
DtTriangleProxy;
23
class
DtPrimitiveStyle;
24
27
class
DT_DLL_VRVGRAPHICS
DtTriangleRenderer
:
public
DtPrimitiveRenderer
28
{
29
public
:
30
31
enum
Styles
32
{
33
Style_Flat = 0,
34
Style_Stippled
,
35
//Style_Textured,
36
Styles_End
37
};
38
39
friend
class
DtTriangleProxy
;
40
42
DtTriangleRenderer
(
DtOverlayResourceProvider
& resourceProvider );
43
45
virtual
~
DtTriangleRenderer
();
46
48
virtual
int
numberOfPrimitives()
const
;
49
51
virtual
void
render(
bool
geocentric,
float
geocentricAlpha
52
,
const
double
location[3]
53
,
const
double
positionMatrix[16]
54
,
const
double
projectionMatrix[16]);
55
57
virtual
void
releaseResources();
58
60
virtual
bool
isRenderModeSupported(
int
mode
);
61
63
DtTriangleProxy
* allocateProxy(
Styles
= Style_Flat);
64
65
protected
:
66
68
void
add(
DtTriangleProxy
* toAdd );
69
71
void
remove
(
const
DtTriangleProxy
*
const
proxy,
72
bool
isBeingDeleted = false );
73
75
void
dirty(
DtTriangleProxy
* proxy );
76
78
void
updateRenderData();
79
80
protected
:
81
82
typedef
std::vector<DtTriangleProxy*>
TriangleProxyList
;
83
84
DtPrimitiveStyle
* myStyles[Styles_End];
85
TriangleProxyList
myTriangles
;
86
TriangleProxyList
myDirtyList
;
87
88
};
89
90
94
class
DT_DLL_VRVGRAPHICS
DtTriangleProxy
95
{
96
public
:
97
98
friend
class
DtTriangleRenderer
;
99
101
~
DtTriangleProxy
();
102
104
void
setGroup(
float
order );
105
107
float
group()
const
;
108
110
void
set3DPositions(
111
float
x1,
float
y1,
float
z1,
float
w1,
112
float
x2,
float
y2,
float
z2,
float
w2,
113
float
x3,
float
y3,
float
z3,
float
w3 );
114
118
void
set3DPosition(
float
x,
float
y,
float
z,
float
w );
119
121
void
set3DPosition(
unsigned
int
index,
float
x,
float
y,
float
z,
122
float
w );
123
125
void
get3DPosition(
unsigned
int
index,
float
& x,
float
& y,
float
& z,
126
float
& w );
127
129
void
set2DPositions(
float
x1,
float
y1,
float
x2,
float
y2,
float
x3,
float
y3 );
130
132
void
set2DPosition(
unsigned
int
index,
float
x,
float
y );
133
135
void
get2DPosition(
unsigned
int
index,
float
& x,
float
& y )
const
;
136
138
void
setStyle(
int
style );
139
141
int
style()
const
;
142
144
void
setColor(
unsigned
int
vertIndex,
float
r,
float
g,
float
b,
145
float
a );
146
148
void
setColor(
float
r,
float
g,
float
b,
float
a );
149
151
void
getColor(
float
& r,
float
& g,
float
& b,
float
& a )
const
;
152
154
void
setFillParameters(
unsigned
int
fill,
155
unsigned
int
fullStipplePattern[32] = 0 );
156
158
void
setIndex(
unsigned
int
index );
159
161
unsigned
int
index()
const
;
162
163
protected
:
164
166
DtTriangleProxy
(
DtTriangleRenderer
& renderer,
unsigned
int
style );
167
168
protected
:
169
170
DtTriangleRenderer
*
myParent
;
171
unsigned
int
myIndex
;
172
unsigned
char
myStyle
;
173
bool
myDirtyBit
;
174
175
};
176
177
}
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
)