Crazy Eddie's GUI System 0.8.7
Loading...
Searching...
No Matches
GeometryBuffer.h
1/***********************************************************************
2 created: Thu Jan 8 2009
3 author: Paul D Turner
4*************************************************************************/
5/***************************************************************************
6 * Copyright (C) 2004 - 2010 Paul D Turner & The CEGUI Development Team
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining
9 * a copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sublicense, and/or sell copies of the Software, and to
13 * permit persons to whom the Software is furnished to do so, subject to
14 * the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be
17 * included in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 ***************************************************************************/
27#ifndef _CEGUIGeometryBuffer_h_
28#define _CEGUIGeometryBuffer_h_
29
30#include "CEGUI/Base.h"
31#include "CEGUI/Renderer.h"
32#include "CEGUI/Rect.h"
33
34// Start of CEGUI namespace section
35namespace CEGUI
36{
42class CEGUIEXPORT GeometryBuffer :
43 public AllocatedObject<GeometryBuffer>
44{
45public:
47 virtual ~GeometryBuffer();
48
53 virtual void draw() const = 0;
54
63 virtual void setTranslation(const Vector3f& v) = 0;
64
73 virtual void setRotation(const Quaternion& r) = 0;
74
83 virtual void setPivot(const Vector3f& p) = 0;
84
89 virtual void setClippingRegion(const Rectf& region) = 0;
90
98 virtual void appendVertex(const Vertex& vertex) = 0;
99
112 virtual void appendGeometry(const Vertex* const vbuff, uint vertex_count)=0;
113
123 virtual void setActiveTexture(Texture* texture) = 0;
124
130 virtual void reset() = 0;
131
141 virtual Texture* getActiveTexture() const = 0;
142
151 virtual uint getVertexCount() const = 0;
152
166 virtual uint getBatchCount() const = 0;
167
183
190
203 virtual void setBlendMode(const BlendMode mode);
204
214 virtual BlendMode getBlendMode() const;
215
226 virtual void setClippingActive(const bool active) = 0;
227
228 /*
229 \brief
230 Return whether clipping will be used for the current batch
231 of vertices being defined.
232
233 \return
234 - true if vertices subsequently added to the GeometryBuffer will
235 be clipped to the clipping region defined for this GeometryBuffer.
236 - false if vertices subsequently added will not be clippled (other than
237 to the edges of the rendering target).
238 */
239 virtual bool isClippingActive() const = 0;
240
241protected:
244
247};
248
249} // End of CEGUI namespace section
250
251#endif // end of guard _CEGUIGeometryBuffer_h_
Definition MemoryAllocatedObject.h:110
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition GeometryBuffer.h:44
virtual void setClippingActive(const bool active)=0
Set whether clipping will be active for subsequently added vertices.
virtual void setBlendMode(const BlendMode mode)
Set the blend mode option to use when rendering this GeometryBuffer.
virtual void setRenderEffect(RenderEffect *effect)=0
Set the RenderEffect to be used by this GeometryBuffer.
virtual void appendGeometry(const Vertex *const vbuff, uint vertex_count)=0
Append a number of vertices from an array to the GeometryBuffer.
virtual BlendMode getBlendMode() const
Return the blend mode that is set to be used for this GeometryBuffer.
virtual void draw() const =0
Draw the geometry buffered within this GeometryBuffer object.
virtual uint getVertexCount() const =0
Return the total number of vertices currently held by this GeometryBuffer object.
virtual Texture * getActiveTexture() const =0
Return a pointer to the currently active Texture object. This may return 0 if no texture is set.
virtual void setClippingRegion(const Rectf &region)=0
Set the clipping region to be used when rendering this buffer.
virtual ~GeometryBuffer()
Destructor.
virtual uint getBatchCount() const =0
Return the number of batches of geometry that this GeometryBuffer has split the vertices into.
virtual void setRotation(const Quaternion &r)=0
Set the rotations to be applied to the geometry in the buffer when it is subsequently rendered.
GeometryBuffer()
Constructor.
virtual RenderEffect * getRenderEffect()=0
Return the RenderEffect object that is assigned to this GeometryBuffer or 0 if none.
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 void setTranslation(const Vector3f &v)=0
Set the translation to be applied to the geometry in the buffer when it is subsequently rendered.
virtual void appendVertex(const Vertex &vertex)=0
Append a single vertex to the buffer.
BlendMode d_blendMode
The BlendMode to use when rendering this GeometryBuffer.
Definition GeometryBuffer.h:246
virtual void setPivot(const Vector3f &p)=0
Set the pivot point to be used when applying the rotations.
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
base class for properties able to do native set/get
Definition TypedProperty.h:50
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
structure that is used to hold details of a single vertex in 3D space.
Definition Vertex.h:42