Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4448 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Jun 1, 2005, 10:55:53 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: doxygen-tags, and cleanup of NullParent

Location:
orxonox/trunk/src/lib/coord
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/coord/helper_parent.cc

    r4320 r4448  
    2525/**
    2626   \brief standard constructor
    27 
    28    \todo this constructor is not jet implemented - do it
    2927*/
    3028HelperParent::HelperParent ()
     
    3634/**
    3735   \brief standard deconstructor
    38 
    39    \todo this deconstructor is not jet implemented - do it
    4036*/
    4137HelperParent::~HelperParent ()
  • orxonox/trunk/src/lib/coord/helper_parent.h

    r3607 r4448  
    1212
    1313
    14 
     14//! The HelperParent is a PNode that acts as a Helper.
    1515class HelperParent : public PNode {
    1616
  • orxonox/trunk/src/lib/coord/null_parent.cc

    r4444 r4448  
    2424NullParent* NullParent::singletonRef = 0;
    2525
     26/**
     27   \returns the Reference to the NullParent
     28*/
    2629NullParent* NullParent::getInstance ()
    2730{
     
    3134}
    3235
     36/**
     37   \brief creates the one and only NullParent
     38   \param absCoordinate the cordinate of the Parent (normally Vector(0,0,0))
     39*/
    3340NullParent::NullParent (const Vector& absCoordinate) : PNode (absCoordinate, NULL)
    3441{
     42  this->setClassID(CL_NULL_PARENT, "NullParent");
    3543  this->setName("NullParent");
    36   this->setClassID(CL_NULL_PARENT, "NullParent");
     44
     45  this->setParentMode(PNODE_ALL);
    3746  NullParent::singletonRef = this;
    38   this->setParentMode(PNODE_ALL);
    3947}
    4048
     
    4250/**
    4351   \brief standard deconstructor
    44 
    45    \todo this deconstructor is not jet implemented - do it
    4652*/
    4753NullParent::~NullParent ()
    4854{
    4955  //delete singletonRef;
    50   singletonRef = NULL;
     56  NullParent::singletonRef = NULL;
    5157}
  • orxonox/trunk/src/lib/coord/null_parent.h

    r4441 r4448  
    11/*!
    2     \file proto_class.h
    3     \brief Definition of the proto class template, used quickly start work
     2    \file null_parent.h
     3    \brief Definition of the NullParent, the higest PNode of them all.
    44*/
    55
     
    88#define _NULL_PARENT_H
    99
    10 
    1110#include "p_node.h"
    1211
    13 
     12//! The top joint of all PNode's every PNode is somehow connected to this one.
    1413class NullParent : public PNode {
    1514
     
    1817  virtual ~NullParent ();
    1918
     19 private:
     20  NullParent (const Vector& absCoordinate = Vector());
    2021
    2122 private:
    22   NullParent (const Vector& absCoordinate = Vector());
    23   static NullParent* singletonRef;
     23  static NullParent* singletonRef;        //!< A reference to the NullParent
    2424
    2525};
  • orxonox/trunk/src/lib/coord/p_node.cc

    r4444 r4448  
    3939/**
    4040   \brief standard constructor
    41 
    42    \todo this constructor is not jet implemented - do it
    4341*/
    4442PNode::PNode ()
     
    4947}
    5048
     49/**
     50   \param root the load-Element for the PNode
     51*/
    5152PNode::PNode(const TiXmlElement* root)
    5253{
     
    9495}
    9596
     97/**
     98   \brief initializes a PNode
     99   \param parent the parent for this PNode
     100*/
    96101void PNode::init(PNode* parent)
    97102{
     
    104109}
    105110
     111/**
     112   \brief loads parameters of the PNode
     113   \param root the XML-element to load the properties of
     114*/
    106115void PNode::loadParams(const TiXmlElement* root)
    107116{
    108117  static_cast<BaseObject*>(this)->loadParams(root);
    109118}
    110 
    111 /**
    112    \brief get relative coordinates
    113    \returns relative coordinates to its parent
    114    
    115    the reference that is returned is a pointer to the real relCoor, so don't
    116    change it unless you realy know what you are doing.
    117 */
    118 //Vector* PNode::getRelCoor () const
    119 
    120 
    121119
    122120/**
     
    128126   has changed and won't update the children Nodes.
    129127*/
    130 /*
    131 void PNode::setRelCoor (Vector* relCoord)
    132 {
    133   this->bRelCoorChanged = true;
    134   *this->relCoordinate = *relCoord;
    135 }
    136 */
    137 
    138 
    139 /**
    140    \brief set relative coordinates
    141    \param relCoord relative coordinates to its parent
    142 
    143    it is very importand, that you use this function, if you want to update the
    144    relCoordinates. If you don't use this, the PNode won't recognize, that something
    145    has changed and won't update the children Nodes.
    146 */
    147128void PNode::setRelCoor (const Vector& relCoord)
    148129{
     
    150131  this->relCoordinate = relCoord;
    151132}
    152 
    153 
    154 /**
    155    \brief get absolute coordinates
    156    \returns absolute coordinates from (0,0,0)
    157 */
    158 //Vector PNode::getAbsCoor () const
    159 
    160 
    161 
    162 
    163133
    164134/**
     
    175145}
    176146
    177 
    178147/**
    179148   \brief shift coordinate (abs and rel)
    180    \param shift vector
     149   \param shift shift vector
    181150
    182151   this function shifts the current coordinates about the vector shift. this is
     
    210179}
    211180
    212 
    213 
    214 /**
    215    \brief get relative direction
    216    \returns relative direction to its parent
    217 */
    218 //Quaternion* PNode::getRelDir () const
    219 
    220 
    221 
    222181/**
    223182   \brief set relative direction
     
    234193}
    235194
    236 
    237 /**
    238    \brief gets the absolute direction (0,0,1)
    239    \returns absolute coordinates
    240 */
    241 //Quaternion PNode::getAbsDir () const
    242 
    243 
    244 
    245195/**
    246196   \brief sets the absolute direction (0,0,1)
     
    256206  this->absDirection = absDir;
    257207}
    258 
    259 
    260208
    261209/**
     
    289237   \brief adds a child and makes this node to a parent
    290238   \param pNode child reference
    291    \param mode on which changes the child should also change ist state
     239   \param parentMode on which changes the child should also change ist state
    292240
    293241   use this to add a child to this node.
     
    304252  this->children->add(pNode);
    305253}
    306 
    307254
    308255/**
     
    354301/**
    355302   \brief set the mode of this parent manualy
    356    \param mode the mode of the bind-type.
     303   \param parentMode the mode of the bind-type.
    357304*/
    358305void PNode::setParentMode (unsigned int parentMode)
     
    375322*/
    376323
    377 
    378 /**
    379    \brief has to be called, if the parent direction has changed
    380    
    381    normaly this will be done by the parent itself automaticaly. If you call this, you
    382    will force an update of the direction of the node.
    383 */
    384 /*
    385 void PNode::parentDirChanged ()
    386 {
    387   this->bRelDirChanged = true;
    388 }
    389 */
    390 
    391 
    392324/**
    393325   \brief updates the absCoordinate/absDirection
    394    \param timeStamp The timestanp used for to look if calculations should be done
     326   \param dt The time passed since the last update
    395327
    396328   this is used to go through the parent-tree to update all the absolute coordinates
     
    512444}
    513445
    514 
    515 /**
    516   \brief tick
    517   \param dt time to tick
    518 */
    519 void PNode::processTick (float dt)
    520 {
    521   //this->tick (dt);
    522   /*
    523   PNode* pn = this->children->enumerate();
    524   while( pn != NULL)
    525     {
    526       pn->processTick (dt);
    527       pn = this->children->nextElement();
    528     }
    529   */
    530 }
    531 
    532 
    533446/**
    534447   \brief displays some information about this pNode
  • orxonox/trunk/src/lib/coord/p_node.h

    r4444 r4448  
    6161  inline const Vector& getRelCoor () const { return this->relCoordinate; };
    6262  void setAbsCoor (const Vector& absCoord);
    63   /** \retuns the absolute position */
     63  /** \returns the absolute position */
    6464  inline const Vector& getAbsCoor () const { return this->absCoordinate; };
    6565  void shiftCoor (const Vector& shift);
     
    8989  void setParent (PNode* parent);
    9090  void setParentMode (unsigned int parentingMode);
     91  /** \returns the Parenting mode of this node */
    9192  int getParentMode() const { return this->parentMode; };
    9293
    9394  void update (float dt);
    94   void processTick (float dt);
    9595
    9696  void debug ();
     
    9999 private:
    100100  void init(PNode* parent);
     101  /** \brief tells the child that the parent's Coordinate has changed */
    101102  inline void parentCoorChanged () { this->bRelCoorChanged = true; }
     103  /** \brief tells the child that the parent's Direction has changed */
    102104  inline void parentDirChanged () { this->bRelDirChanged = true; }
    103105  /** \returns the last calculated coordinate */
  • orxonox/trunk/src/lib/coord/pilot_node.cc

    r4443 r4448  
    1414   main-programmer: Patrick Boenzli
    1515   co-programmer: ...
     16
     17   bensch: added comments
    1618*/
    1719
     
    2325using namespace std;
    2426
    25 
    2627/**
    2728   \brief standard constructor
    28 
    29    \todo this constructor is not jet implemented - do it
    3029*/
    3130PilotNode::PilotNode ()
     
    3837}
    3938
    40 
    4139/**
    4240   \brief standard deconstructor
    43 
    44    \todo this deconstructor is not jet implemented - do it
    4541*/
    4642PilotNode::~PilotNode ()
     
    4945}
    5046
    51 
     47/**
     48    \brief ticks the node
     49    \param time the time about whitch to tick                                           \
     50*/
    5251void PilotNode::tick(float time)
    5352{
     
    9796}
    9897
    99 
     98/**
     99   \brief handles events
     100   \param event the event that occured
     101*/
    100102void PilotNode::process( const Event &event)
    101103{
  • orxonox/trunk/src/lib/coord/pilot_node.h

    r4443 r4448  
    11/*!
    2     \file helper_parent.h
    3     \brief this is a parent class, that isn't visible in the real world itself
     2    \file pilot_node.h
     3    \brief Definition of a PilotNode
    44*/
    55
     
    1313class Event;
    1414
     15//! The PilotNode is a node that enables the is driven by the Mouse
    1516class PilotNode : public WorldEntity, public EventListener {
    1617
     
    1920  virtual ~PilotNode ();
    2021
    21   void tick(float time);
     22  virtual void tick(float time);
    2223
    23   void process(const Event &event);
     24  virtual void process(const Event &event);
    2425
    2526 private:
     
    2728
    2829 private:
    29   bool bUp;              //!< up button pressed.
    30   bool bDown;            //!< down button pressed.
    31   bool bLeft;            //!< left button pressed.
    32   bool bRight;           //!< right button pressed.
     30  bool        bUp;            //!< up button pressed.
     31  bool        bDown;          //!< down button pressed.
     32  bool        bLeft;          //!< left button pressed.
     33  bool        bRight;         //!< right button pressed.
    3334
    34   int pitch;
    35   int roll;
     35  int         pitch;          //!< the pitch of the node
     36  int         roll;           //!< the roll of the node
    3637
    37   Vector* velocity;       //!< the velocity of the player.
    38   float travelSpeed;     //!< the current speed of the player (to make soft movement)
    39   float acceleration;    //!< the acceleration of the player.
     38  Vector*     velocity;       //!< the velocity of the player.
     39  float       travelSpeed;    //!< the current speed of the player (to make soft movement)
     40  float       acceleration;   //!< the acceleration of the player.
    4041
    4142
Note: See TracChangeset for help on using the changeset viewer.