Pyrogenesis trunk
|
Rendering data for an STexturedOverlayLine. More...
#include <TexturedLineRData.h>
Classes | |
struct | SVertex |
Public Member Functions | |
CTexturedLineRData ()=default | |
~CTexturedLineRData ()=default | |
void | Update (const SOverlayTexturedLine &line) |
void | Render (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, Renderer::Backend::IVertexInputLayout *vertexInputLayout, const SOverlayTexturedLine &line, Renderer::Backend::IShaderProgram *shader) |
bool | IsVisibleInFrustum (const CFrustum &frustum) const |
Public Member Functions inherited from CRenderData | |
CRenderData () | |
virtual | ~CRenderData () |
Static Public Member Functions | |
static Renderer::Backend::IVertexInputLayout * | GetVertexInputLayout () |
Protected Member Functions | |
cassert (sizeof(SVertex)==32) | |
void | CreateLineCap (const SOverlayTexturedLine &line, const CVector3D &corner1, const CVector3D &corner2, const CVector3D &normal, SOverlayTexturedLine::LineCapType endCapType, std::vector< SVertex > &verticesOut, std::vector< u16 > &indicesOut) |
Creates a line cap of the specified type endCapType at the end of the segment going in direction normal , and appends the vertices to verticesOut in GL_TRIANGLES order. More... | |
CVector3D | Centroid (const SVertex &v1, const SVertex &v2) |
Small utility function; grabs the centroid of the positions of two vertices. More... | |
Protected Attributes | |
CVertexBufferManager::Handle | m_VB |
CVertexBufferManager::Handle | m_VBIndices |
CBoundingBoxAligned | m_BoundingBox |
Private Member Functions | |
NONCOPYABLE (CTexturedLineRData) | |
Additional Inherited Members | |
Public Attributes inherited from CRenderData | |
int | m_UpdateFlags |
Rendering data for an STexturedOverlayLine.
Note that instances may be shared amongst multiple copies of the same STexturedOverlayLine instance. The reason is that this rendering data is non-copyable, but we do wish to maintain copyability of SOverlayTexturedLineData to not limit its usage patterns too much (particularly the practice of storing them into containers).
For this reason, instead of storing a reverse pointer back to any single SOverlayTexturedLine, the methods in this class accept references to STexturedOverlayLines to work with. It is up to client code to pass in SOverlayTexturedLines to all methods that are consistently the same instance or non-modified copies of it.
|
default |
|
default |
|
protected |
Small utility function; grabs the centroid of the positions of two vertices.
|
protected |
Creates a line cap of the specified type endCapType
at the end of the segment going in direction normal
, and appends the vertices to verticesOut
in GL_TRIANGLES order.
corner1 | One of the two butt-end corner points of the line to which the cap should be attached. |
corner2 | One of the two butt-end corner points of the line to which the cap should be attached. |
normal | Normal vector indicating the direction of the segment to which the cap should be attached. |
endCapType | The type of end cap to produce. |
verticesOut | Output vector of vertices for passing to the renderer. |
indicesOut | Output vector of vertex indices for passing to the renderer. |
|
static |
bool CTexturedLineRData::IsVisibleInFrustum | ( | const CFrustum & | frustum | ) | const |
|
private |
void CTexturedLineRData::Render | ( | Renderer::Backend::IDeviceCommandContext * | deviceCommandContext, |
Renderer::Backend::IVertexInputLayout * | vertexInputLayout, | ||
const SOverlayTexturedLine & | line, | ||
Renderer::Backend::IShaderProgram * | shader | ||
) |
void CTexturedLineRData::Update | ( | const SOverlayTexturedLine & | line | ) |
|
protected |
|
protected |
|
protected |