18 #ifndef INCLUDED_HELPER_RENDER 19 #define INCLUDED_HELPER_RENDER 52 return (i < m_StartIndices.size() - 1 ? m_StartIndices[i+1] : m_Points.size());
68 const CSimContext& context,
const std::vector<float>& xz,
70 bool floating,
float heightOffset = 0.25f);
83 const CSimContext& context,
float x,
float z,
float radius,
85 bool floating,
float heightOffset = 0.25f);
92 const CSimContext& context,
float x,
float z,
float radius,
93 float start,
float end,
95 bool floating,
float heightOffset = 0.25f);
108 const CSimContext& context,
float x,
float z,
float w,
float h,
float a,
110 bool floating,
float heightOffset = 0.25f);
169 void InterpolatePointsRNS(std::vector<CVector2D>& points,
bool closed,
float offset,
int segmentSamples = 4);
180 const float dashLength,
const float blankLength);
194 void AngularStepFromChordLen(
const float maxChordLength,
const float radius,
float& out_stepAngle,
unsigned& out_numSteps);
205 void SubdividePoints(std::vector<CVector2D>& points,
float maxSegmentLength,
bool closed);
209 #endif // INCLUDED_HELPER_RENDER
Line-based overlay, with world-space coordinates, rendered in the world potentially behind other obje...
Definition: Overlay.h:35
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.
Definition: Render.cpp:477
static void out(const wchar_t *fmt,...)
Definition: wdbg_sym.cpp:419
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...
Definition: Render.cpp:386
Definition: Vector3D.h:28
Contains pointers to various 'global' objects that are needed by the simulation code, to allow easy access without using real (evil) global variables.
Definition: SimContext.h:32
void ConstructClosedArcOnGround(const CSimContext &context, float x, float z, float radius, float start, float end, SOverlayLine &overlay, bool floating, float heightOffset=0.25f)
Constructs overlay line as an outlined circle sector (an arc with straight lines between the endpoint...
Definition: Render.cpp:135
size_t GetEndIndex(size_t i)
Returns the (exclusive) end point index (i.e. index within m_Points) of dash n.
Definition: Render.h:49
Definition: Matrix3D.h:33
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.
Definition: Render.cpp:128
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.
Definition: Render.cpp:35
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...
Definition: Render.cpp:573
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...
Definition: Render.cpp:564
std::vector< CVector2D > m_Points
Packed array of consecutive dashes' points. Use m_StartIndices to navigate it.
Definition: Render.h:39
std::vector< size_t > m_StartIndices
Start indices in m_Points of each dash.
Definition: Render.h:46
void ConstructBoxOutline(const CBoundingBoxAligned &box, SOverlayLine &overlayLine)
Constructs a solid outline of an axis-aligned bounding box.
Definition: Render.cpp:205
Definition: Vector2D.h:31
Definition: BoundingBoxAligned.h:35
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...
Definition: Render.cpp:160
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...
Definition: Render.cpp:344
Definition: BoundingBoxOriented.h:30
void ConstructAxesMarker(const CMatrix3D &coordSystem, SOverlayLine &outX, SOverlayLine &outY, SOverlayLine &outZ)
Constructs 3D axis marker overlay lines for the given coordinate system.
Definition: Render.cpp:320
void ConstructGimbal(const CVector3D ¢er, float radius, SOverlayLine &out, size_t numSteps=16)
Constructs a simple gimbal outline with the given radius and center.
Definition: Render.cpp:259