VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLineSegment.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
12 
14 
15 namespace makVrv
16 {
17  class DtLineSegmentProxy;
18  class DtLineRenderer;
19  class DtOverlayRenderer;
20 
24  {
25  public:
26 
27  const static unsigned short NoStipple = 0xFFFF;
28  const static unsigned short NoLine = 0x0;
29 
30  public:
31 
34 
36  DtLineSegment(DtLineRenderer& renderer);
37 
39  virtual ~DtLineSegment();
40 
43  const DtLineSegment &other) = delete;
44 
46  DtLineSegment &operator=(
47  const DtLineSegment &other) = delete;
48 
49  public:
50 
52  virtual void setAltitudeBasedConfigurations(
54 
60  virtual void clearAltitudeBasedConfigurations();
61 
68  virtual void setIsUseForcedAltitudeEnabled(bool enabled);
69 
73  virtual void setForcedAltitudeToUse(double minimumAltitudeForUse);
74 
77  virtual void setLodOutAltitude(double lodOutAltitude);
78 
80  virtual void setIsLodOutAltitudeEnabled(bool isLodOutAltitudeEnabled);
81 
86  virtual void setGroup(float group);
87 
89  virtual int group() const;
90 
92  void set2DPositions(float x1, float y1,float x2, float y2);
93 
95  void set2DPosition(unsigned int index0or1, float x, float y);
96 
97  //Set the position of the vertex.
98  void get2DPosition(unsigned int index0or1, float& x, float& y ) const;
99 
101  void setColors(float r1, float g1, float b1, float a1,
102  float r2, float g2, float b2, float a2);
103 
106  virtual void set3DPosition(int index0or1,float dx, float dy, float z, float w);
107 
108  //Get the 3D position of the line.
109  virtual void get3DPosition(int index0or1,float& dx, float& dy, float& z, float& w) const;
110 
112  virtual void set3DDirection(unsigned int index0or1, float x, float y, float z);
113 
115  virtual void get3DDirection(unsigned int index0or1, float& x, float& y, float& z) const;
116 
118  virtual void setDirection2DLength(unsigned int index0or1, float length);
119 
121  virtual float direction2DLength(unsigned int index0or1) const;
122 
123  //Set the vertex color.
124  virtual void setColor(unsigned int index0or1,float r, float g, float b, float a);
125 
126  //Get the vertex color.
127  virtual void getColor(unsigned int index0or1,float& r, float& g, float& b, float& a) const;
128 
129  //Set the first vertex color.
130  void setColor1(float r1, float g1, float b1, float a1);
131 
132  //Set the second vertex color.
133  void setColor2(float r2, float g2, float b2, float a2);
134 
135  //Set the line color.
136  inline void setColor(float r, float g, float b, float a)
137  {
138  setColors(r,g,b,a,r,g,b,a);
139  }
140 
144  void setScale(int index, float scale);
145 
147  float scale(unsigned int index0or1) const;
148 
151  virtual void setWidth(float w);
152 
154  virtual float width() const;
155 
162  virtual void setStippleParameters(unsigned int scale,unsigned short pattern);
163 
166  virtual void getStippleParameters(unsigned int& scale, unsigned short& pattern) const;
167 
168  private:
169 
170  DtLineSegment() : myProxy(0) {}
171 
172  protected:
174  };
175 
176 }
void setColor(float r, float g, float b, float a)
Definition: DtLineSegment.h:136
A line segment proxy is a flyweight class for controlling a single line segment.
Definition: DtLineRenderer.h:191
An interface for a single line segment.
Definition: DtLineSegmentInterface.h:23
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
A class which represents a single line segment.
Definition: DtLineSegment.h:23
Contains the makVrv::DtLineSegmentInterface class declaration.
std::vector< DtLineSegmentAltitudeBasedConfiguration > DtLineSegmentAltitudeBasedConfigurationCollection
A collection of altitude-based configurations.
Definition: DtLineSegmentInterface.h:76
DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem &, const std::vector< DtVector > &vertices)
Returns the total distance of a segmented line defined by the provided vector of vertices. Coordinates are in local database coordinates. The coordinate system is used to convert between the local database coordinates and geocentric. All distance is in 2D – the Z value is ignored.
DtLineSegmentProxy * myProxy
Definition: DtLineSegment.h:173
DtLineSegment()
Definition: DtLineSegment.h:170
Contains the makVrv::DtLineRenderer class declaration.
A class responsible for rendering lines.
Definition: DtLineRenderer.h:49
The DtOverlayRenderer implements the overlay concept. An overlay is a 2D scene that is drawn on top o...
Definition: DtOverlayRenderer.h:67

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)