Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world_entities/primitive.h @ 3613

Last change on this file since 3613 was 3612, checked in by patrick, 19 years ago

orxonox/trunk: implemented a primitive class, it is able to render cubes, spheres, cylinders and disks. yet not so mutch customizeable.

File size: 691 bytes
Line 
1#ifndef _PRIMITIVE_H
2#define _PRIMITIVE_H
3
4#include "world_entity.h"
5#include "glincl.h"
6
7typedef enum pForm {P_SPHERE = 0, P_CUBE, P_CYLINDER, P_DISK};
8
9class Material;
10
11class Primitive : public WorldEntity
12{
13  friend class World;
14
15 public:
16  Primitive (pForm form);
17  virtual ~Primitive ();
18
19  virtual void tick (float time);
20  virtual void hit (WorldEntity* weapon, Vector* loc);
21  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
22
23  virtual void draw ();
24  void glDrawCube();
25
26
27 private:
28  GLUquadricObj *object; //!< the object to be rendered
29  Material *material;    //!< A Material for the SkySphere.
30  pForm form;
31
32};
33
34#endif /* _PRIMITIVE_H */
Note: See TracBrowser for help on using the repository browser.