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

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