Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5420 in orxonox.OLD for trunk/src/lib/coord


Ignore:
Timestamp:
Oct 22, 2005, 1:57:29 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Font is now Right, and the Rendering 'should be' faster.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/coord/p_node.cc

    r5419 r5420  
    3636/**
    3737 *  standard constructor
    38 */
     38 */
    3939PNode::PNode ()
    4040{
     
    4646/**
    4747 * @param root the load-Element for the PNode
    48 */
     48 */
    4949PNode::PNode(const TiXmlElement* root)
    5050{
     
    6060 * @param absCoordinate the Absolute coordinate of the Object
    6161 * @param parent The parent-node of this node.
    62 */
     62 */
    6363PNode::PNode (const Vector& absCoor, PNode* parent )
    6464{
     
    116116 *  initializes a PNode
    117117 * @param parent the parent for this PNode
    118 */
     118 */
    119119void PNode::init(PNode* parent)
    120120{
     
    136136 *  loads parameters of the PNode
    137137 * @param root the XML-element to load the properties of
    138 */
     138 */
    139139void PNode::loadParams(const TiXmlElement* root)
    140140{
     
    176176 *  set relative coordinates
    177177 * @param relCoord relative coordinates to its parent
    178 
    179    it is very importand, that you use this function, if you want to update the
    180    relCoordinates. If you don't use this, the PNode won't recognize, that something
    181    has changed and won't update the children Nodes.
    182 */
     178 *
     179 *
     180 * it is very importand, that you use this function, if you want to update the
     181 * relCoordinates. If you don't use this, the PNode won't recognize, that something
     182 * has changed and won't update the children Nodes.
     183 */
    183184void PNode::setRelCoor (const Vector& relCoord)
    184185{
     
    199200 * @param z z-relative coordinates to its parent
    200201 * @see  void PNode::setRelCoor (const Vector& relCoord)
    201 */
     202 */
    202203void PNode::setRelCoor (float x, float y, float z)
    203204{
     
    306307 *  shift coordinate relative
    307308 * @param shift shift vector
    308 
    309    this function shifts the current coordinates about the vector shift. this is
    310    usefull because from some place else you can:
    311    PNode* someNode = ...;
    312    Vector objectMovement = calculateShift();
    313    someNode->shiftCoor(objectMovement);
    314 
    315    otherwise you would have to:
    316    PNode* someNode = ...;
    317    Vector objectMovement = calculateShift();
    318    Vector currentCoor = someNode->getRelCoor();
    319    Vector newCoor = currentCoor + objectMovement;
    320    someNode->setRelCoor(newCoor);
     309 *
     310 * this function shifts the current coordinates about the vector shift. this is
     311 * usefull because from some place else you can:
     312 * PNode* someNode = ...;
     313 * Vector objectMovement = calculateShift();
     314 * someNode->shiftCoor(objectMovement);
     315 *
     316 * this is the internal method of:
     317 * PNode* someNode = ...;
     318 * Vector objectMovement = calculateShift();
     319 * Vector currentCoor = someNode->getRelCoor();
     320 * Vector newCoor = currentCoor + objectMovement;
     321 * someNode->setRelCoor(newCoor);
    321322 *
    322323 */
     
    417418
    418419/**
    419  *  sets the absolute direction
     420 * sets the absolute direction
    420421 * @param absDir absolute coordinates
    421422 */
     
    461462 * @param child child reference
    462463 * use this to add a child to this node.
    463 */
     464 */
    464465void PNode::addChild (PNode* child)
    465466{
     
    491492 *
    492493 * Children from pNode will not be lost, they are referenced to NullPointer
    493 */
     494 */
    494495void PNode::removeChild (PNode* child)
    495496{
     
    504505/**
    505506 *  remove this pnode from the tree and adds all following to NullParent
    506 
    507    this can be the case, if an entity in the world is being destroyed.
    508 */
     507 *
     508 * this can be the case, if an entity in the world is being destroyed.
     509 */
    509510void PNode::remove()
    510511{
     
    525526 * sets the parent of this PNode
    526527 * @param parent the Parent to set
    527 */
     528 */
    528529void PNode::setParent (PNode* parent)
    529530{
     
    604605 *  updates the absCoordinate/absDirection
    605606 * @param dt The time passed since the last update
    606 
    607    this is used to go through the parent-tree to update all the absolute coordinates
    608    and directions. this update should be done by the engine, so you don't have to
    609    worry, normaly...
    610 */
     607 *
     608 * this is used to go through the parent-tree to update all the absolute coordinates
     609 * and directions. this update should be done by the engine, so you don't have to
     610 * worry, normaly...
     611 */
    611612void PNode::update (float dt)
    612613{
     
    713714 * (0: all children will be debugged, 1: only this PNode, 2: this and direct children, ...)
    714715 * @param level !! INTERNAL !! The n-th level of the Node we draw (this is internal and only for nice output).
    715 */
     716 */
    716717void PNode::debug(unsigned int depth, unsigned int level) const
    717718{
Note: See TracChangeset for help on using the changeset viewer.