|
Crazy Eddies GUI System 0.7.6
|
Implementation of CEGUI::GeometryBuffer for the Ogre engine. More...
Inheritance diagram for CEGUI::OgreGeometryBuffer:
Collaboration diagram for CEGUI::OgreGeometryBuffer:Classes | |
| struct | OgreVertex |
| vertex structure used internally and also by Ogre. More... | |
Public Member Functions | |
| OgreGeometryBuffer (OgreRenderer &owner, Ogre::RenderSystem &rs) | |
| Constructor. | |
| virtual | ~OgreGeometryBuffer () |
| Destructor. | |
| const Ogre::Matrix4 & | getMatrix () const |
| return the transformation matrix used for this buffer. | |
| 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. | |
| void | setRotation (const Vector3 &r) |
| Set the rotations to be applied to the geometry in the buffer when it is subsequently rendered. | |
| void | setPivot (const Vector3 &p) |
| Set the pivot point to be used when applying the rotations. | |
| void | setClippingRegion (const Rect ®ion) |
| Set the clipping region to be used when rendering this buffer. | |
| void | appendVertex (const Vertex &vertex) |
| Append a single vertex to the buffer. | |
| void | appendGeometry (const Vertex *const vbuff, uint vertex_count) |
| Append a number of vertices from an array to the GeometryBuffer. | |
| void | setActiveTexture (Texture *texture) |
| Set the active texture to be used with all subsequently added vertices. | |
| void | reset () |
| Clear all buffered data and reset the GeometryBuffer to the default state. | |
| Texture * | getActiveTexture () const |
| Return a pointer to the currently active Texture object. This may return 0 if no texture is set. | |
| uint | getVertexCount () const |
| Return the total number of vertices currently held by this GeometryBuffer object. | |
| uint | getBatchCount () const |
| Return the number of batches of geometry that this GeometryBuffer has split the vertices into. | |
| void | setRenderEffect (RenderEffect *effect) |
| Set the RenderEffect to be used by this GeometryBuffer. | |
| RenderEffect * | getRenderEffect () |
| Return the RenderEffect object that is assigned to this GeometryBuffer or 0 if none. | |
Protected Types | |
|
typedef std::pair < Ogre::TexturePtr, uint > | BatchInfo |
| type to track info for per-texture sub batches of geometry | |
| typedef std::vector< BatchInfo > | BatchList |
| type of container that tracks BatchInfos. | |
| typedef std::vector< OgreVertex > | VertexList |
| type of container used to queue the geometry | |
Protected Member Functions | |
| Ogre::RGBA | colourToOgre (const colour &col) const |
| convert CEGUI::colour into something Ogre can use | |
| void | updateMatrix () const |
| update cached matrix | |
| void | syncHardwareBuffer () const |
| Synchronise data in the hardware buffer with what's been added. | |
| void | initialiseTextureStates () const |
| set up texture related states | |
Protected Attributes | |
| OgreRenderer & | d_owner |
| Renderer object that owns this GeometryBuffer. | |
| Ogre::RenderSystem & | d_renderSystem |
| Ogre render system we're to use. | |
| OgreTexture * | d_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 | |
| RenderEffect * | d_effect |
| RenderEffect that will be used by the GeometryBuffer. | |
| Vector2 | d_texelOffset |
| offset to be applied to all geometry | |
| Ogre::Matrix4 | d_matrix |
| model matrix cache | |
| bool | d_matrixValid |
| true when d_matrix is valid and up to date | |
| Ogre::RenderOperation | d_renderOp |
| Render operation for this buffer. | |
| Ogre::HardwareVertexBufferSharedPtr | d_hwBuffer |
| H/W buffer where the vertices are rendered from. | |
| bool | d_sync |
| whether the h/w buffer is in sync with the added geometry | |
| BatchList | d_batches |
| list of texture batches added to the geometry buffer | |
| VertexList | d_vertices |
| container where added geometry is stored. | |
Implementation of CEGUI::GeometryBuffer for the Ogre engine.
| void CEGUI::OgreGeometryBuffer::appendGeometry | ( | const Vertex *const | vbuff, |
| uint | vertex_count | ||
| ) | [virtual] |
Append a number of vertices from an array to the GeometryBuffer.
| 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. |
Implements CEGUI::GeometryBuffer.
| void CEGUI::OgreGeometryBuffer::appendVertex | ( | const Vertex & | vertex | ) | [virtual] |
Append a single vertex to the buffer.
| vertex | Vertex object describing the vertex to be added to the GeometryBuffer. |
Implements CEGUI::GeometryBuffer.
| Texture* CEGUI::OgreGeometryBuffer::getActiveTexture | ( | ) | const [virtual] |
Return a pointer to the currently active Texture object. This may return 0 if no texture is set.
Implements CEGUI::GeometryBuffer.
| uint CEGUI::OgreGeometryBuffer::getBatchCount | ( | ) | const [virtual] |
Return the number of batches of geometry that this GeometryBuffer has split the vertices into.
Implements CEGUI::GeometryBuffer.
| uint CEGUI::OgreGeometryBuffer::getVertexCount | ( | ) | const [virtual] |
Return the total number of vertices currently held by this GeometryBuffer object.
Implements CEGUI::GeometryBuffer.
| void CEGUI::OgreGeometryBuffer::setActiveTexture | ( | Texture * | texture | ) | [virtual] |
Set the active texture to be used with all subsequently added vertices.
| 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. |
Implements CEGUI::GeometryBuffer.
| void CEGUI::OgreGeometryBuffer::setPivot | ( | const Vector3 & | p | ) | [virtual] |
Set the pivot point to be used when applying the rotations.
| p | Vector3 describing the location of the pivot point to be used when applying the rotation to the geometry. |
Implements CEGUI::GeometryBuffer.
| void CEGUI::OgreGeometryBuffer::setRenderEffect | ( | RenderEffect * | effect | ) | [virtual] |
Set the RenderEffect to be used by this GeometryBuffer.
| effect | Pointer to the RenderEffect to be used during renderng of the GeometryBuffer. May be 0 to remove a previously added RenderEffect. |
Implements CEGUI::GeometryBuffer.
| void CEGUI::OgreGeometryBuffer::setRotation | ( | const Vector3 & | r | ) | [virtual] |
Set the rotations to be applied to the geometry in the buffer when it is subsequently rendered.
| r | Vector3 describing the rotation factors to be used. |
Implements CEGUI::GeometryBuffer.
| void CEGUI::OgreGeometryBuffer::setTranslation | ( | const Vector3 & | v | ) | [virtual] |
Set the translation to be applied to the geometry in the buffer when it is subsequently rendered.
| v | Vector3 describing the three axis translation vector to be used. |
Implements CEGUI::GeometryBuffer.
1.7.4