Crazy Eddie's GUI System  0.8.5
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
35 namespace CEGUI
36 {
42 class CEGUIEXPORT GeometryBuffer :
43  public AllocatedObject<GeometryBuffer>
44 {
45 public:
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 
182  virtual void setRenderEffect(RenderEffect* effect) = 0;
183 
189  virtual RenderEffect* getRenderEffect() = 0;
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 
241 protected:
243  GeometryBuffer();
244 
247 };
248 
249 } // End of CEGUI namespace section
250 
251 #endif // end of guard _CEGUIGeometryBuffer_h_
Interface for objects that hook into RenderingWindow to affect the rendering process, thus allowing various effects to be achieved.
Definition: RenderEffect.h:40
Definition: MemoryAllocatedObject.h:109
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
structure that is used to hold details of a single vertex in 3D space.
Definition: Vertex.h:40
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: GeometryBuffer.h:42
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:52
BlendMode
Enumerated type that contains the valid options that specify the type of blending that is to be perfo...
Definition: Renderer.h:61
BlendMode d_blendMode
The BlendMode to use when rendering this GeometryBuffer.
Definition: GeometryBuffer.h:246
Class to represent rotation, avoids Gimbal lock.
Definition: Quaternion.h:67