VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLineStyleGeometryManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
13 
14 #pragma once
15 
16 #include <vrvCore/vrvCore.h>
19 
20 #include <matrix/vlVector.h>
21 
22 #include <unordered_map>
23 #include <boost/bind/bind.hpp>
24 
25 namespace makVrv
26 {
27  class DtDe;
28  class DtCoordinateSystem;
29 
32  {
33  public:
35  using ArrowCreateFunction = std::function<bool (const DtCoordinateSystem&,
36  const DtVector&, const DtVector&, double,
37  std::vector<DtVector>&, std::vector<DtVector>&, const DtVector& offsetFromPoint)> ;
38 
40  using LineCreateFunction = std::function<bool (const DtCoordinateSystem&,
41  const std::vector<DtVector>&, double, std::vector<DtVector>&,
42  std::vector<DtVector>&, std::vector<int>&, const DtVector& offsetFromPoint)> ;
43 
45  using LineStyleGeometries = std::unordered_map<vrvTacticalGraphicUtilities::LineStyle, LineCreateFunction>;
46 
48  using ArrowStyleGeometries = std::unordered_map<vrvTacticalGraphicUtilities::ArrowStyle, ArrowCreateFunction> ;
49 
50  public:
53 
55  virtual ~DtLineStyleGeometryManager();
56 
59  static DtLineStyleGeometryManager& instance(DtDe& de);
60 
62  static void registerInstance(DtDe& de, DtLineStyleGeometryManager* anInstance);
63 
66  virtual void add2DLineStyle(vrvTacticalGraphicUtilities::LineStyle, LineCreateFunction);
67 
70  virtual void add3DLineStyle(vrvTacticalGraphicUtilities::LineStyle, LineCreateFunction);
71 
74  virtual void add2DArrowStyle(vrvTacticalGraphicUtilities::ArrowStyle, ArrowCreateFunction);
75 
78  virtual void add3DArrowStyle(vrvTacticalGraphicUtilities::ArrowStyle, ArrowCreateFunction);
79 
80  // @{
92 
94  virtual bool create2DLineStyle(vrvTacticalGraphicUtilities::LineStyle,
95  const std::vector<DtVector>& linePoints, double size,
96  std::vector<DtVector>& result3DPositions, std::vector<DtVector>& resultOffsetPositions,
97  std::vector<int>& segmentsToErase, const DtVector& offsetFromPoint = DtVector::zero()) const;
98 
100  virtual bool create3DLineStyle(vrvTacticalGraphicUtilities::LineStyle,
101  const std::vector<DtVector>& linePoints, double size,
102  std::vector<DtVector>& result3DPositions, std::vector<DtVector>& resultOffsetPositions,
103  std::vector<int>& segmentsToErase, const DtVector& offsetFromPoint = DtVector::zero()) const;
104  // @}
105 
106  // @{
118 
120  virtual bool create2DArrowStyle(vrvTacticalGraphicUtilities::ArrowStyle,
121  const DtVector& start, const DtVector& end, double arrowSize,
122  std::vector<DtVector>& result3DPositions, std::vector<DtVector>& resultOffsetPositions,
123  const DtVector& offsetFromPoint = DtVector::zero()) const;
124 
126  virtual bool create3DArrowStyle(vrvTacticalGraphicUtilities::ArrowStyle,
127  const DtVector& start, const DtVector& end, double arrowSize,
128  std::vector<DtVector>& result3DPositions, std::vector<DtVector>& resultOffsetPositions,
129  const DtVector& offsetFromPoint = DtVector::zero()) const;
130  // @}
131 
132  protected:
135 
138 
139  protected:
142 
145 
147  };
148 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
voidpf void uLong size
Definition: ioapi.h:39
LineStyleGeometries my3DLineStyleGeometries
Definition: DtLineStyleGeometryManager.h:141
LineStyleGeometries my2DLineStyleGeometries
Definition: DtLineStyleGeometryManager.h:140
ArrowStyleGeometries my2DArrowStyleGeometries
Definition: DtLineStyleGeometryManager.h:143
LineStyle
Default line Styles.
Definition: DtTacticalGraphicUtilities.h:28
std::function< bool(const DtCoordinateSystem &, const std::vector< DtVector > &, double, std::vector< DtVector > &, std::vector< DtVector > &, std::vector< int > &, const DtVector &offsetFromPoint)> LineCreateFunction
Typedef line style function.
Definition: DtLineStyleGeometryManager.h:42
Contains makVrv::DtVirtualBaseClass class.
std::function< bool(const DtCoordinateSystem &, const DtVector &, const DtVector &, double, std::vector< DtVector > &, std::vector< DtVector > &, const DtVector &offsetFromPoint)> ArrowCreateFunction
Typedef arrow style funcion.
Definition: DtLineStyleGeometryManager.h:37
ArrowStyle
Definition: DtTacticalGraphicUtilities.h:46
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
ArrowStyleGeometries my3DArrowStyleGeometries
Definition: DtLineStyleGeometryManager.h:144
std::unordered_map< vrvTacticalGraphicUtilities::ArrowStyle, ArrowCreateFunction > ArrowStyleGeometries
Typedefed map of arrow style geometries.
Definition: DtLineStyleGeometryManager.h:48
std::unordered_map< vrvTacticalGraphicUtilities::LineStyle, LineCreateFunction > LineStyleGeometries
Typedefed map of line style geometries.
Definition: DtLineStyleGeometryManager.h:45
DtDe & myDe
Definition: DtLineStyleGeometryManager.h:146
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
The DtLineStyleGeometryManager class manages line style geometries.
Definition: DtLineStyleGeometryManager.h:31
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
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)