VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTacticalGraphicUtilities.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vrvCore/vrvCore.h>
12 #include <vector>
13 #include <matrix/vlVector.h>
14 #include <matrix/vlTaitBryan.h>
15 
16 namespace makVrv
17 {
18  class DtCoordinateSystem;
19 }
20 
21 namespace makVrv
22 {
23  namespace vrvTacticalGraphicUtilities
24  {
25  using DtVerticesVector = std::vector<DtVector>;
26 
28  enum class LineStyle
29  {
30  Unspecified = -1,
31  Plain = 0,
32  Axis,
33  AirAxis,
34  MainAxis,
36  Feint,
37  AirCorridor,
39  Bridge,
40  ByFireAxis
45  };
48 
49  enum class ArrowStyle
50  {
51  Unspecified = -1,
52  Simple = 0,
53  Linear,
54  Main,
59  Berm
60  };
61 
62  enum class ArrowHeadPlacement
63  {
64  Unspecified = -1,
65  None = 0,
72  };
73 
74  enum class PenStyle
75  {
76  Unspecified = -1,
77  NoPen = 1,
78  SolidLine,
79  DashedLine,
80  DottedLine,
81  DashDotLine,
83  };
84 
85  enum class FillStyle
86  {
87  Unspecified = -1,
88  NoFill = 0,
89  SolidFill= 1,
100  DiagonalLines,
103  Texture,
104  };
105 
111  {
112  DefaultColor = 0,
113  BlackColor,
114  WhiteColor
115  };
116 
120  DT_DLL_VRVCORE double angleTo(const makVrv::DtCoordinateSystem&, const DtVector& origin, const DtVector& to);
121 
125  DT_DLL_VRVCORE double elevationTo(const makVrv::DtCoordinateSystem&, const DtVector& origin, const DtVector& to);
126 
130  DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem&, const DtVector& from, const DtVector& to);
131 
135  DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem&, const std::vector<DtVector>& vertices);
136 
139  DT_DLL_VRVCORE DtVector midpoint(const makVrv::DtCoordinateSystem&, const DtVector& first, const DtVector& second);
140 
144  DT_DLL_VRVCORE DtVector midpoint(const makVrv::DtCoordinateSystem&, const std::vector<DtVector>& vertices);
145 
154  DT_DLL_VRVCORE unsigned short mapPenStyleToStipplePattern(PenStyle penStyle);
155 
158 
160  DT_DLL_VRVCORE bool vrfColorToRgba( unsigned vrfColor, float& r, float& g, float& b, float& a);
161 
163  DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem& cs, const DtVector& localOrigin, double topoHeading);
164 
184  DT_DLL_VRVCORE bool mapFillStyleToFillPattern(FillStyle style, std::vector<unsigned int>&, float* alpha);
185 
187  DT_DLL_VRVCORE std::vector<unsigned int> patternToVector(const bool* const* pattern);
188 
190  DT_DLL_VRVCORE std::vector<unsigned int> patternToVector(const char* const* pattern);
191 
193  DT_DLL_VRVCORE unsigned char reverseBitsWithinByte(unsigned char b);
194 
199  DT_DLL_VRVCORE bool DtInsideTriangulate(const std::vector<DtVector>& contour, std::vector<int>& results);
200 
202  DT_DLL_VRVCORE DtDcm combineOrientationsToDcm( const DtTaitBryan& globalOri, const DtTaitBryan& localOri );
203 
206  DT_DLL_VRVCORE void packPosition( const DtVector& point, const DtDcm& pointOriDcm,
207  const DtVector& offsetPoint, const DtDcm& offsetOriDcm,
208  float packedCoords[4] );
209 
211  DT_DLL_VRVCORE void packPosition( const DtVector& point, const DtDcm& oriDcm, float packedCoords[4] );
212 
214  DT_DLL_VRVCORE void packPositionWithOrigin( const DtVector& origin, const DtVector& point, const DtDcm& oriDcm, float packedCoords[4] );
215  }
216 }
DT_DLL_VRVCORE bool DtInsideTriangulate(const std::vector< DtVector > &contour, std::vector< int > &results)
Triangulates the given points and returns the indicies that form the triangles. The triangles will be...
DT_DLL_VRVCORE double elevationTo(const makVrv::DtCoordinateSystem &, const DtVector &origin, const DtVector &to)
Returns the elevation (topographic) between the two local points. Coordinates are in local database c...
Arrow at the beginning of all segments (will draw arrow as pointing towards start of line segment) ...
ArrowHeadPlacement
Definition: DtTacticalGraphicUtilities.h:62
voidpf uLong int origin
Definition: ioapi.h:42
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
Last arrow is reversed (points towards the previous point), whereas all other arrows point to the nex...
LineStyle
Default line Styles.
Definition: DtTacticalGraphicUtilities.h:28
std::vector< DtVector > DtVerticesVector
Definition: DtTacticalGraphicUtilities.h:25
Double-thick line with arrow at the end and Twist in the first segment.
Has not been set by a network connection.
DT_DLL_VRVCORE DtDcm combineOrientationsToDcm(const DtTaitBryan &globalOri, const DtTaitBryan &localOri)
Adds two orientations together into a DtDcm and converts the DtDcm from zDownToZup.
Double thick line with half arrows at each end of the line: ____________/.
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
DT_DLL_VRVCORE void packPosition(const DtVector &point, const DtDcm &pointOriDcm, const DtVector &offsetPoint, const DtDcm &offsetOriDcm, float packedCoords[4])
Rotates the point by its dcm, rotates the offset by its dcm, combines both results and packs the resu...
ArrowStyle
Definition: DtTacticalGraphicUtilities.h:49
PenStyle
Definition: DtTacticalGraphicUtilities.h:74
Double-thick line with main arrow at end.
DT_DLL_VRVCORE unsigned char reverseBitsWithinByte(unsigned char b)
Helper Function to reverse the most/least significant bits - used by patternToVector(char* pattern[32...
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
DT_DLL_VRVCORE std::vector< unsigned int > patternToVector(const bool *const *pattern)
Takes a 32x32 bool array and turns into 32 integers.
Has not been set by a network connection.
DT_DLL_VRVCORE void packPositionWithOrigin(const DtVector &origin, const DtVector &point, const DtDcm &oriDcm, float packedCoords[4])
Rotates a point by a dcm and packs the coordinates into packedCoords.
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
Double-thick line with main arrow at end where second arrow is dotted.
DT_DLL_VRVCORE bool vrfColorToRgba(unsigned vrfColor, float &r, float &g, float &b, float &a)
Takes a 32 bit argb value and translates it to r, g, b, a colors.
Has not been set by a network connection.
FillStyle
Definition: DtTacticalGraphicUtilities.h:85
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.
Double-thick line with arrow at the end.
FriendlyForceColorStyle
Enumeration used to specify the current friendly force color style By default, the friendly force col...
Definition: DtTacticalGraphicUtilities.h:110
Has not been set by a network connection.
DT_DLL_VRVCORE double angleTo(const makVrv::DtCoordinateSystem &, const DtVector &origin, const DtVector &to)
Returns the angle (topographic) between the two local points. Coordinates are in local database coord...
DT_DLL_VRVCORE unsigned short mapPenStyleToStipplePattern(PenStyle penStyle)
Maps line style to stipple pattern.
Solid fill but will respect alpha color.
DT_DLL_VRVCORE bool mapFillStyleToFillPattern(FillStyle style, std::vector< unsigned int > &, float *alpha)
Sets the fill style according to the following styles 0 - No Fill 1 - Solid Fill 2 - 94% Fill 3 - 88%...
DT_DLL_VRVCORE DtVector midpoint(const makVrv::DtCoordinateSystem &, const DtVector &first, const DtVector &second)
Returns the midpoint between two points. Coordinates are in local database coordinates The coordinate...
DT_DLL_VRVCORE PenStyle mapStipplePatternToPenStyle(unsigned short)
Maps line style to line style.
Has not been set by a network connection.
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)