VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGeom3dLinesComponent.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
16 
17 #include <vrvMath/DtVector4.h>
18 
19 #include <matrix/vlVector.h>
20 
21 #include <boost/bind/bind.hpp>
22 #include <map>
23 #include <vector>
24 
25 namespace makVrv
26 {
27  class DtGeom3dLinesSystem;
28 
52  {
53  public:
54 
57 
61  friend class DtGeom3dLinesSystem;
62 
65  enum class CategoryFlags : unsigned int
66  {
67  CategoryFlagsTracks = 0x0001, // used for track histories
68  CategoryFlagsRoutes = 0x0002, // used for routes
69  CategoryFlagsAll = 0xFFFF, // always active (default)
70  };
71 
73  typedef int LineHandle;
74 
76  virtual ~DtGeom3dLinesComponent();
77 
79  DtGeom3dLinesComponent() = delete;
80 
83  const DtGeom3dLinesComponent& other) = delete;
84 
87  const DtGeom3dLinesComponent&& other) = delete;
88 
90  DtGeom3dLinesComponent &operator=(
91  const DtGeom3dLinesComponent& other) = delete;
92 
94  DtGeom3dLinesComponent& operator=(
95  const DtGeom3dLinesComponent&& other) = delete;
96 
97  protected:
98 
103 
104  public:
105 
107  virtual const DtModelSetId modelSetId() const;
108 
112  virtual void setCategoryFlags(DtGeom3dLinesComponent::CategoryFlags flags);
113 
115  virtual const DtGeom3dLinesComponent::CategoryFlags categoryFlags() const;
116 
118  virtual void clearLines();
119 
127  virtual void setOrigin(const DtVector& origin);
128 
131  virtual const DtVector& origin() const;
132 
135  virtual void setCurrentColor(float r, float g, float b, float a);
136 
139  virtual void setCurrentStartColor(float r, float g, float b, float a);
140 
142  virtual const DtVector4<float> currentStartColor() const;
143 
146  virtual void setCurrentEndColor(float r, float g, float b, float a);
147 
149  virtual const DtVector4<float> currentEndColor() const;
150 
157  virtual void populateHeightLines(const DtVector& pointA,
158  const DtVector& pointB, float desiredSpacing);
159 
166  virtual void setLine(const DtVector& pointA,
167  const DtVector& pointB, LineHandle handle);
168 
175  virtual void setHeightLineAtPoint(const DtVector& point,
176  LineHandle handle);
177 
179  virtual const DtVector& lastPlacedHeightLinePoint() const;
180 
184  virtual void removeLine(LineHandle handle);
185 
186  protected:
187 
190  virtual double computeDownDistance(const DtVector& point) const;
191 
194  virtual void submitLines(Dt3dLinesStagingBuffer* buffer) const;
195 
200  void computeCullingSphere(DtVector3<double>& center, double& radiusSquared) const;
201 
202  protected:
203 
205  struct Line
206  {
209  };
210 
213  std::vector<DtGeom3dLinesComponent::Line> myLines;
214  std::map<LineHandle, DtGeom3dLinesComponent::Line> myHandleLines;
216  DtVector myDown;
217  DtVector myOrigin;
218  double myOriginAlt;
219  float myStartColor[4];
220  float myEndColor[4];
225  };
226 
227 
228 
231  {
232  public:
235 
238 
241  const DtGeom3dLinesComponentCreator& other) = delete;
242 
245  const DtGeom3dLinesComponentCreator& other) = delete;
246 
247  public:
249  virtual DtGeom3dLinesComponent* create(
250  DtGeom3dLinesSystem& system, DtModelSetId modelSetId) const;
251 
255  static DtGeom3dLinesComponentCreator& instance(DtDe& de);
256 
258  static const std::string& theClassName();
259  };
260 }
std::vector< DtGeom3dLinesComponent::Line > myLines
Definition: DtGeom3dLinesComponent.h:213
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Contains makVrv::Dt3dLinesStagingBuffer class declaration.
A class responsible for processing DtGeom3dLinesComponent objects.
Definition: DtGeom3dLinesSystem.h:62
Contains the makVrv::DtGeom3dLinesSystem class declaration.
DtVector3< double > myBoundsMax
Definition: DtGeom3dLinesComponent.h:222
voidpf uLong int origin
Definition: ioapi.h:42
double myOriginAlt
Definition: DtGeom3dLinesComponent.h:218
Dt3dLinesStagingBuffer::LinePoint myPointA
Definition: DtGeom3dLinesComponent.h:207
int LineHandle
A handle type to identify individual lines.
Definition: DtGeom3dLinesComponent.h:73
4 dimensional vector
creator for DtGeom3dLinesComponent
Definition: DtGeom3dLinesComponent.h:230
Dt3dLinesStagingBuffer::LinePoint myPointB
Definition: DtGeom3dLinesComponent.h:208
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
DtVector3< double > myBoundsMin
Definition: DtGeom3dLinesComponent.h:221
A class which represents a component for a set of 3d lines.
Definition: DtGeom3dLinesComponent.h:51
DtVector myOrigin
Definition: DtGeom3dLinesComponent.h:217
bool myBoundsValid
Definition: DtGeom3dLinesComponent.h:223
DtVector myDown
Definition: DtGeom3dLinesComponent.h:216
DtGeom3dLinesSystem & mySystem
Definition: DtGeom3dLinesComponent.h:211
std::map< LineHandle, DtGeom3dLinesComponent::Line > myHandleLines
Definition: DtGeom3dLinesComponent.h:214
A class which represents a buffer used for staging 3d line points. &quot;staging&quot; means collecting...
Definition: Dt3dLinesStagingBuffer.h:34
DtGeom3dLinesComponent::CategoryFlags myCategoryFlags
Definition: DtGeom3dLinesComponent.h:224
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:76
CategoryFlags
Optional enumeration used to classify components for usage type. (see setCategoryFlags) ...
Definition: DtGeom3dLinesComponent.h:65
DtModelSetId
Definition: DtModelSetEnums.h:19
DtVector myLastPlacedPoint
Definition: DtGeom3dLinesComponent.h:215
A structure to hold point data for 1 line.
Definition: DtGeom3dLinesComponent.h:205
A structure to hold data for 1 point of a line.
Definition: Dt3dLinesStagingBuffer.h:41
Contains various enum classes relating to model sets.
DtModelSetId myModelSetId
Definition: DtGeom3dLinesComponent.h:212
Contains DLL export macros.

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)