Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: removed compiler warning for primitive

File size: 907 bytes
RevLine 
[3524]1#ifndef _PRIMITIVE_H
2#define _PRIMITIVE_H
3
4#include "world_entity.h"
[3608]5#include "glincl.h"
[3524]6
[3612]7typedef enum pForm {P_SPHERE = 0, P_CUBE, P_CYLINDER, P_DISK};
[3524]8
[3608]9class Material;
10
[3524]11class Primitive : public WorldEntity
12{
13  friend class World;
14
15 public:
[3612]16  Primitive (pForm form);
[3531]17  virtual ~Primitive ();
18
[3614]19  void setForm(pForm form);
20  void setSize(float size);
[3615]21  void setSegments(int segments);
[3614]22  void setMaterial(Material* material);
23  void setTexture(char* name);
24 
25
[3524]26  virtual void tick (float time);
[3578]27  virtual void hit (WorldEntity* weapon, Vector* loc);
[3524]28  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
29  virtual void draw ();
30
[3612]31
[3614]32
[3586]33 private:
[3614]34  GLUquadricObj* object; //!< the object to be rendered
35  Material* material;    //!< A Material for the SkySphere.
[3612]36  pForm form;
[3614]37  char* textureName;
38  float size;
[3616]39  int segments;
[3586]40
[3614]41  void glDrawCube();
[3524]42};
43
44#endif /* _PRIMITIVE_H */
Note: See TracBrowser for help on using the repository browser.