Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4838 in orxonox.OLD for orxonox/trunk/src/proto


Ignore:
Timestamp:
Jul 12, 2005, 12:09:04 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Element2D added → will be moved to lib/graphics afterwards
ProtoClass update
EventListeners do not have to be unsubscribed externally, but still one listener won't unsubscribe

Location:
orxonox/trunk/src/proto
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/proto/proto_class.cc

    r4744 r4838  
    2222
    2323/**
    24    \brief standard constructor
    25    \todo this constructor is not jet implemented - do it
     24 * standard constructor
     25 * @todo this constructor is not jet implemented - do it
    2626*/
    2727ProtoClass::ProtoClass ()
     
    4343
    4444/**
    45    \brief standard deconstructor
    46 
     45 * standard deconstructor
    4746*/
    4847ProtoClass::~ProtoClass ()
  • orxonox/trunk/src/proto/proto_class.h

    r3955 r4838  
    1 /*!
    2     \file proto_class.h
    3     \brief Definition of ...
    4 
     1/*!
     2 * @file proto_class.h
     3 * @brief Definition of ...
    54*/
    65
     
    109#include "base_object.h"
    1110
    12 // FORWARD DEFINITION
     11// FORWARD DECLARATION
    1312
    1413
  • orxonox/trunk/src/proto/proto_singleton.cc

    r4744 r4838  
    2222
    2323/**
    24    \brief standard constructor
    25 */
     24 * standard constructor
     25 */
    2626ProtoSingleton::ProtoSingleton ()
    2727{
     
    4242
    4343/**
    44    \brief the singleton reference to this class
    45 */
     44 * the singleton reference to this class
     45 */
    4646ProtoSingleton* ProtoSingleton::singletonRef = NULL;
    4747
    4848/**
    49    \brief standard deconstructor
    50 
    51 */
     49   @brief standard deconstructor
     50 */
    5251ProtoSingleton::~ProtoSingleton ()
    5352{
    5453  ProtoSingleton::singletonRef = NULL;
    55 
    5654}
  • orxonox/trunk/src/proto/proto_singleton.h

    r4519 r4838  
    1 /*!
    2     \file proto_singleton.h
    3     \brief Definition of the ... singleton Class
    4    
     1/*!
     2 * @file proto_singleton.h
     3 * @brief Definition of the ... singleton Class
    54*/
    65
     
    1716 public:
    1817  virtual ~ProtoSingleton(void);
    19   /** \returns a Pointer to the only object of this Class */
     18  /** @returns a Pointer to the only object of this Class */
    2019  inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton();  return singletonRef; };
    2120
  • orxonox/trunk/src/proto/proto_world_entity.cc

    r4483 r4838  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    2222using namespace std;
    2323
    24 /**
    25    \brief standard constructor
    26 
    27 */
    28 ProtoWorldEntity::ProtoWorldEntity ()
    29 {
    30   this->init();
    31 }
    3224
    3325/**
    34    \brief constructs and loads a ProtoWorldEntity from a XML-element
    35    \param root the XML-element to load from
    36 */
     26 * constructs and loads a ProtoWorldEntity from a XML-element
     27 * @param root the XML-element to load from
     28 */
    3729ProtoWorldEntity::ProtoWorldEntity(const TiXmlElement* root)
    3830{
    3931  this->init();
    40   this->loadParams(root);
     32  if (root != NULL)
     33    this->loadParams(root);
    4134}
    4235
    4336
    4437/**
    45    \brief standard deconstructor
    46 */
    47 ProtoWorldEntity::~ProtoWorldEntity () 
     38 * standard deconstructor
     39 */
     40ProtoWorldEntity::~ProtoWorldEntity ()
    4841{
    4942
     
    5144
    5245/**
    53    \brief initializes the ProtoWorldEntity
    54 */
     46 * initializes the ProtoWorldEntity
     47 * @todo change this to what you wish
     48 */
    5549void ProtoWorldEntity::init(void)
    5650{
     51  this->setClassID(CL_PROTO_WORLD_ENTITY, )
    5752  ...
    5853}
    5954
    6055/**
    61    \brief loads a ProtoWorldEntity from a XML-element
    62    \param root the XML-element to load from
    63 */
     56 * loads a ProtoWorldEntity from a XML-element
     57 * @param root the XML-element to load from
     58 * @todo make the class Loadable
     59 */
    6460void ProtoWorldEntity::loadParams(const TiXmlElement* root)
    6561{
     62  // all the clases this Entity is directly derived from must be called in this way, to load all settings.
    6663  static_cast<WorldEntity*>(this)->loadParam(root);
    6764
     
    7168
    7269/**
    73    \brief advances the ProtoWorldEntity about time seconds
    74    \param time the Time to step
    75 */
     70 * advances the ProtoWorldEntity about time seconds
     71 * @param time the Time to step
     72 */
    7673ProtoWorldEntity::tick(float time)
    7774{
     
    8077
    8178/**
    82    \brief draws this worldEntity
    83 */
     79 * draws this worldEntity
     80 */
    8481void ProtoWorldEntity::draw ()
    85 { 
     82{
    8683  glMatrixMode(GL_MODELVIEW);
    8784  glPushMatrix();
    8885  float matrix[4][4];
    89  
     86
    9087  /* translate */
    91   glTranslatef (this->getAbsCoor ().x, 
    92                 this->getAbsCoor ().y,
    93                 this->getAbsCoor ().z);
     88  glTranslatef (this->getAbsCoor ().x,
     89                this->getAbsCoor ().y,
     90                this->getAbsCoor ().z);
    9491  /* rotate */
    9592  this->getAbsDir().matrix(matrix);
  • orxonox/trunk/src/proto/proto_world_entity.h

    r4483 r4838  
    1 /*!
    2     \file proto_world_entity.h
    3 
    4     description
     1/*!
     2 * @file proto_world_entity.h
     3 * @brief description
    54*/
    65
     
    1110
    1211//! A Class to ...
    13 class ProtoWorldEntity : public WorldEntity 
     12class ProtoWorldEntity : public WorldEntity
    1413{
    1514
    1615 public:
    17   ProtoWorldEntity();
    18   ProtoWorldEntity(const TiXmlElement* root);
     16  ProtoWorldEntity(const TiXmlElement* root = NULL);
    1917  virtual ~ProtoWorldEntity();
    20  
     18
    2119  void loadParams(const TiXmlElement* root);
    2220  void init();
    23  
     21
    2422  virtual void draw();
    2523  virtual void tick(float time);
Note: See TracChangeset for help on using the changeset viewer.