Crazy Eddies GUI System  0.7.2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CEGUI::GeometryBuffer Class Referenceabstract

Abstract class defining the interface for objects that buffer geometry for later rendering. More...

Inherited by CEGUI::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::DirectFBGeometryBuffer, CEGUI::IrrlichtGeometryBuffer, CEGUI::NullGeometryBuffer, CEGUI::OgreGeometryBuffer, and CEGUI::OpenGLGeometryBuffer.

Public Member Functions

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

 GeometryBuffer ()
 Constructor.
 

Protected Attributes

BlendMode d_blendMode
 The BlendMode to use when rendering this GeometryBuffer.
 

Detailed Description

Abstract class defining the interface for objects that buffer geometry for later rendering.

Member Function Documentation

virtual void CEGUI::GeometryBuffer::appendGeometry ( const Vertex *const  vbuff,
uint  vertex_count 
)
pure 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.

Implemented in CEGUI::IrrlichtGeometryBuffer, CEGUI::OgreGeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::OpenGLGeometryBuffer, CEGUI::NullGeometryBuffer, and CEGUI::DirectFBGeometryBuffer.

virtual void CEGUI::GeometryBuffer::appendVertex ( const Vertex vertex)
pure virtual
virtual Texture* CEGUI::GeometryBuffer::getActiveTexture ( ) const
pure 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.

Implemented in CEGUI::IrrlichtGeometryBuffer, CEGUI::OgreGeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::OpenGLGeometryBuffer, CEGUI::NullGeometryBuffer, and CEGUI::DirectFBGeometryBuffer.

virtual uint CEGUI::GeometryBuffer::getBatchCount ( ) const
pure 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.

Implemented in CEGUI::IrrlichtGeometryBuffer, CEGUI::OgreGeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::OpenGLGeometryBuffer, CEGUI::NullGeometryBuffer, and CEGUI::DirectFBGeometryBuffer.

virtual BlendMode CEGUI::GeometryBuffer::getBlendMode ( ) const
virtual

Return the blend mode that is set to be used for this GeometryBuffer.

Returns
One of the BlendMode enumerated values indicating the blending mode that will be used when rendering all geometry added to this GeometryBuffer object.
virtual uint CEGUI::GeometryBuffer::getVertexCount ( ) const
pure virtual
virtual void CEGUI::GeometryBuffer::setActiveTexture ( Texture texture)
pure 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.

Implemented in CEGUI::IrrlichtGeometryBuffer, CEGUI::OgreGeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::OpenGLGeometryBuffer, CEGUI::NullGeometryBuffer, and CEGUI::DirectFBGeometryBuffer.

virtual void CEGUI::GeometryBuffer::setBlendMode ( const BlendMode  mode)
virtual

Set the blend mode option to use when rendering this GeometryBuffer.

Note
The blend mode setting is not a 'state' setting, but is used for all geometry added to the buffer regardless of when the blend mode is set.
Parameters
modeOne of the BlendMode enumerated values indicating the blending mode to be used.
virtual void CEGUI::GeometryBuffer::setPivot ( const Vector3 p)
pure 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.

Implemented in CEGUI::IrrlichtGeometryBuffer, CEGUI::OgreGeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::OpenGLGeometryBuffer, CEGUI::NullGeometryBuffer, and CEGUI::DirectFBGeometryBuffer.

virtual void CEGUI::GeometryBuffer::setRenderEffect ( RenderEffect effect)
pure 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!

Implemented in CEGUI::IrrlichtGeometryBuffer, CEGUI::OgreGeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::OpenGLGeometryBuffer, CEGUI::NullGeometryBuffer, and CEGUI::DirectFBGeometryBuffer.

virtual void CEGUI::GeometryBuffer::setRotation ( const Vector3 r)
pure 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.

Implemented in CEGUI::IrrlichtGeometryBuffer, CEGUI::OgreGeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::OpenGLGeometryBuffer, CEGUI::NullGeometryBuffer, and CEGUI::DirectFBGeometryBuffer.

virtual void CEGUI::GeometryBuffer::setTranslation ( const Vector3 v)
pure 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.

Implemented in CEGUI::IrrlichtGeometryBuffer, CEGUI::OgreGeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::OpenGLGeometryBuffer, CEGUI::NullGeometryBuffer, and CEGUI::DirectFBGeometryBuffer.