VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTexturedLineSegment.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
14 
15 namespace makVrv
16 {
17  class DtQuadProxyInterface;
18  class DtQuadRenderer;
19  class DtOverlayRendererInterface;
20  class DtTextureInterface;
21 
25  {
26  public:
27 
30 
33 
35  virtual ~DtTexturedLineSegment();
36 
37  public:
38 
43  virtual void setGroup(float group) override;
44 
46  virtual int group() const override;
47 
49  virtual void set2DPosition(unsigned int index0or1, float x, float y) override;
50 
51  //Set the position of the vertex.
52  virtual void get2DPosition(unsigned int index0or1, float& x, float& y ) const override;
53 
56  virtual void set3DPosition(int index0or1,float dx, float dy, float z, float w) override;
57 
58  //Get the 3D position of the line.
59  virtual void get3DPosition(int index0or1,float& dx, float& dy, float& z, float& w) const override;
60 
61  //Set the vertex color.
62  virtual void setColor(float r, float g, float b, float a);
63 
64  //Get the vertex color.
65  virtual void getColor(float& r, float& g, float& b, float& a) const;
66 
69  virtual void setWidth(float w) override;
70 
72  virtual float width() const override;
73 
77  virtual void setTextureParameters( DtTextureInterface* texture,
78  float left = 0.0f, float right = 1.0f,
79  float bottom = 0.0f, float top = 1.0f );
80 
82  virtual void setZoomFactor(float z);
83 
85  virtual void set2DPositions(float x1, float y1, float x2, float y2) override;
86 
87  //Set the vertex color.
88  virtual void setColor(unsigned int index0or1,float r, float g, float b, float a) override;
89 
90  //Get the vertex color.
91  virtual void getColor(unsigned int index0or1,float& r, float& g, float& b, float& a) const override;
92 
94  virtual void setColors(float r1, float g1, float b1, float a1,
95  float r2, float g2, float b2, float a2) override;
96 
98  virtual void setRotationOffset(float);
99 
101  protected:
106  {};
107 
115  {};
116 
124  virtual void setIsUseForcedAltitudeEnabled(bool enabled)
125  {};
126 
131  virtual void setForcedAltitudeToUse(double minimumAltitudeForUse)
132  {};
133 
137  virtual void setLodOutAltitude(double lodOutAltitude)
138  {};
139 
142  virtual void setIsLodOutAltitudeEnabled(bool isLodOutAltitudeEnabled)
143  {};
144 
147  virtual void set3DDirection(unsigned int index0or1, float x, float y, float z) override
148  {};
149 
151  virtual void get3DDirection(unsigned int index0or1, float& x, float& y, float& z) const override
152  {};
153 
155  virtual void setDirection2DLength(unsigned int index0or1, float length) override
156  {};
157 
159  virtual float direction2DLength(unsigned int index0or1) const override
160  { return 0.0f; };
161 
163  virtual void setStippleParameters(unsigned int scale,unsigned short pattern) override;
164 
167  virtual void getStippleParameters(unsigned int& scale, unsigned short& pattern) const override;
168 
169  protected:
171  virtual void resetTextureCoordinates();
172 
173  private:
174 
176  DtTexturedLineSegment& operator=(const DtTexturedLineSegment&);
177 
178  protected:
180  float myVertices[2][4];
181  float my2DVertices[2][2];
186 
187  protected:
189  };
190 
191 }
Contains makVrv::DtOverlayResourceProvider class.
virtual void setForcedAltitudeToUse(double minimumAltitudeForUse)
Set the MSL altitude, in meters, to use when determining the altitude-based configuration to use...
Definition: DtTexturedLineSegment.h:131
A class which represents a single line segment.
Definition: DtTexturedLineSegment.h:24
virtual float direction2DLength(unsigned int index0or1) const override
Get the length of the line in 2D space.
Definition: DtTexturedLineSegment.h:159
float myRotationOffset
Definition: DtTexturedLineSegment.h:185
virtual void setLodOutAltitude(double lodOutAltitude)
Set the minimum MSL altitude, in meters, at which the line will no longer appear Unimplemented for th...
Definition: DtTexturedLineSegment.h:137
virtual void setIsUseForcedAltitudeEnabled(bool enabled)
Set whether or not a particular altitude-based configuration is used, regardless of altitude...
Definition: DtTexturedLineSegment.h:124
DtTextureInterface * myTexture
Definition: DtTexturedLineSegment.h:182
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:24
A class which allocates and draws quads.
Definition: DtQuadRenderer.h:44
virtual void set3DDirection(unsigned int index0or1, float x, float y, float z) override
Set the normalized direction of the line in world space. Unimplemented for this type of line...
Definition: DtTexturedLineSegment.h:147
virtual void setIsLodOutAltitudeEnabled(bool isLodOutAltitudeEnabled)
Set whether or not this attribute will use the LOD Out Altitude property. Unimplemented for this type...
Definition: DtTexturedLineSegment.h:142
virtual void get3DDirection(unsigned int index0or1, float &x, float &y, float &z) const override
Get the normalized direction of the vertex. Unimplemented for this line.
Definition: DtTexturedLineSegment.h:151
virtual void setDirection2DLength(unsigned int index0or1, float length) override
Set the length of the line in 2D space. Unimplemented for this line.
Definition: DtTexturedLineSegment.h:155
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
float myZoomFactor
Definition: DtTexturedLineSegment.h:184
virtual void setAltitudeBasedConfigurations(const DtLineSegmentInterface::DtLineSegmentAltitudeBasedConfigurationCollection &configs)
Unimplemented.
Definition: DtTexturedLineSegment.h:104
An interface for a textured single line segment.
Definition: DtTexturedLineSegmentInterface.h:18
A single 2D quadrilateral.
Definition: DtQuadProxyInterface.h:21
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.
DtQuadProxyInterface * myVertex
Definition: DtTexturedLineSegment.h:179
virtual void clearAltitudeBasedConfigurations()
Clear the altitude-based configurations for this line segment. The line segment will no longer have a...
Definition: DtTexturedLineSegment.h:114
The DtOverlayRendererInterface implements the overlay concept. An overlay is a 2D scene that is drawn...
Definition: DtOverlayRendererInterface.h:80
float myTextureWidth
Definition: DtTexturedLineSegment.h:183

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)