source: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Shape.h @ 2840

Revision 2840, 1.1 KB checked in by mattausch, 16 years ago (diff)
Line 
1#ifndef __SHAPE_H
2#define __SHAPE_H
3
4#include "glInterface.h"
5#include <Cg/cg.h>
6#include <Cg/cgGL.h>
7#include "common.h"
8
9
10namespace CHCDemoEngine
11{
12
13
14
15class Material;
16class Geometry;
17class RenderState;
18struct RenderQueueBucket;
19
20/** Class representing a shape.
21    A shape basically consists of geometry and a material
22*/
23class Shape
24{
25        friend class RenderQueue;
26
27public:
28        /** Creates a scene entity.
29        */
30        Shape(Geometry *geometry, Material *mat, SceneEntity *parent);
31
32        ~Shape();
33        /** Renders this node.
34        */
35        void Render(RenderState *state);       
36        /** Set pointer to the geometry
37        */
38        void SetGeometry(Geometry *geom);
39        /** See set
40        */
41        Geometry *GetGeometry() const { return mGeometry; }
42        /** Set pointer to the material
43        */
44        void SetMaterial(Material *mat);
45       
46        inline Material *GetMaterial() const  { return mMaterial; }
47
48protected:
49
50        Geometry *mGeometry;
51        Material *mMaterial;
52        SceneEntity *mParent;
53
54        /// pointer to the renderqueue bucket this entity belongs to
55        RenderQueueBucket *mRenderQueueBucket;
56};
57
58}
59
60#endif // __SCENEENTITY_H
Note: See TracBrowser for help on using the repository browser.