Crazy Eddies GUI System: CEGUI::GeometryBuffer Class Reference

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes
CEGUI::GeometryBuffer Class Reference

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.

List of all members.

## 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.
virtual void | setRotation (const Vector3 &r)=0
| Set the rotations to be applied to the geometry in the buffer when it is subsequently rendered.
virtual void | setPivot (const Vector3 &p)=0
| Set the pivot point to be used when applying the rotations.
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.
virtual void | appendGeometry (const Vertex *const vbuff, uint vertex_count)=0
| Append a number of vertices from an array to the GeometryBuffer.
virtual void | setActiveTexture (Texture *texture)=0
| Set the active texture to be used with all subsequently added vertices.
virtual void | reset ()=0
| Clear all buffered data and reset the GeometryBuffer to the default state.
virtual Texture * | getActiveTexture () const =0
| Return a pointer to the currently active Texture object. This may return 0 if no texture is set.
virtual uint | getVertexCount () const =0
| Return the total number of vertices currently held by this GeometryBuffer object.
virtual uint | getBatchCount () const =0
| Return the number of batches of geometry that this GeometryBuffer has split the vertices into.
virtual void | setRenderEffect (RenderEffect *effect)=0
| Set the RenderEffect to be used by this GeometryBuffer.
virtual RenderEffect * | getRenderEffect ()=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.
virtual BlendMode | getBlendMode () const
| Return the blend mode that is set to be used for this GeometryBuffer.
## 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:

  vbuff | Pointer to an array of Vertex objects that describe the vertices that are to be added to the GeometryBuffer.
  vertex_count | The number of Vertex objects from the array vbuff that are to be added to the GeometryBuffer.

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

virtual void CEGUI::GeometryBuffer::appendVertex | ( | const Vertex & | vertex | ) | `[pure virtual]`

Append a single vertex to the buffer.

Parameters:

  vertex | Vertex object describing the vertex to be added to the GeometryBuffer.

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

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::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::DirectFBGeometryBuffer, CEGUI::IrrlichtGeometryBuffer, CEGUI::NullGeometryBuffer, CEGUI::OgreGeometryBuffer, and CEGUI::OpenGLGeometryBuffer.

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::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::DirectFBGeometryBuffer, CEGUI::IrrlichtGeometryBuffer, CEGUI::NullGeometryBuffer, CEGUI::OgreGeometryBuffer, and CEGUI::OpenGLGeometryBuffer.

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]`

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

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

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

virtual void CEGUI::GeometryBuffer::setActiveTexture | ( | Texture * | texture | ) | `[pure virtual]`

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

Parameters:

  texture | Pointer 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::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::DirectFBGeometryBuffer, CEGUI::IrrlichtGeometryBuffer, CEGUI::NullGeometryBuffer, CEGUI::OgreGeometryBuffer, and CEGUI::OpenGLGeometryBuffer.

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:

  mode | One 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:

  p | Vector3 describing the location of the pivot point to be used when applying the rotation to the geometry.

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

virtual void CEGUI::GeometryBuffer::setRenderEffect | ( | RenderEffect * | effect | ) | `[pure virtual]`

Set the RenderEffect to be used by this GeometryBuffer.

Parameters:

  effect | Pointer 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::Direct3D10GeometryBuffer, CEGUI::Direct3D11GeometryBuffer, CEGUI::Direct3D9GeometryBuffer, CEGUI::DirectFBGeometryBuffer, CEGUI::IrrlichtGeometryBuffer, CEGUI::NullGeometryBuffer, CEGUI::OgreGeometryBuffer, and CEGUI::OpenGLGeometryBuffer.

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:

  r | Vector3 describing the rotation factors to be used.

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

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:

  v | Vector3 describing the three axis translation vector to be used.

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