![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
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 | 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 endpoints and the circle's center), 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 | 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 | ConstructTexturedLineBox (SOverlayTexturedLine &overlay, const CVector2D &origin, const CFixedVector3D &rotation, const float sizeX, const float sizeZ) |
| Sets the coordinates of a rectangular textured overlay, for example used by selection rings of structures. More... | |
| void | ConstructTexturedLineCircle (SOverlayTexturedLine &overlay, const CVector2D &origin, const float overlay_radius) |
| Sets the coordinates of a circular textured overlay, for example by selection rings of units or attack range visualization. More... | |
| 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. |
| 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. |
| 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. |
| 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. |
| void SimRender::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 endpoints and the circle's center), conforming to terrain.
| 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. |
| 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. |
| 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. |
| 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. |
| void SimRender::ConstructTexturedLineBox | ( | SOverlayTexturedLine & | overlay, |
| const CVector2D & | origin, | ||
| const CFixedVector3D & | rotation, | ||
| const float | sizeX, | ||
| const float | sizeZ | ||
| ) |
Sets the coordinates of a rectangular textured overlay, for example used by selection rings of structures.
| void SimRender::ConstructTexturedLineCircle | ( | SOverlayTexturedLine & | overlay, |
| const CVector2D & | origin, | ||
| const float | overlay_radius | ||
| ) |
Sets the coordinates of a circular textured overlay, for example by selection rings of units or attack range visualization.
| 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. |
| 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). |
| 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. |