Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3247 in orxonox.OLD


Ignore:
Timestamp:
Dec 22, 2004, 2:12:36 PM (19 years ago)
Author:
patrick
Message:

orxonox/braches/parenting: added branch parenting, added function definition PNode

Location:
orxonox/branches/parenting
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/parenting/src/p_node.cc

    r3246 r3247  
    3838PNode::~PNode () {}
    3939
     40
     41/**
     42   \brief get relative coordinates
     43   \returns relative coordinates to its parent
     44*/
     45Vector PNode::getRelCoor ()
     46{}
     47
     48
     49/**
     50   \brief set relative coordinates
     51   \param relative coordinates to its parent
     52
     53   it is very importand, that you use this function, if you want to update the
     54   relCoordinates. If you don't use this, the PNode won't recognize, that something
     55   has changed and won't update the children Nodes.
     56*/
     57void PNode::setRelCoor (Vector relCoord)
     58{}
     59
     60
     61/**
     62   \brief get absolute coordinates
     63   \returns absolute coordinates from (0,0,0)
     64*/
     65Vector PNode::getAbsCoor ()
     66{}
     67
     68
     69/**
     70   \brief get relative coordinates
     71   \returns relative coordinates to its parent
     72
     73   it is very importand, that you use this function, if you want to update the
     74   absCoordinates. If you don't use this, the PNode won't recognize, that something
     75   has changed and won't update the children Nodes.
     76*/
     77void PNode::setAbsCoor (Vector absCoord)
     78{}
     79
     80
     81/**
     82   \brief get relative direction
     83   \returns relative direction to its parent
     84*/
     85Quaternion PNode::getRelDir ()
     86{}
     87
     88
     89/**
     90   \brief set relative direction
     91   \param relative direction to its parent
     92
     93   it is very importand, that you use this function, if you want to update the
     94   relDirection. If you don't use this, the PNode won't recognize, that something
     95   has changed and won't update the children Nodes.
     96*/
     97void PNode::setRelDir (Quaternion relDir)
     98{}
     99
     100
     101/**
     102   \brief gets the absolute direction (0,0,1)
     103   \returns absolute coordinates
     104*/
     105Quaternion PNode::getAbsDir ()
     106{}
     107
     108
     109/**
     110   \brief sets the absolute direction (0,0,1)
     111   \param absolute coordinates
     112
     113   it is very importand, that you use this function, if you want to update the
     114   absDirection. If you don't use this, the PNode won't recognize, that something
     115   has changed and won't update the children Nodes.
     116*/
     117void PNode::setAbsDir (Quaternion absDir)
     118{}
     119
     120
     121/**
     122   \brief adds a child and makes this node to a parent
     123   \param child reference
     124
     125   use this to add a child to this node.
     126*/
     127void PNode::addChild (PNode* pNode)
     128{}
     129
     130
     131void PNode::removeChild (PNode* pNode)
     132{}
     133
     134
     135void PNode::setParent (PNode* parent)
     136{}
     137
  • orxonox/branches/parenting/src/p_node.h

    r3246 r3247  
    1414    this conditions make it cheaper to recalculate the tree (reduces redundant work).
    1515
    16     remember: if you have to change the coordinates, because the object (point) did move,
    17     don't forget to reset both relCoor and absCoor (offset is the same)
     16    remember: if you have to change the coordinates or the directions, use the functions
     17    that are defined to execute this operation - otherwhise there will be big problems...
    1818*/
    1919
     
    2424#include "stdincl.h"
    2525
     26typedef enum parentingMode {};
    2627
    2728class PNode {
     
    3940  void setRelDir (Quaternion relDir);
    4041  Quaternion getAbsDir ();
    41   void setAbsCoor (Quaternion absDir);
     42  void setAbsDir (Quaternion absDir);
    4243
    4344  void addChild (PNode* pNode);
    4445  void removeChild (PNode* pNode);
     46  void setParent (PNode* parent);
    4547
    4648 private:
     
    5456  Quaternion absDirection; //! absolute direvtion in the world ( from (0,0,1) )
    5557
     58  PNode* parent;
    5659  tList<PNode>* children; //! list of the children
    5760
Note: See TracChangeset for help on using the changeset viewer.