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 |
|
---|
10 | namespace CHCDemoEngine
|
---|
11 | {
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 | class Material;
|
---|
16 | class Geometry;
|
---|
17 | class RenderState;
|
---|
18 | struct RenderQueueBucket;
|
---|
19 |
|
---|
20 | /** Class representing a shape.
|
---|
21 | A shape basically consists of geometry and a material
|
---|
22 | */
|
---|
23 | class Shape
|
---|
24 | {
|
---|
25 | friend class RenderQueue;
|
---|
26 |
|
---|
27 | public:
|
---|
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 |
|
---|
48 | protected:
|
---|
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.