Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3450 in orxonox.OLD


Ignore:
Timestamp:
Mar 2, 2005, 4:10:19 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: doxygen-tags: player.cc/h p_node.cc/h base_entity.h skysphere.cc/h

Location:
orxonox/trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/base_entity.h

    r3224 r3450  
     1/*!
     2  \file base_entity.h
     3  \brief This includes the default values every entity should have.                                             \
     4*/
    15
    26#ifndef _BASE_ENTITY_H
     
    59#include "stdincl.h"
    610
    7 
     11//! The Base of each entity-Class
    812class BaseEntity {
    913
  • orxonox/trunk/src/p_node.cc

    r3433 r3450  
    4545/**
    4646   \brief constructor with coodinates
     47   \param absCoordinate the Absolute coordinate of the Object
     48   \param parent The parent-node of this node.
    4749*/
    4850PNode::PNode (Vector* absCoordinate, PNode* parent )
     
    111113/**
    112114   \brief set relative coordinates
    113    \param relative coordinates to its parent
     115   \param relCoord relative coordinates to its parent
    114116
    115117   it is very importand, that you use this function, if you want to update the
     
    135137
    136138/**
    137    \brief get relative coordinates
    138    \returns relative coordinates to its parent
     139   \param absCoord set absolute coordinate
    139140
    140141   it is very importand, that you use this function, if you want to update the
     
    196197/**
    197198   \brief set relative direction
    198    \param relative direction to its parent
     199   \param relDir to its parent
    199200
    200201   it is very importand, that you use this function, if you want to update the
     
    221222/**
    222223   \brief sets the absolute direction (0,0,1)
    223    \param absolute coordinates
     224   \param absDir absolute coordinates
    224225
    225226   it is very importand, that you use this function, if you want to update the
     
    253254   yea right... shorter...
    254255
     256   \todo implement this
    255257*/
    256258void PNode::shiftDir (Quaternion* shift)
     
    261263/**
    262264   \brief adds a child and makes this node to a parent
    263    \param child reference
     265   \param pNode child reference
    264266
    265267   use this to add a child to this node.
     
    273275/**
    274276   \brief adds a child and makes this node to a parent
    275    \param child reference
    276    \param on which changes the child should also change ist state
     277   \param pNode child reference
     278   \param mode on which changes the child should also change ist state
    277279
    278280   use this to add a child to this node.
     
    287289
    288290/**
    289    /brief removes a child from the node
     291   \brief removes a child from the node
     292   \param pNode the child to remove from this pNode.
    290293*/
    291294void PNode::removeChild (PNode* pNode)
     
    297300/**
    298301   \brief sets the parent of this PNode
     302   \param parent the Parent to set
    299303*/
    300304void PNode::setParent (PNode* parent)
     
    305309/**
    306310   \brief set the mode of this parent manualy
     311   \param mode the mode of the bind-type.
    307312*/
    308313void PNode::setMode (parentingMode mode)
     
    337342/**
    338343   \brief updates the absCoordinate/absDirection
     344   \param timeStamp The timestanp used for to look if calculations should be done
    339345
    340346   this is used to go through the parent-tree to update all the absolute coordinates
     
    400406
    401407
    402 /*
     408/**
    403409  \brief tick
     410  \param dt time to tick
    404411*/
    405412void PNode::processTick (float dt)
     
    414421}
    415422
    416 
     423/**
     424   \param dt time to tick
     425*/
    417426void PNode::tick (float dt)
    418427{}
    419428
    420 
     429/**
     430   \brief displays some information about this pNode
     431*/
    421432void PNode::debug()
    422433{
     
    428439
    429440
    430 /*
     441/**
    431442  \brief set the name of the node
    432443
     
    439450
    440451
    441 /*
     452/**
    442453  \brief gets the name of the node
    443454*/
  • orxonox/trunk/src/p_node.h

    r3365 r3450  
    2626class PNode; /* forward decleration, so that parentEntry has access to PNode */
    2727
     28//! enumeration for the different translation-binding-types
    2829typedef enum parentingMode {MOVEMENT = 0, ROTATION, ALL};
     30//! The default mode of the translation-binding.
    2931#define DEFAULT_MODE ALL
    3032
     33//! Patent Node is a Engine to calculate the position of an Object in respect to the position of its parent.
    3134class PNode : public BaseObject {
    3235
     
    3841  void destroy ();
    3942
    40   PNode* parent; //! a pointer to the parent node
    41   tList<PNode>* children; //! list of the children
     43  PNode* parent;            //!< a pointer to the parent node
     44  tList<PNode>* children;   //!< list of the children
    4245
    43   parentingMode mode;
     46  parentingMode mode;       //!< the mode of the binding
    4447
    4548  Vector getRelCoor ();
     
    7679  void debug ();
    7780
    78   float timeStamp;   //! this the timeStamp of when the abs{Coordinat, Direction} has been calculated
    79   char* objectName;
    80   bool bAbsCoorChanged;
    81   bool bRelCoorChanged;
    82   bool bRelDirChanged;
    83   bool bAbsDirChanged;
     81  float timeStamp;         //!< this the timeStamp of when the abs{Coordinat, Direction} has been calculated
     82  char* objectName;        //!< The name of the Object
     83  bool bAbsCoorChanged;    //!< If Absolute Coordinate has changed since last time we checked
     84  bool bRelCoorChanged;    //!< If Relative Coordinate has changed since last time we checked
     85  bool bAbsDirChanged;     //!< If Absolute Direction has changed since last time we checked
     86  bool bRelDirChanged;     //!< If Relative Direction has changed since last time we checked
    8487
    85   Vector relCoordinate;  //! coordinates relative to the parent
    86   Vector absCoordinate; //! absolute coordinates in the world ( from (0,0,0) )
    87   Quaternion relDirection; //! direction relative to the parent
    88   Quaternion absDirection; //! absolute direvtion in the world ( from (0,0,1) )
     88  Vector relCoordinate;    //!< coordinates relative to the parent
     89  Vector absCoordinate;    //!< absolute coordinates in the world ( from (0,0,0) )
     90  Quaternion relDirection; //!< direction relative to the parent
     91  Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) )
    8992
    9093};
  • orxonox/trunk/src/player.cc

    r3396 r3450  
    2323using namespace std;
    2424
    25 
     25/**
     26   \brief creates a new Player
     27   \param isFree if the player is free
     28*/
    2629Player::Player(bool isFree) : WorldEntity(isFree)
    2730{
     
    5558}
    5659
     60/**
     61   \brief destructs the player
     62*/
    5763Player::~Player ()
    5864{
     
    6066}
    6167
     68/**
     69   \brief effect that occurs after the player is spawned
     70*/
    6271void Player::postSpawn ()
    6372{
     
    7079}
    7180
     81/**
     82   \brief the function called for each passing timeSnap
     83   \param time The timespan passed since last update
     84*/
    7285void Player::tick (float time)
    7386{
     
    7689}
    7790
     91/**
     92   \brief if the player is hit, call this function
     93   \param weapon hit by this weapon
     94   \param loc ??
     95*/
    7896void Player::hit (WorldEntity* weapon, Vector loc)
    7997{
    8098}
    8199
     100/**
     101   \brief action that happens when the player is destroyed.
     102*/
    82103void Player::destroy ()
    83104{
    84105}
    85106
     107/**
     108    \brief Collision with another Entity has this effect
     109    \param other the other colider
     110    \param ownhitflags ??
     111    \param otherhitflags ??
     112*/
    86113void Player::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags)
    87114{
    88115}
    89116
     117/**
     118   \brief The connection to the command node
     119   \param cmd the Command unit from witch to map
     120
     121   here the commands are mapped to the players movement/weaponary
     122*/
    90123void Player::command (Command* cmd)
    91124{
     
    98131}
    99132
     133/**
     134   \brief draws the player after transforming him.
     135*/
    100136void Player::draw ()
    101137{
     
    119155
    120156/*PN
    121 void Player::getLookat(Location* locbuf)
    122 {
     157  void Player::getLookat(Location* locbuf)
     158  {
    123159  *locbuf = *getLocation();
    124160  //locbuf->dist += 5.0;
    125 }
    126 */
    127 
     161  }
     162*/
     163
     164/**
     165   \brief the action occuring if the player left the game
     166*/
    128167void Player::leftWorld ()
    129168{
    130169}
    131170
     171/**
     172   \brief action if player moves
     173   \param time the timeslice since the last frame
     174*/
    132175void Player::move (float time)
    133176{
  • orxonox/trunk/src/player.h

    r3396 r3450  
    3333 
    3434 private:
    35   bool bUp, bDown, bLeft, bRight, bAscend, bDescend;
    36   bool bFire;
    37   Vector velocity;
    38   float travelSpeed;
    39   float acceleration;
    40   GLuint objectList;
     35  bool bUp;              //!< up button pressed.
     36  bool bDown;            //!< down button pressed.
     37  bool bLeft;            //!< left button pressed.
     38  bool bRight;           //!< right button pressed.
     39  bool bAscend;          //!< ascend button pressed.
     40  bool bDescend;         //!< descend button presses.
     41  bool bFire;            //!< fire button pressed.
     42
     43  Vector velocity;       //!< the velocity of the player.
     44  float travelSpeed;     //!< the current speed of the player (to make soft movement)
     45  float acceleration;    //!< the acceleration of the player.
    4146 
    4247  void move(float time);
  • orxonox/trunk/src/skysphere.cc

    r3429 r3450  
    9595/**
    9696   \brief updates the position of the Skysphere
    97    \param x the x-coordinate of the Center of the Sphere
    98    \param y the y-coordinate of the Center of the Sphere
    99    \param z the z-coordinate of the Center of the Sphere
     97   \param sphereCenter The coordinate of the Center of the Sphere
    10098   
    10199   This is normally done in the update-phase of world, so the Skysphere is always centered at the Camera.
Note: See TracChangeset for help on using the changeset viewer.