Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 27, 2005, 12:22:09 AM (19 years ago)
Author:
bensch
Message:

orxonox.trunk: importer now with subclass PrimitiveModel, taht supports working CONE/CUBE/PLANE/SPHERE/CYLINDER

File:
1 copied

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/importer/primitive_model.h

    r3655 r3657  
    11/*!
    2     \file proto_class.h
    3     \brief Definition of the proto class template, used quickly start work
    4     \todo Example: this shows how to use simply add a Marker that here has to be done something.
     2    \file primitive_model.h
    53
    6     The Protoclass exists, to help you quikly getting the run for how to develop in orxonox.
    7     It is an example for the CODING-CONVENTION, and a starting-point for every class.
    84*/
    95
    10 #ifndef _PROTO_CLASS_H
    11 #define _PROTO_CLASS_H
     6#ifndef _PRIMITIVE_MODEL_H
     7#define _PRIMITIVE_MODEL_H
    128
    13 #include "what realy has to be included"
    14 #include "base_object.h"
     9#include "model.h"
     10
     11//! Specification of different primitives the Model knows
     12enum PRIMITIVE {PLANE, CUBE, SPHERE, CYLINDER, CONE};
    1513
    1614// FORWARD DEFINITION \\
    17 class someClassWeNeed;
    1815
    19 
    20 /*class Test;*/ /* forward definition of class Test (without including it here!)*/
    21 
    22 //! A default class that aids you to start creating a new class
    23 /**
    24    here can be some longer description of this class
    25 */
    26 class ProtoClass : public BaseObject {
     16//! A Class to create some default Models
     17class PrimitiveModel : public Model {
    2718
    2819 public:
    29   ProtoClass();
    30   virtual ~ProtoClass();
     20  PrimitiveModel();
     21  PrimitiveModel(PRIMITIVE type, float size = 1.0, unsigned int detail = 10);
    3122
    32   bool doNonSense (int nothing);
     23  virtual ~PrimitiveModel();
    3324
    34  private:
    35   int nonSense;  //!< doxygen tag here like this for all the variables - delete this variable if you use this
    36 
     25 protected:
     26  void cubeModel(void);
     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);
    3731};
    3832
    39 #endif /* _PROTO_CLASS_H */
     33#endif /* _PRIMITIVE_MODEL_H */
Note: See TracChangeset for help on using the changeset viewer.