Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3588 in orxonox.OLD for orxonox/trunk/src/lib


Ignore:
Timestamp:
Mar 17, 2005, 2:47:16 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: name-fix for TrackManager and minor fix in Curve.
There has also been a little fix in the light-class: light is a BaseObject not a World-Entity

Location:
orxonox/trunk/src/lib/math
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/math/curve.cc

    r3473 r3588  
    2828#include <math.h>
    2929#include <stdio.h>
     30
     31
     32/**
     33    \brief default constructor for a Curve
     34*/
     35Curve::Curve(void)
     36{
     37  nodeCount = 0;
     38  firstNode = new PathNode;
     39  currentNode = firstNode;
     40
     41  firstNode->position = Vector (.0, .0, .0);
     42  firstNode->number = 0;
     43  firstNode->next = 0; // not sure if this really points to NULL!!
     44}
    3045
    3146/**
     
    131146  this->derivation = 0;
    132147  dirCurve = new BezierCurve(1);
    133   this->init();
    134148}
    135149
     
    141155  this->derivation = derivation;
    142156  dirCurve=NULL;
    143   this->init();
    144157}
    145158
     
    161174  if (dirCurve)
    162175    delete dirCurve;
    163 }
    164 
    165 /**
    166    \brief Initializes a BezierCurve
    167 */
    168 void BezierCurve::init(void)
    169 {
    170   nodeCount = 0;
    171   firstNode = new PathNode;
    172   currentNode = firstNode;
    173 
    174   firstNode->position = Vector (.0, .0, .0);
    175   firstNode->number = 0;
    176   firstNode->next = 0; // not sure if this really points to NULL!!
    177 
    178   return;
    179176}
    180177
     
    297294{
    298295  this->derivation = 0;
    299   this->init();
    300296}
    301297
     
    307303  this->derivation = derivation;
    308304  dirCurve=NULL;
    309   this->init();
    310305}
    311306
     
    327322  if (dirCurve)
    328323    delete dirCurve;
    329 }
    330 
    331 /**
    332    \brief Initializes a UPointCurve
    333 */
    334 void UPointCurve::init(void)
    335 {
    336   nodeCount = 0;
    337   firstNode = new PathNode;
    338   currentNode = firstNode;
    339 
    340   firstNode->position = Vector (.0, .0, .0);
    341   firstNode->number = 0;
    342   firstNode->next = 0; // not sure if this really points to NULL!!
    343 
    344   return;
    345324}
    346325
  • orxonox/trunk/src/lib/math/curve.h

    r3473 r3588  
    3838  PathNode* currentNode; //!< The node we are working with (the Last node).
    3939
     40
    4041 private:
    4142  virtual void rebuild(void) = 0;
    4243 public:
     44  Curve(void);
     45
    4346  Curve* dirCurve;       //!< The derivation-curve of this Curve.
    4447  void addNode(const Vector& newNode);
     
    6871  BezierCurve(void);
    6972  BezierCurve(int derivation);
    70   ~BezierCurve(void);
    71   void init(void);
     73  virtual ~BezierCurve(void);
    7274
    7375  Vector calcPos(float t);
     
    106108  UPointCurve(int derivation);
    107109  ~UPointCurve(void);
    108   void init(void);
    109110
    110111  Vector calcPos(float t);
Note: See TracChangeset for help on using the changeset viewer.