17 #include <matrix/vlMath.h>
21 #include <unordered_map>
27 class DtFlat2DLineRenderer;
28 class DtLineSegmentProxy;
29 class DtLineSegmentProxyGroup;
30 class DtOverlayResourceProvider;
31 class DtProjected2DLineEffect;
57 : myBaseMSLAltitude(std::numeric_limits<
double>::min())
58 , myPointOneLength(1.0)
59 , myPointTwoLength(1.0)
65 : myBaseMSLAltitude(altitude)
66 , myPointOneLength(pointOneLength)
67 , myPointTwoLength(pointTwoLength)
110 const static unsigned short NoStipple = 0xFFFF;
111 const static unsigned short NoLine = 0x0;
131 virtual int numberOfPrimitives()
const;
134 virtual void render(
bool geocentric,
float geocentricAlpha,
135 const double cameraLocation[3],
136 double cameraAltitude,
137 const double positionMatrix[16],
138 const double projectionMatrix[16],
142 virtual void releaseResources();
145 virtual bool isRenderModeSupported(
int mode);
169 return mySimpleLines;
171 return myStippledLines;
177 return mySimpleProxies;
179 return myStippledProxies;
182 void deleteToBeRenderedBuffer(
void);
184 void updateRenderData(
double cameraAltitude);
185 void releaseResources(
void);
193 typedef std::unordered_map<float, LineSegmentSets>
LineMap;
208 virtual int moveSegmentToOtherList(
209 const float currentWidth,
210 const int currentSegmentIndex,
211 const int currentPrimativeIndex,
212 const float desiredWidth,
213 const int desiredSegmentIndex);
215 virtual void setAltitudeBasedConfigurationsForProxy(
222 virtual void updateRenderData(
double altitude);
223 virtual void sortByStipple();
248 void enableStipple();
251 void disableStipple();
256 void setLodOutAltitude(
double lodOutAltitude);
259 double lodOutAltitude()
const;
263 void setIsLodOutAltitudeEnabled(
bool isLodOutAltitudeEnabled);
266 bool isLodOutAltitudeEnabled()
const;
269 void setWidth(
float w);
276 void setAltitudeBasedLineLengths(
281 void clearAltitudeBasedLineLengths();
289 void setIsUseForcedAltitudeEnabled(
bool enabled);
292 bool isUseForcedAltitudeEnabled()
const;
297 void setForcedAltitudeToUse(
double minimumAltitudeForUse);
301 double forcedAltitudeToUse()
const;
304 void setGroup(
float group);
384 void updateRenderData(
double cameraMSLAltitude);
std::unordered_map< float, LineSegmentSets > LineMap
Definition: DtLineRenderer.h:193
std::vector< DtLineSegmentProxy * > DtLineSegmentProxyList
Definition: DtLineRenderer.h:375
friend DtLineRendererCreator
Definition: DtLineRenderer.h:47
DtLineSegmentProxyList myProxies
Definition: DtLineRenderer.h:387
A line segment proxy is a flyweight class for controlling a single line segment.
Definition: DtLineRenderer.h:238
int myIndex
Definition: DtLineRenderer.h:357
DtLineSegmentAltitudeBasedConfiguration()
Definition: DtLineRenderer.h:56
LineSegmentProxyList myDirtyList
Definition: DtLineRenderer.h:231
int mySegmentIndex
Definition: DtLineRenderer.h:356
A class the wraps a OpenGL Array Buffer object.
Definition: DtBufferObject.h:17
bool myIsLodOutAltitudeEnabled
Definition: DtLineRenderer.h:360
std::vector< DtLineSegmentProxyGroup * > myLineSegmentProxyGroups
Definition: DtLineRenderer.h:229
~DtLineSegmentAltitudeBasedConfiguration()
Definition: DtLineRenderer.h:72
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
DtProjected2DLineEffect * myEffect
Definition: DtLineRenderer.h:230
DtVirtualBaseClassCreator< DtLineRenderer, DtOverlayResourceProvider & > DtLineRendererCreator
creator
Definition: DtLineRenderer.h:34
static bool equal(DtLineSegmentProxy *&v1, DtLineSegmentProxy *&v2)
Definition: DtLineRenderer.h:337
std::map< const DtLineSegmentProxy *, DtLineSegmentProxyGroup * > myLineSegmentProxyToGroupMap
Definition: DtLineRenderer.h:228
DtLineSegmentAltitudeBasedConfiguration(double altitude, double pointOneLength, double pointTwoLength)
Definition: DtLineRenderer.h:64
double myPointTwoLength
Definition: DtLineRenderer.h:98
unsigned int myRenderedSimpleLineCount
Definition: DtLineRenderer.h:190
Definition: DtLineRenderer.h:155
LineSegmentProxyList myStippledProxies
Definition: DtLineRenderer.h:159
LineSegments & segmentsByIndex(unsigned int index)
Definition: DtLineRenderer.h:166
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
The overlay resource provider class provies resources for overlay drawing classes.
Definition: DtOverlayResourceProvider.h:23
Definition: DtLineRenderer.h:104
DtLineRenderer::DtLineSegmentAltitudeBasedConfigurationCollection myAltitudeBasedConfigurations
Definition: DtLineRenderer.h:389
static bool less(DtLineSegmentProxy *&v1, DtLineSegmentProxy *&v2)
Definition: DtLineRenderer.h:322
float myWidth
Definition: DtLineRenderer.h:358
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
bool myDirtyFlag
Definition: DtLineRenderer.h:355
std::vector< LineSegmentPrimitive > LineSegments
Definition: DtLineRenderer.h:152
std::vector< DtLineSegmentAltitudeBasedConfiguration > DtLineSegmentAltitudeBasedConfigurationCollection
A collection of altitude-based configurations.
Definition: DtLineRenderer.h:102
Abstract primitive rendering base class.
Definition: DtPrimitiveRenderer.h:19
A vertex element used for rendering a line.
Definition: DtFlat2DLineRenderer.h:20
unsigned int myPrimitiveCount
Definition: DtLineRenderer.h:232
double myForcedAltitudeToUse
Definition: DtLineRenderer.h:363
DtLineRenderer * myParent
Definition: DtLineRenderer.h:353
double myBaseMSLAltitude
Definition: DtLineRenderer.h:96
LineSegments myStippledLines
Definition: DtLineRenderer.h:162
A class that defines an altitude-based configuration for a line segment proxy.
Definition: DtLineRenderer.h:53
DtLineVertex p2
Definition: DtLineRenderer.h:107
DtBufferObject * myBufferObjectStippleLines
Definition: DtLineRenderer.h:188
float lineParams[2]
Definition: DtFlat2DLineRenderer.h:34
LineSegmentProxyList mySimpleProxies
Definition: DtLineRenderer.h:158
An effect for rendering 2D projected lines Has support for direction and length information per verte...
Definition: DtProjected2DLineEffect.h:19
const char int mode
Definition: ioapi.h:38
A Renderer which renders 2D lines with only a color.
Definition: DtFlat2DLineRenderer.h:41
bool myIsForcedAltitudeEnabled
Definition: DtLineRenderer.h:362
DtBufferObject * myBufferObjectSimpleLines
Definition: DtLineRenderer.h:187
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
LineSegments mySimpleLines
Definition: DtLineRenderer.h:161
LineSegmentProxyList & proxiesByIndex(unsigned int index)
Definition: DtLineRenderer.h:174
DtLineVertex p1
Definition: DtLineRenderer.h:106
A group of line segment proxy objects that all share the same altitude-based configurations - allowin...
Definition: DtLineRenderer.h:370
LineMap myLines
Definition: DtLineRenderer.h:227
static void swap(DtLineSegmentProxy *&v1, DtLineSegmentProxy *&v2)
Definition: DtLineRenderer.h:310
const char * creatorTypeName< DtLineRenderer >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtLineRenderer.h:41
Contains makVrv::DtFlat2DLineRenderer class.
double myPointOneLength
Definition: DtLineRenderer.h:97
A class responsible for rendering lines.
Definition: DtLineRenderer.h:45
uint8_t * myToBeRenderedBuffer
Definition: DtLineRenderer.h:157
std::vector< DtLineSegmentProxy * > LineSegmentProxyList
Definition: DtLineRenderer.h:153
double myLodOutAltitude
Definition: DtLineRenderer.h:359
bool operator==(const DtLineSegmentAltitudeBasedConfiguration &config) const
Definition: DtLineRenderer.h:89