Pyrogenesis
13997
|
Textured line overlay, with world-space coordinates, rendered in the world onto the terrain. More...
#include <Overlay.h>
Public Types | |
enum | LineCapType { LINECAP_FLAT, LINECAP_ROUND, LINECAP_SHARP, LINECAP_SQUARE } |
Public Member Functions | |
SOverlayTexturedLine () | |
void | PushCoords (const float x, const float z) |
void | PushCoords (const CVector2D &v) |
void | PushCoords (const std::vector< CVector2D > &points) |
Static Public Member Functions | |
static LineCapType | StrToLineCapType (const std::wstring &str) |
Converts a string line cap type into its corresponding LineCap enum value, and returns the resulting value. More... | |
Public Attributes | |
CTexturePtr | m_TextureBase |
CTexturePtr | m_TextureMask |
CColor | m_Color |
Color to apply to the line texture, where indicated by the mask. More... | |
std::vector< float > | m_Coords |
(x, z) vertex coordinate pairs; y is computed automatically. More... | |
float | m_Thickness |
Half-width of the line, in world-space units. More... | |
bool | m_Closed |
Should this line be treated as a closed loop? If set, any end cap settings are ignored. More... | |
bool | m_AlwaysVisible |
Should this line be rendered fully visible at all times, even under the SoD? More... | |
LineCapType | m_StartCapType |
LineCapType | m_EndCapType |
const CSimContext * | m_SimContext |
Simulation context applicable for this overlay line; used to obtain terrain information during automatic computation of Y coordinates. More... | |
shared_ptr< CTexturedLineRData > | m_RenderData |
Cached renderer data, because expensive to compute. More... | |
Textured line overlay, with world-space coordinates, rendered in the world onto the terrain.
Designed for relatively static textured lines, i.e. territory borders, originally.
Once submitted for rendering, instances must not be copied afterwards. The reason is that they are assigned rendering data that is unique to the submitted instance, and non-transferable to any copies that would otherwise be made. Amongst others, this restraint includes that they must not be submitted by their address inside a std::vector storing them by value.
|
inline |
|
inline |
|
inline |
|
static |
Converts a string line cap type into its corresponding LineCap enum value, and returns the resulting value.
If the input string is unrecognized, a warning is issued and a default value is returned.
Definition at line 24 of file Overlay.cpp.
bool SOverlayTexturedLine::m_AlwaysVisible |
bool SOverlayTexturedLine::m_Closed |
CColor SOverlayTexturedLine::m_Color |
std::vector<float> SOverlayTexturedLine::m_Coords |
LineCapType SOverlayTexturedLine::m_EndCapType |
shared_ptr<CTexturedLineRData> SOverlayTexturedLine::m_RenderData |
Cached renderer data, because expensive to compute.
Allocated by the renderer when necessary for rendering purposes.
Note: the rendering data may be shared between copies of this object to prevent having to recompute it, while at the same time maintaining copyability of this object (see also docs on CTexturedLineRData).
const CSimContext* SOverlayTexturedLine::m_SimContext |
LineCapType SOverlayTexturedLine::m_StartCapType |
CTexturePtr SOverlayTexturedLine::m_TextureBase |
CTexturePtr SOverlayTexturedLine::m_TextureMask |
float SOverlayTexturedLine::m_Thickness |