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