Rev | Line | |
---|
[3245] | 1 | /*! |
---|
[3658] | 2 | \file primitive_model.h |
---|
| 3 | \brief a Class to handle different simple models like planes cubes spheres and so on. |
---|
| 4 | (cube is also an option of Model, but is extended here. |
---|
[3245] | 5 | */ |
---|
[1853] | 6 | |
---|
[3657] | 7 | #ifndef _PRIMITIVE_MODEL_H |
---|
| 8 | #define _PRIMITIVE_MODEL_H |
---|
[1853] | 9 | |
---|
[3657] | 10 | #include "model.h" |
---|
[1853] | 11 | |
---|
[3657] | 12 | //! Specification of different primitives the Model knows |
---|
[4468] | 13 | enum PRIMITIVE { PRIM_CUBE, |
---|
| 14 | PRIM_SPHERE, |
---|
| 15 | PRIM_PLANE, |
---|
| 16 | PRIM_CYLINDER, |
---|
| 17 | PRIM_CONE }; |
---|
[3657] | 18 | |
---|
| 19 | //! A Class to create some default Models |
---|
| 20 | class PrimitiveModel : public Model { |
---|
[3543] | 21 | |
---|
[1904] | 22 | public: |
---|
[3657] | 23 | PrimitiveModel(PRIMITIVE type, float size = 1.0, unsigned int detail = 10); |
---|
| 24 | virtual ~PrimitiveModel(); |
---|
[3245] | 25 | |
---|
[3657] | 26 | protected: |
---|
| 27 | void sphereModel(float size = 1.0, unsigned int detail = 10); |
---|
| 28 | void cylinderModel(float size = 1.0, unsigned int detail = 10); |
---|
| 29 | void coneModel(float size = 1.0, unsigned int detail = 10); |
---|
| 30 | void planeModel(float size = 1.0, unsigned int detail = 1); |
---|
[1853] | 31 | }; |
---|
| 32 | |
---|
[3657] | 33 | #endif /* _PRIMITIVE_MODEL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.