Pyrogenesis trunk
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
CTexturedLineRData Class Reference

Rendering data for an STexturedOverlayLine. More...

#include <TexturedLineRData.h>

Inheritance diagram for CTexturedLineRData:
Inheritance graph
[legend]
Collaboration diagram for CTexturedLineRData:
Collaboration graph
[legend]

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::IVertexInputLayoutGetVertexInputLayout ()
 

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CTexturedLineRData()

CTexturedLineRData::CTexturedLineRData ( )
default

◆ ~CTexturedLineRData()

CTexturedLineRData::~CTexturedLineRData ( )
default

Member Function Documentation

◆ cassert()

CTexturedLineRData::cassert ( sizeof(SVertex = =32)
protected

◆ Centroid()

CVector3D CTexturedLineRData::Centroid ( const SVertex v1,
const SVertex v2 
)
inlineprotected

Small utility function; grabs the centroid of the positions of two vertices.

◆ CreateLineCap()

void CTexturedLineRData::CreateLineCap ( const SOverlayTexturedLine line,
const CVector3D corner1,
const CVector3D corner2,
const CVector3D normal,
SOverlayTexturedLine::LineCapType  endCapType,
std::vector< SVertex > &  verticesOut,
std::vector< u16 > &  indicesOut 
)
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.

Parameters
corner1One of the two butt-end corner points of the line to which the cap should be attached.
corner2One of the two butt-end corner points of the line to which the cap should be attached.
normalNormal vector indicating the direction of the segment to which the cap should be attached.
endCapTypeThe type of end cap to produce.
verticesOutOutput vector of vertices for passing to the renderer.
indicesOutOutput vector of vertex indices for passing to the renderer.

◆ GetVertexInputLayout()

Renderer::Backend::IVertexInputLayout * CTexturedLineRData::GetVertexInputLayout ( )
static

◆ IsVisibleInFrustum()

bool CTexturedLineRData::IsVisibleInFrustum ( const CFrustum frustum) const

◆ NONCOPYABLE()

CTexturedLineRData::NONCOPYABLE ( CTexturedLineRData  )
private

◆ Render()

void CTexturedLineRData::Render ( Renderer::Backend::IDeviceCommandContext deviceCommandContext,
Renderer::Backend::IVertexInputLayout vertexInputLayout,
const SOverlayTexturedLine line,
Renderer::Backend::IShaderProgram shader 
)

◆ Update()

void CTexturedLineRData::Update ( const SOverlayTexturedLine line)

Member Data Documentation

◆ m_BoundingBox

CBoundingBoxAligned CTexturedLineRData::m_BoundingBox
protected

◆ m_VB

CVertexBufferManager::Handle CTexturedLineRData::m_VB
protected

◆ m_VBIndices

CVertexBufferManager::Handle CTexturedLineRData::m_VBIndices
protected

The documentation for this class was generated from the following files: