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

Revision 3114, 1.2 KB checked in by mattausch, 16 years ago (diff)

worked on dynamic objects: now ook, but have to work on render queue

Line 
1#ifndef __SHAPE_H
2#define __SHAPE_H
3
4#include "common.h"
5#include "Vector3.h"
6
7
8namespace CHCDemoEngine
9{
10
11
12class Material;
13class Geometry;
14class RenderState;
15class AxisAlignedBox3;
16class Vector3;
17
18struct RenderQueueBucket;
19
20
21/** Class representing a 3D shape consisting
22        of geometry (with texture coordinates, normals) and a material
23*/
24class Shape
25{
26        friend class RenderQueue;
27
28public:
29        /** Creates a scene entity.
30        */
31        Shape(Geometry *geometry, Material *mat);
32
33        ~Shape();
34        /** Renders this node.
35        */
36        void Render(RenderState *state, SceneEntity *ent = NULL);       
37        /** Set pointer to the geometry
38        */
39        void SetGeometry(Geometry *geom);
40        /** See set
41        */
42        inline Geometry *GetGeometry() const { return mGeometry; }
43        /** Set pointer to the material
44        */
45        void SetMaterial(Material *mat);
46        /** Returns the transformed bounding box.
47        */
48        AxisAlignedBox3 GetBoundingBox() const;
49        /** Returns material of this shape.
50        */
51        inline Material *GetMaterial() const  { return mMaterial; }
52        /** Returns center point of this shape.
53        */
54        Vector3 GetCenter() const;
55
56
57protected:
58
59        Vector3 mCenter;
60
61        Geometry *mGeometry;
62        Material *mMaterial;
63};
64
65}
66
67#endif // __SCENEENTITY_H
Note: See TracBrowser for help on using the repository browser.