VR-Forces 5.0.3 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) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
13 
14 namespace makVrv
15 {
16  class DtLineSegmentProxy;
17  class DtLineRenderer;
18  class DtOverlayRenderer;
19 
23  {
24  public:
25 
26  const static unsigned short NoStipple = 0xFFFF;
27  const static unsigned short NoLine = 0x0;
28 
29  public:
30 
33 
35  DtLineSegment(DtLineRenderer& renderer);
36 
38  virtual ~DtLineSegment();
39 
42  const DtLineSegment &other) = delete;
43 
45  DtLineSegment &operator=(
46  const DtLineSegment &other) = delete;
47 
48  public:
49 
51  void setAltitudeBasedConfigurations(
53 
59  void clearAltitudeBasedConfigurations();
60 
67  virtual void setIsUseForcedAltitudeEnabled(bool enabled);
68 
72  virtual void setForcedAltitudeToUse(double minimumAltitudeForUse);
73 
76  void setLodOutAltitude(double lodOutAltitude);
77 
79  void setIsLodOutAltitudeEnabled(bool isLodOutAltitudeEnabled);
80 
85  void setGroup(float group);
86 
88  int group() const;
89 
91  void set2DPositions(float x1, float y1,float x2, float y2);
92 
94  void set2DPosition(unsigned int index0or1, float x, float y);
95 
96  //Set the position of the vertex.
97  void get2DPosition(unsigned int index0or1, float& x, float& y ) const;
98 
100  void setColors(float r1, float g1, float b1, float a1,
101  float r2, float g2, float b2, float a2);
102 
105  void set3DPosition(int index0or1,float dx, float dy, float z, float w);
106 
107  //Get the 3D position of the line.
108  void get3DPosition(int index0or1,float& dx, float& dy, float& z, float& w) const;
109 
111  void set3DDirection(unsigned int index0or1, float x, float y, float z);
112 
114  void get3DDirection(unsigned int index0or1, float& x, float& y, float& z) const;
115 
117  void setDirection2DLength(unsigned int index0or1, float length);
118 
120  float direction2DLength(unsigned int index0or1) const;
121 
122  //Set the vertex color.
123  void setColor(unsigned int index0or1,float r, float g, float b, float a);
124 
125  //Get the vertex color.
126  void getColor(unsigned int index0or1,float& r, float& g, float& b, float& a) const;
127 
128  //Set the first vertex color.
129  void setColor1(float r1, float g1, float b1, float a1);
130 
131  //Set the second vertex color.
132  void setColor2(float r2, float g2, float b2, float a2);
133 
134  //Set the line color.
135  inline void setColor(float r, float g, float b, float a)
136  {
137  setColors(r,g,b,a,r,g,b,a);
138  }
139 
142  void setWidth(float w);
143 
145  float width() const;
146 
153  void setStippleParameters(unsigned int scale,unsigned short pattern);
154 
157  void getStippleParameters(unsigned int& scale, unsigned short& pattern) const;
158 
159  private:
160 
161  DtLineSegment() : myProxy(0) {}
162 
163  protected:
165  };
166 
167 }
void setColor(float r, float g, float b, float a)
Definition: DtLineSegment.h:135
A line segment proxy is a flyweight class for controlling a single line segment.
Definition: DtLineRenderer.h:238
A class which represents a single line segment.
Definition: DtLineSegmentInterface.h:16
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
A class which represents a single line segment.
Definition: DtLineSegment.h:22
std::vector< DtLineSegmentAltitudeBasedConfiguration > DtLineSegmentAltitudeBasedConfigurationCollection
A collection of altitude-based configurations.
Definition: DtLineRenderer.h:102
DtLineSegmentProxy * myProxy
Definition: DtLineSegment.h:164
DtLineSegment()
Definition: DtLineSegment.h:161
Contains the makVrv::DtLineRenderer class declaration.
A class responsible for rendering lines.
Definition: DtLineRenderer.h:45
The DtOverlayRenderer implements the overlay concept. An overlay is a 2D scene that is drawn on top o...
Definition: DtOverlayRenderer.h:41

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)