18 #ifndef INCLUDED_HELPER_RENDER
19 #define INCLUDED_HELPER_RENDER
69 bool floating,
float heightOffset = 0.25f);
83 bool floating,
float heightOffset = 0.25f);
97 bool floating,
float heightOffset = 0.25f);
156 void InterpolatePointsRNS(std::vector<CVector2D>& points,
bool closed,
float offset,
int segmentSamples = 4);
167 const float dashLength,
const float blankLength);
181 void AngularStepFromChordLen(
const float maxChordLength,
const float radius,
float& out_stepAngle,
unsigned& out_numSteps);
192 void SubdividePoints(std::vector<CVector2D>& points,
float maxSegmentLength,
bool closed);
196 #endif // INCLUDED_HELPER_RENDER
Line-based overlay, with world-space coordinates, rendered in the world potentially behind other obje...
void ConstructDashedLine(const std::vector< CVector2D > &linePoints, SDashedLine &dashedLineOut, const float dashLength, const float blankLength)
Creates a dashed line from the given line, dash length, and blank space between.
static void out(const wchar_t *fmt,...)
void InterpolatePointsRNS(std::vector< CVector2D > &points, bool closed, float offset, int segmentSamples=4)
Updates the given points to include intermediate points interpolating between the original control po...
Contains pointers to various 'global' objects that are needed by the simulation code, to allow easy access without using real (evil) global variables.
size_t GetEndIndex(size_t i)
Returns the (exclusive) end point index (i.e. index within m_Points) of dash n.
void ConstructCircleOnGround(const CSimContext &context, float x, float z, float radius, SOverlayLine &overlay, bool floating, float heightOffset=0.25f)
Constructs overlay line as a circle with given center and radius, conforming to terrain.
void ConstructLineOnGround(const CSimContext &context, const std::vector< float > &xz, SOverlayLine &overlay, bool floating, float heightOffset=0.25f)
Constructs overlay line from given points, conforming to terrain.
void SubdividePoints(std::vector< CVector2D > &points, float maxSegmentLength, bool closed)
Subdivides a list of points into segments of maximum length maxSegmentLength that are of equal size b...
void AngularStepFromChordLen(const float maxChordLength, const float radius, float &out_stepAngle, unsigned &out_numSteps)
Computes angular step parameters out_stepAngle and out_numSteps, given a maxChordLength on a circle o...
std::vector< CVector2D > m_Points
Packed array of consecutive dashes' points. Use m_StartIndices to navigate it.
std::vector< size_t > m_StartIndices
Start indices in m_Points of each dash.
void ConstructSquareOnGround(const CSimContext &context, float x, float z, float w, float h, float a, SOverlayLine &overlay, bool floating, float heightOffset=0.25f)
Constructs overlay line as rectangle with given center and dimensions, conforming to terrain...
void SmoothPointsAverage(std::vector< CVector2D > &points, bool closed)
Updates the given points so each point is averaged with its neighbours, resulting in a somewhat smoot...
void ConstructAxesMarker(const CMatrix3D &coordSystem, SOverlayLine &outX, SOverlayLine &outY, SOverlayLine &outZ)
Constructs 3D axis marker overlay lines for the given coordinate system.
void ConstructBoxOutline(const CBoundingBoxOriented &box, SOverlayLine &overlayLine)
Constructs a solid outline of an arbitrarily-aligned bounding box.
void ConstructGimbal(const CVector3D ¢er, float radius, SOverlayLine &out, size_t numSteps=16)
Constructs a simple gimbal outline with the given radius and center.