Pyrogenesis  trunk
Classes | 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 ()
 
 ~CTexturedLineRData ()
 
void Update (const SOverlayTexturedLine &line)
 
void Render (const SOverlayTexturedLine &line, const CShaderProgramPtr &shader)
 
- Public Member Functions inherited from CRenderData
 CRenderData ()
 
virtual ~CRenderData ()
 

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

CVertexBuffer::VBChunkm_VB
 
CVertexBuffer::VBChunkm_VBIndices
 

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 ( )
inline
CTexturedLineRData::~CTexturedLineRData ( )
inline

Member Function Documentation

CTexturedLineRData::cassert ( sizeof(SVertex = =32)
protected
CVector3D CTexturedLineRData::Centroid ( const SVertex v1,
const SVertex v2 
)
inlineprotected

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

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.
CTexturedLineRData::NONCOPYABLE ( CTexturedLineRData  )
private
void CTexturedLineRData::Render ( const SOverlayTexturedLine line,
const CShaderProgramPtr shader 
)
void CTexturedLineRData::Update ( const SOverlayTexturedLine line)

Member Data Documentation

CVertexBuffer::VBChunk* CTexturedLineRData::m_VB
protected
CVertexBuffer::VBChunk* CTexturedLineRData::m_VBIndices
protected

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