27#ifndef _CEGUIIrrlichtGeometryBuffer_h_
28#define _CEGUIIrrlichtGeometryBuffer_h_
30#include "CEGUI/RendererModules/Irrlicht/RendererDef.h"
31#include "CEGUI/GeometryBuffer.h"
32#include "CEGUI/Rect.h"
33#include "CEGUI/Vector.h"
39# pragma warning(disable : 4251)
79 bool isClippingActive()
const;
86 void setupClipping()
const;
87 void cleanupClipping()
const;
92 irr::video::ITexture* texture;
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: GeometryBuffer.h:44
GeometryBuffer implementation for the Irrlicht engine.
Definition: RendererModules/Irrlicht/GeometryBuffer.h:49
irr::core::vector3d< irr::f32 > d_translation
translation vector
Definition: RendererModules/Irrlicht/GeometryBuffer.h:108
const float d_texelOffset
an offset applied to geometry to get correct texel to pixel mapping.
Definition: RendererModules/Irrlicht/GeometryBuffer.h:134
void appendGeometry(const Vertex *const vbuff, uint vertex_count)
Append a number of vertices from an array to the GeometryBuffer.
uint getBatchCount() const
Return the number of batches of geometry that this GeometryBuffer has split the vertices into.
void reset()
Clear all buffered data and reset the GeometryBuffer to the default state.
irr::video::SMaterial & getMaterial()
return reference to the Irrlicht material used with this GeometryBuffer.
IrrlichtGeometryBuffer(irr::video::IVideoDriver &driver)
constructor
std::vector< irr::video::S3DVertex > VertexList
type of container used to queue the geometry
Definition: RendererModules/Irrlicht/GeometryBuffer.h:122
void setRotation(const Quaternion &r)
Set the rotations to be applied to the geometry in the buffer when it is subsequently rendered.
void setBlendMode(const BlendMode mode)
Set the blend mode option to use when rendering this GeometryBuffer.
irr::video::SMaterial d_material
material used with the texture for rendering.
Definition: RendererModules/Irrlicht/GeometryBuffer.h:102
BatchList d_batches
list of texture batches added to the geometry buffer
Definition: RendererModules/Irrlicht/GeometryBuffer.h:126
RenderEffect * d_effect
RenderEffect that will be used by the GeometryBuffer.
Definition: RendererModules/Irrlicht/GeometryBuffer.h:114
irr::core::matrix4 d_matrix
model matrix cache
Definition: RendererModules/Irrlicht/GeometryBuffer.h:116
irr::core::vector3d< irr::f32 > d_pivot
pivot point for rotation
Definition: RendererModules/Irrlicht/GeometryBuffer.h:112
RenderEffect * getRenderEffect()
Return the RenderEffect object that is assigned to this GeometryBuffer or 0 if none.
void updateMatrix() const
update cached matrix
const irr::video::SMaterial & getMaterial() const
return reference to the Irrlicht material used with this GeometryBuffer.
void setPivot(const Vector3f &p)
Set the pivot point to be used when applying the rotations.
void draw() const
Draw the geometry buffered within this GeometryBuffer object.
const float d_xViewDir
a coefficient used to handle OpenGL / D3D projection variations.
Definition: RendererModules/Irrlicht/GeometryBuffer.h:132
void setRenderEffect(RenderEffect *effect)
Set the RenderEffect to be used by this GeometryBuffer.
irr::core::rect< irr::s32 > d_savedViewport
viewport that was set prior to us initialising clipping
Definition: RendererModules/Irrlicht/GeometryBuffer.h:136
Rectf d_clipRect
rectangular clip region
Definition: RendererModules/Irrlicht/GeometryBuffer.h:104
void setActiveTexture(Texture *texture)
Set the active texture to be used with all subsequently added vertices.
irr::core::quaternion d_rotation
rotation quaternion
Definition: RendererModules/Irrlicht/GeometryBuffer.h:110
IndexList d_indices
container where added geometry indices are stored.
Definition: RendererModules/Irrlicht/GeometryBuffer.h:130
bool d_clippingActive
whether clipping will be active for the current batch
Definition: RendererModules/Irrlicht/GeometryBuffer.h:106
irr::core::matrix4 d_savedProjection
projection transform that was set priot to us initialising clipping
Definition: RendererModules/Irrlicht/GeometryBuffer.h:138
irr::video::IVideoDriver & d_driver
Irrlicht video driver we're to use.
Definition: RendererModules/Irrlicht/GeometryBuffer.h:98
uint getVertexCount() const
Return the total number of vertices currently held by this GeometryBuffer object.
std::vector< BatchInfo > BatchList
type of container that tracks BatchInfos.
Definition: RendererModules/Irrlicht/GeometryBuffer.h:120
void appendVertex(const Vertex &vertex)
Append a single vertex to the buffer.
void setClippingActive(const bool active)
Set whether clipping will be active for subsequently added vertices.
void setTranslation(const Vector3f &v)
Set the translation to be applied to the geometry in the buffer when it is subsequently rendered.
VertexList d_vertices
container where added geometry vertices are stored.
Definition: RendererModules/Irrlicht/GeometryBuffer.h:128
void setClippingRegion(const Rectf ®ion)
Set the clipping region to be used when rendering this buffer.
bool d_matrixValid
true when d_matrix is valid and up to date
Definition: RendererModules/Irrlicht/GeometryBuffer.h:118
std::vector< irr::u16 > IndexList
type of container used for indexes
Definition: RendererModules/Irrlicht/GeometryBuffer.h:124
IrrlichtTexture * d_activeTexture
Texture that is set as active.
Definition: RendererModules/Irrlicht/GeometryBuffer.h:100
const irr::core::matrix4 & getMatrix() const
return the transformation matrix used for this buffer.
Texture * getActiveTexture() const
Return a pointer to the currently active Texture object. This may return 0 if no texture is set.
Implementation of the CEGUI::Texture class for the Irrlicht engine.
Definition: RendererModules/Irrlicht/Texture.h:50
Class to represent rotation, avoids Gimbal lock.
Definition: Quaternion.h:69
Interface for objects that hook into RenderingWindow to affect the rendering process,...
Definition: RenderEffect.h:42
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:54
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
BlendMode
Enumerated type that contains the valid options that specify the type of blending that is to be perfo...
Definition: Renderer.h:62
type to track info for per-texture sub batches of geometry
Definition: RendererModules/Irrlicht/GeometryBuffer.h:91
structure that is used to hold details of a single vertex in 3D space.
Definition: Vertex.h:42