|
Pyrogenesis
13997
|
Functions | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| void | ConstructBoxOutline (const CBoundingBoxOriented &box, SOverlayLine &overlayLine) |
Constructs a solid outline of an arbitrarily-aligned bounding box. More... | |
| void | ConstructBoxOutline (const CBoundingBoxAligned &box, SOverlayLine &overlayLine) |
Constructs a solid outline of an axis-aligned bounding box. More... | |
| void | ConstructGimbal (const CVector3D ¢er, float radius, SOverlayLine &out, size_t numSteps=16) |
| Constructs a simple gimbal outline with the given radius and center. More... | |
| void | ConstructAxesMarker (const CMatrix3D &coordSystem, SOverlayLine &outX, SOverlayLine &outY, SOverlayLine &outZ) |
| Constructs 3D axis marker overlay lines for the given coordinate system. More... | |
| void | SmoothPointsAverage (std::vector< CVector2D > &points, bool closed) |
| Updates the given points so each point is averaged with its neighbours, resulting in a somewhat smoother curve, assuming the points are roughly equally spaced. More... | |
| 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 points, using a rounded nonuniform spline. More... | |
| 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. More... | |
| 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 of radius radius. More... | |
| 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 between every two control points. More... | |
| void SimRender::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 of radius radius.
The resulting values satisfy out_numSteps * out_stepAngle = 2*PI.
This function is used to find the angular step parameters when drawing a circle outline approximated by several connected chords; it returns the step angle and number of steps such that the length of each resulting chord is less than or equal to maxChordLength. By stating that each chord cannot be longer than a particular length, a certain level of visual smoothness of the resulting circle outline can be guaranteed independently of the radius of the outline.
| radius | Radius of the circle. Must be strictly positive. |
| maxChordLength | Desired maximum length of individual chords. Must be strictly positive. |
Definition at line 525 of file Render.cpp.
| void SimRender::ConstructAxesMarker | ( | const CMatrix3D & | coordSystem, |
| SOverlayLine & | outX, | ||
| SOverlayLine & | outY, | ||
| SOverlayLine & | outZ | ||
| ) |
Constructs 3D axis marker overlay lines for the given coordinate system.
The XYZ axes are colored RGB, respectively.
| [in] | coordSystem | Specifies the coordinate system. |
| [out] | outX,outY,outZ | Constructed overlay lines for each axes. |
Definition at line 281 of file Render.cpp.
| void SimRender::ConstructBoxOutline | ( | const CBoundingBoxOriented & | box, |
| SOverlayLine & | overlayLine | ||
| ) |
Constructs a solid outline of an arbitrarily-aligned bounding box.
| [in] | box | |
| [in,out] | overlayLine | Updated overlay line representing the oriented box. |
Definition at line 190 of file Render.cpp.
| void SimRender::ConstructBoxOutline | ( | const CBoundingBoxAligned & | box, |
| SOverlayLine & | overlayLine | ||
| ) |
Constructs a solid outline of an axis-aligned bounding box.
| [in] | bound | |
| [in,out] | overlayLine | Updated overlay line representing the AABB. |
Definition at line 166 of file Render.cpp.
| void SimRender::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.
| [in] | x,z | Coordinates of center of circle. |
| [in] | radius | Radius of circle to construct. |
| [in,out] | overlay | Updated overlay line representing this circle. |
| [in] | floating | If true, the circle conforms to water as well. |
| [in] | heightOffset | Height above terrain to offset the circle. |
| heightOffset | The vertical offset to apply to points, to raise the line off the terrain a bit. |
Definition at line 70 of file Render.cpp.
| void SimRender::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.
| [in] | linePoints | List of points specifying the input line. |
| [out] | dashedLineOut | The dashed line returned as a list of smaller lines |
| [in] | dashLength | Length of a single dash. Must be strictly positive. |
| [in] | blankLength | Length of a single blank between dashes. Must be strictly positive. |
Definition at line 438 of file Render.cpp.
| void SimRender::ConstructGimbal | ( | const CVector3D & | center, |
| float | radius, | ||
| SOverlayLine & | out, | ||
| size_t | numSteps = 16 |
||
| ) |
Constructs a simple gimbal outline with the given radius and center.
| [in] | center | |
| [in] | radius | |
| [in,out] | out | Updated overlay line representing the gimbal. |
| [in] | numSteps | The amount of steps to trace a circle's complete outline. Must be a (strictly) positive multiple of four. For small radii, you can get away with small values; setting this to 4 will create a diamond shape. |
Definition at line 220 of file Render.cpp.
| void SimRender::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.
| [in] | xz | List of x,z coordinate pairs representing the line. |
| [in,out] | overlay | Updated overlay line now conforming to terrain. |
| [in] | floating | If true, the line conforms to water as well. |
| [in] | heightOffset | Height above terrain to offset the line. |
Definition at line 35 of file Render.cpp.
| void SimRender::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.
| [in] | x,z | Coordinates of center of rectangle. |
| [in] | w,h | Width/height dimensions of the rectangle. |
| [in] | a | Clockwise angle to orient the rectangle. |
| [in,out] | overlay | Updated overlay line representing this rectangle. |
| [in] | floating | If true, the rectangle conforms to water as well. |
| [in] | heightOffset | Height above terrain to offset the rectangle. |
Definition at line 121 of file Render.cpp.
| void SimRender::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 points, using a rounded nonuniform spline.
| [in,out] | points | List of points to interpolate. |
| [in] | closed | if true, then the points are treated as a closed path (the last is connected to the first). |
| [in] | offset | The points are shifted by this distance in a direction 90 degrees clockwise from the direction of the curve. |
| [in] | segmentSamples | Amount of intermediate points to sample between every two control points. |
Definition at line 347 of file Render.cpp.
| void SimRender::SmoothPointsAverage | ( | std::vector< CVector2D > & | points, |
| bool | closed | ||
| ) |
Updates the given points so each point is averaged with its neighbours, resulting in a somewhat smoother curve, assuming the points are roughly equally spaced.
| [in,out] | points | List of points to smooth. |
| [in] | closed | if true, then the points are treated as a closed path (the last is connected to the first). |
Definition at line 305 of file Render.cpp.
| void SimRender::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 between every two control points.
The resulting subdivided list of points is written back to points.
| points | The list of intermediate points to subdivide. |
| maxSegmentLength | The maximum length of a single segment after subdivision. Must be strictly positive. |
| closed | Should the provided list of points be treated as a closed shape? If true, the resulting list of points will include extra subdivided points between the last and the first point. |
Definition at line 534 of file Render.cpp.
1.8.5