VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
drawertdb
terrainPolygonDrawer.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 2006 MaK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************/
5
/*********************************************************************
6
** $RCSfile: terrainPolygonDrawer.h,v $ $Revision: 1.3 $ $State: Exp $
7
*********************************************************************/
8
11
12
#ifndef TERRAINPOLYGONDRAWER_H
13
#define TERRAINPOLYGONDRAWER_H
14
15
#include "
drawertdb/drawertdbDefines.h
"
16
#include "
drawertdb/terrainDrawer.h
"
17
18
#include <QtGui/QColor>
19
20
class
DtGroup
;
21
class
DtGdbNode
;
22
class
DtHomogeneousTransfMatrix
;
23
class
DtLevelOfDetail
;
24
class
DtBaseCoordinateSystem
;
25
class
DtFeature
;
26
class
DtFileNode
;
27
class
DtAllTypesPolygon
;
28
34
35
typedef
QColor (*
DtPolygonColorFcn
)(
const
DtAllTypesPolygon
*,
const
DtViewportExtents
* v,
void
* usr);
36
37
class
DT_DLL_drawertdb
DtTerrainPolygonDrawer
:
public
DtTerrainDrawer
38
{
39
public
:
40
DtTerrainPolygonDrawer
();
41
DtTerrainPolygonDrawer
(
const
DtTerrainPolygonDrawer
&);
42
43
virtual
~
DtTerrainPolygonDrawer
();
44
45
const
DtTerrainPolygonDrawer
&
operator=
(
const
DtTerrainPolygonDrawer
&);
46
48
void
setDrawBoundingVolumes(
bool
);
49
bool
drawBoundingVolumes()
const
;
50
51
void
setBoundingVolumesColor(
const
QColor&);
52
const
QColor& boundingVolumesColor()
const
;
53
54
void
setPolygonColorFcn(
DtPolygonColorFcn
,
void
*);
55
56
static
DtTerrainPolygonDrawer
* create();
57
59
virtual
void
drawPolygons(
const
DtAllTypesPolygon
*polygon,
60
const
DtViewportExtents
* v,
DtPrimitiveDrawer
* painter);
61
63
virtual
void
colorPolygonByHeight(
DtAllTypesPolygon
& thePolygon,
const
DtViewportExtents
* v);
64
65
protected
:
66
virtual
void
internalDraw
(
const
DtTerrainDatabase
*,
const
DtViewportExtents
*,
DtPrimitiveDrawer
* painter);
67
68
protected
:
70
virtual
void
drawAllNodeTypes(
const
DtGdbNode
* node,
71
const
DtHomogeneousTransfMatrix
&matrix,
const
DtViewportExtents
* v,
DtPrimitiveDrawer
* painter);
72
73
virtual
void
drawGroup(
const
DtGroup
*group,
74
const
DtHomogeneousTransfMatrix
&matrix,
const
DtViewportExtents
* v,
DtPrimitiveDrawer
* painter);
75
76
virtual
void
drawLevelOfDetail(
const
DtLevelOfDetail
*level_of_detail,
77
const
DtHomogeneousTransfMatrix
&matrix,
const
DtViewportExtents
* v,
DtPrimitiveDrawer
* painter);
78
79
virtual
void
drawCoordinateSystem(
const
DtBaseCoordinateSystem
*cs,
80
const
DtHomogeneousTransfMatrix
&matrix,
const
DtViewportExtents
* v,
DtPrimitiveDrawer
* painter);
81
82
virtual
void
drawFeature(
const
DtFeature
*moddef,
83
const
DtHomogeneousTransfMatrix
&matrix,
const
DtViewportExtents
* v,
DtPrimitiveDrawer
* painter);
84
85
virtual
void
drawFileNode(
const
DtFileNode
* fileNode,
86
const
DtHomogeneousTransfMatrix
& matrix,
const
DtViewportExtents
* v,
DtPrimitiveDrawer
* painter);
87
88
virtual
void
drawPolygon(
const
DtAllTypesPolygon
*polygon,
89
const
DtHomogeneousTransfMatrix
& matrix,
const
DtViewportExtents
* v,
DtPrimitiveDrawer
* painter);
90
91
protected
:
93
virtual
QColor polygonColor(
const
DtAllTypesPolygon
*,
const
DtViewportExtents
* v);
94
95
public
:
96
static
QColor polygonSurfaceColor(
const
DtAllTypesPolygon
*,
const
DtViewportExtents
* v,
void
* usr);
97
static
QColor polygonSoilTypeColor(
const
DtAllTypesPolygon
*,
const
DtViewportExtents
* v,
void
* usr);
98
static
QColor polygonTerrainShadingSurfaceColor(
const
DtAllTypesPolygon
*,
const
DtViewportExtents
* v,
void
* usr);
99
static
QColor polygonTerrainShadingSoilTypeColor(
const
DtAllTypesPolygon
*,
const
DtViewportExtents
* v,
void
* usr);
100
static
QColor polygonTerrainShadingFromColor(
const
DtAllTypesPolygon
* p,
const
QColor& baseColor,
const
DtViewportExtents
* v);
101
102
protected
:
103
bool
myDrawBoundingVolumes
;
104
QColor
myBoundingVolumesColor
;
105
DtPolygonColorFcn
myPolygonColorFcn
;
106
void
*
myPolygonColorData
;
107
};
108
109
inline
void
DtTerrainPolygonDrawer::setDrawBoundingVolumes
(
bool
b)
110
{
111
myDrawBoundingVolumes
= b;
112
}
113
114
inline
bool
DtTerrainPolygonDrawer::drawBoundingVolumes
()
const
115
{
116
return
myDrawBoundingVolumes
;
117
}
118
119
inline
void
DtTerrainPolygonDrawer::setBoundingVolumesColor
(
const
QColor& c)
120
{
121
myBoundingVolumesColor
= c;
122
}
123
124
inline
const
QColor&
DtTerrainPolygonDrawer::boundingVolumesColor
()
const
125
{
126
return
myBoundingVolumesColor
;
127
}
128
129
inline
void
DtTerrainPolygonDrawer::setPolygonColorFcn
(
DtPolygonColorFcn
fcn,
void
* usr)
130
{
131
myPolygonColorFcn
= fcn;
132
myPolygonColorData
= usr;
133
}
134
135
#endif
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
)