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) 2023 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  };
45 
46  enum class ArrowStyle
47  {
48  Unspecified = -1,
49  Simple = 0,
50  Linear,
51  Main,
56  Berm
57  };
58 
59  enum class ArrowHeadPlacement
60  {
61  Unspecified = -1,
62  None = 0,
69  };
70 
71  enum class PenStyle
72  {
73  Unspecified = -1,
74  NoPen = 1,
75  SolidLine,
76  DashedLine,
77  DottedLine,
78  DashDotLine,
80  };
81 
82  enum class FillStyle
83  {
84  Unspecified = -1,
85  NoFill = 0,
86  SolidFill= 1,
100  Texture,
101  };
102 
108  {
109  DefaultColor = 0,
110  BlackColor,
111  WhiteColor
112  };
113 
117  DT_DLL_VRVCORE double angleTo(const makVrv::DtCoordinateSystem&, const DtVector& origin, const DtVector& to);
118 
123 
127  DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem&, const DtVector& from, const DtVector& to);
128 
132  DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem&, const std::vector<DtVector>& vertices);
133 
136  DT_DLL_VRVCORE DtVector midpoint(const makVrv::DtCoordinateSystem&, const DtVector& first, const DtVector& second);
137 
141  DT_DLL_VRVCORE DtVector midpoint(const makVrv::DtCoordinateSystem&, const std::vector<DtVector>& vertices);
142 
151  DT_DLL_VRVCORE unsigned short mapPenStyleToStipplePattern(PenStyle penStyle);
152 
155 
157  DT_DLL_VRVCORE bool vrfColorToRgba( unsigned vrfColor, float& r, float& g, float& b, float& a);
158 
160  DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem& cs, const DtVector& localOrigin, double topoHeading);
161 
181  DT_DLL_VRVCORE bool mapFillStyleToFillPattern(FillStyle style, std::vector<unsigned int>&, float* alpha);
182 
184  DT_DLL_VRVCORE std::vector<unsigned int> patternToVector(bool* pattern[32]);
185 
187  DT_DLL_VRVCORE std::vector<unsigned int> patternToVector(char* pattern[32]);
188 
190  DT_DLL_VRVCORE unsigned char reverseBitsWithinByte(unsigned char b);
191 
196  DT_DLL_VRVCORE bool DtInsideTriangulate(const std::vector<DtVector>& contour, std::vector<int>& results);
197 
199  DT_DLL_VRVCORE DtDcm combineOrientationsToDcm( const DtTaitBryan& globalOri, const DtTaitBryan& localOri );
200 
203  DT_DLL_VRVCORE void packPosition( const DtVector& point, const DtDcm& pointOriDcm,
204  const DtVector& offsetPoint, const DtDcm& offsetOriDcm,
205  float packedCoords[4] );
206 
208  DT_DLL_VRVCORE void packPosition( const DtVector& point, const DtDcm& oriDcm, float packedCoords[4] );
209  }
210 }
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:59
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.
DT_DLL_VRVCORE std::vector< unsigned int > patternToVector(bool *pattern[32])
Takes a 32x32 bool array and turns into 32 integers.
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.
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:46
PenStyle
Definition: DtTacticalGraphicUtilities.h:71
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
Has not been set by a network connection.
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:82
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:107
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)