Crazy Eddies GUI System  0.7.2
Public Member Functions | Protected Types | Protected Attributes | List of all members
CEGUI::NullGeometryBuffer Class Reference

Implementation of CEGUI::GeometryBuffer for the Null engine. More...

+ Inheritance diagram for CEGUI::NullGeometryBuffer:
+ Collaboration diagram for CEGUI::NullGeometryBuffer:

Public Member Functions

 NullGeometryBuffer ()
 Constructor.
 
virtual ~NullGeometryBuffer ()
 Destructor.
 
void draw () const
 Draw the geometry buffered within this GeometryBuffer object.
 
void setTranslation (const Vector3 &v)
 Set the translation to be applied to the geometry in the buffer when it is subsequently rendered. More...
 
void setRotation (const Vector3 &r)
 Set the rotations to be applied to the geometry in the buffer when it is subsequently rendered. More...
 
void setPivot (const Vector3 &p)
 Set the pivot point to be used when applying the rotations. More...
 
void setClippingRegion (const Rect &region)
 Set the clipping region to be used when rendering this buffer.
 
void appendVertex (const Vertex &vertex)
 Append a single vertex to the buffer. More...
 
void appendGeometry (const Vertex *const vbuff, uint vertex_count)
 Append a number of vertices from an array to the GeometryBuffer. More...
 
void setActiveTexture (Texture *texture)
 Set the active texture to be used with all subsequently added vertices. More...
 
void reset ()
 Clear all buffered data and reset the GeometryBuffer to the default state.
 
TexturegetActiveTexture () const
 Return a pointer to the currently active Texture object. This may return 0 if no texture is set. More...
 
uint getVertexCount () const
 Return the total number of vertices currently held by this GeometryBuffer object. More...
 
uint getBatchCount () const
 Return the number of batches of geometry that this GeometryBuffer has split the vertices into. More...
 
void setRenderEffect (RenderEffect *effect)
 Set the RenderEffect to be used by this GeometryBuffer. More...
 
RenderEffectgetRenderEffect ()
 Return the RenderEffect object that is assigned to this GeometryBuffer or 0 if none.
 
- Public Member Functions inherited from CEGUI::GeometryBuffer
virtual ~GeometryBuffer ()
 Destructor.
 
virtual void setBlendMode (const BlendMode mode)
 Set the blend mode option to use when rendering this GeometryBuffer. More...
 
virtual BlendMode getBlendMode () const
 Return the blend mode that is set to be used for this GeometryBuffer. More...
 

Protected Types

typedef std::vector< VertexVertexList
 type of container used to queue the geometry
 

Protected Attributes

NullTextured_activeTexture
 Texture that is set as active.
 
Rect d_clipRect
 rectangular clip region
 
Vector3 d_translation
 translation vector
 
Vector3 d_rotation
 rotation vector
 
Vector3 d_pivot
 pivot point for rotation
 
RenderEffectd_effect
 RenderEffect that will be used by the GeometryBuffer.
 
VertexList d_vertices
 container where added geometry is stored.
 
- Protected Attributes inherited from CEGUI::GeometryBuffer
BlendMode d_blendMode
 The BlendMode to use when rendering this GeometryBuffer.
 

Additional Inherited Members

- Protected Member Functions inherited from CEGUI::GeometryBuffer
 GeometryBuffer ()
 Constructor.
 

Detailed Description

Implementation of CEGUI::GeometryBuffer for the Null engine.

Member Function Documentation

void CEGUI::NullGeometryBuffer::appendGeometry ( const Vertex *const  vbuff,
uint  vertex_count 
)
virtual

Append a number of vertices from an array to the GeometryBuffer.

Parameters
vbuffPointer to an array of Vertex objects that describe the vertices that are to be added to the GeometryBuffer.
vertex_countThe number of Vertex objects from the array vbuff that are to be added to the GeometryBuffer.

Implements CEGUI::GeometryBuffer.

void CEGUI::NullGeometryBuffer::appendVertex ( const Vertex vertex)
virtual

Append a single vertex to the buffer.

Parameters
vertexVertex object describing the vertex to be added to the GeometryBuffer.

Implements CEGUI::GeometryBuffer.

Texture* CEGUI::NullGeometryBuffer::getActiveTexture ( ) const
virtual

Return a pointer to the currently active Texture object. This may return 0 if no texture is set.

Returns
Pointer the Texture object that is currently active, or 0 if texturing is not being used.

Implements CEGUI::GeometryBuffer.

uint CEGUI::NullGeometryBuffer::getBatchCount ( ) const
virtual

Return the number of batches of geometry that this GeometryBuffer has split the vertices into.

Note
How batching is done will be largely implementation specific, although it would be reasonable to expect that you will have at least one batch of geometry per texture switch.
Returns
The number of batches of geometry held by the GeometryBuffer.

Implements CEGUI::GeometryBuffer.

uint CEGUI::NullGeometryBuffer::getVertexCount ( ) const
virtual

Return the total number of vertices currently held by this GeometryBuffer object.

Returns
The number of vertices that have been appended to this GeometryBuffer.

Implements CEGUI::GeometryBuffer.

void CEGUI::NullGeometryBuffer::setActiveTexture ( Texture texture)
virtual

Set the active texture to be used with all subsequently added vertices.

Parameters
texturePointer to a Texture object that shall be used for subsequently added vertices. This may be 0, in which case texturing will be disabled for subsequently added vertices.

Implements CEGUI::GeometryBuffer.

void CEGUI::NullGeometryBuffer::setPivot ( const Vector3 p)
virtual

Set the pivot point to be used when applying the rotations.

Parameters
pVector3 describing the location of the pivot point to be used when applying the rotation to the geometry.

Implements CEGUI::GeometryBuffer.

void CEGUI::NullGeometryBuffer::setRenderEffect ( RenderEffect effect)
virtual

Set the RenderEffect to be used by this GeometryBuffer.

Parameters
effectPointer to the RenderEffect to be used during renderng of the GeometryBuffer. May be 0 to remove a previously added RenderEffect.
Note
When adding a RenderEffect, the GeometryBuffer does not take ownership of, nor make a copy of, the passed RenderEffect - this means you need to be careful not to delete the RenderEffect if it might still be in use!

Implements CEGUI::GeometryBuffer.

void CEGUI::NullGeometryBuffer::setRotation ( const Vector3 r)
virtual

Set the rotations to be applied to the geometry in the buffer when it is subsequently rendered.

Parameters
rVector3 describing the rotation factors to be used.

Implements CEGUI::GeometryBuffer.

void CEGUI::NullGeometryBuffer::setTranslation ( const Vector3 v)
virtual

Set the translation to be applied to the geometry in the buffer when it is subsequently rendered.

Parameters
vVector3 describing the three axis translation vector to be used.

Implements CEGUI::GeometryBuffer.