VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLineSegmentInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 
14 #include <matrix/vlMath.h>
15 
16 #include <limits>
17 #include <vector>
18 
19 namespace makVrv
20 {
24  {
25  public:
28  {
29  public:
31  : myBaseMSLAltitude(std::numeric_limits<double>::min())
32  , myPointOneScale(1.0)
33  , myPointTwoScale(1.0)
34  {
35  // intentional noop
36  }
37 
38  DtLineSegmentAltitudeBasedConfiguration(double altitude, double pointOneScale, double pointTwoScale)
39  : myBaseMSLAltitude(altitude)
40  , myPointOneScale(pointOneScale)
41  , myPointTwoScale(pointTwoScale)
42  {
43  // intentional noop
44  }
45 
47  {
48  // intentional noop
49  }
50 
53  const DtLineSegmentAltitudeBasedConfiguration& other) = default;
54 
57  const DtLineSegmentAltitudeBasedConfiguration& other) = default;
58 
60 
61  public:
62 
64  {
65  return DtEq(myBaseMSLAltitude, config.myBaseMSLAltitude, DtEMilli)
66  && DtEq(myPointOneScale, config.myPointOneScale, DtEMilli)
67  && DtEq(myPointTwoScale, config.myPointTwoScale, DtEMilli);
68  }
69 
73  };
74 
76  typedef std::vector<DtLineSegmentAltitudeBasedConfiguration> DtLineSegmentAltitudeBasedConfigurationCollection;
77 
78  public:
81 
83  virtual ~DtLineSegmentInterface();
84 
85  public:
87  virtual void setAltitudeBasedConfigurations(
89 
95  virtual void clearAltitudeBasedConfigurations() = 0;
96 
103  virtual void setIsUseForcedAltitudeEnabled(bool enabled) = 0;
104 
108  virtual void setForcedAltitudeToUse(double minimumAltitudeForUse) = 0;
109 
112  virtual void setLodOutAltitude(double lodOutAltitude) = 0;
113 
115  virtual void setIsLodOutAltitudeEnabled(bool isLodOutAltitudeEnabled) = 0;
116 
121  virtual void setGroup(float group) = 0;
122 
124  virtual int group() const = 0;
125 
127  virtual void set2DPositions(float x1, float y1,float x2, float y2) = 0;
128 
130  virtual void set2DPosition(unsigned int index0or1, float x, float y) = 0;
131 
132  //Set the position of the vertex.
133  virtual void get2DPosition(unsigned int index0or1, float& x, float& y ) const = 0;
134 
136  virtual void setColors(float r1, float g1, float b1, float a1,
137  float r2, float g2, float b2, float a2) = 0;
138 
141  virtual void set3DPosition(int index0or1,float dx, float dy, float z, float w) = 0;
142 
143  //Get the 3D position of the line.
144  virtual void get3DPosition(int index0or1,float& dx, float& dy, float& z, float& w) const = 0;
145 
147  virtual void set3DDirection(unsigned int index0or1, float x, float y, float z) = 0;
148 
150  virtual void get3DDirection(unsigned int index0or1, float& x, float& y, float& z) const = 0;
151 
153  virtual void setDirection2DLength(unsigned int index0or1, float length) = 0;
154 
156  virtual float direction2DLength(unsigned int index0or1) const = 0;
157 
158  //Set the vertex color.
159  virtual void setColor(unsigned int index0or1,float r, float g, float b, float a) = 0;
160 
161  //Get the vertex color.
162  virtual void getColor(unsigned int index0or1,float& r, float& g, float& b, float& a) const = 0;
163 
164  //Set the line color.
165  virtual void setColor(float r, float g, float b, float a);
166 
169  virtual void setWidth(float w) = 0;
170 
172  virtual float width() const = 0;
173 
180  virtual void setStippleParameters(unsigned int scale,unsigned short pattern) = 0;
181 
184  virtual void getStippleParameters(unsigned int& scale, unsigned short& pattern) const = 0;
185  };
186 
187 }
double length(const dvec3 &theVec)
Definition: DtVecUtils.h:20
A class that defines an altitude-based configuration for a line segment proxy.
Definition: DtLineSegmentInterface.h:27
~DtLineSegmentAltitudeBasedConfiguration()
Definition: DtLineSegmentInterface.h:46
DtLineSegmentAltitudeBasedConfiguration()
Definition: DtLineSegmentInterface.h:30
double myBaseMSLAltitude
Definition: DtLineSegmentInterface.h:70
An interface for a single line segment.
Definition: DtLineSegmentInterface.h:23
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
bool operator==(const DtLineSegmentAltitudeBasedConfiguration &config) const
Definition: DtLineSegmentInterface.h:63
DtLineSegmentAltitudeBasedConfiguration(double altitude, double pointOneScale, double pointTwoScale)
Definition: DtLineSegmentInterface.h:38
double myPointTwoScale
Definition: DtLineSegmentInterface.h:72
std::vector< DtLineSegmentAltitudeBasedConfiguration > DtLineSegmentAltitudeBasedConfigurationCollection
A collection of altitude-based configurations.
Definition: DtLineSegmentInterface.h:76
double myPointOneScale
Definition: DtLineSegmentInterface.h:71
Contains DLL export macros.

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)