Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3019 in orxonox.OLD for orxonox/branches/bezierTrack/src/curve.cc


Ignore:
Timestamp:
Nov 28, 2004, 1:46:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/bezierTrack: added Class Curve, and made BezierCurve derived from it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/bezierTrack/src/curve.cc

    r3018 r3019  
    1717
    1818#include "curve.h"
     19
     20
     21
     22/**
     23   \brief adds a new Node to the bezier Curve
     24   \param newNode a Vector to the position of the new node
     25*/
     26void Curve::addNode(const Vector& newNode)
     27{
     28  if (nodeCount != 0 )
     29    {
     30      currentNode = currentNode->next = new PathNode;
     31    }
     32  currentNode->position = newNode;
     33  currentNode->next = 0; // not sure if this really points to NULL!!
     34  currentNode->number = (++nodeCount);
     35  return;
     36}
     37
    1938
    2039/**
     
    4867      delete tmpNode;
    4968    }
    50 }
    51 
    52 /**
    53    \brief adds a new Node to the bezier Curve
    54    \param newNode a Vector to the position of the new node
    55 */
    56 void BezierCurve::addNode(const Vector& newNode)
    57 {
    58   if (nodeCount != 0 )
    59     {
    60       currentNode = currentNode->next = new PathNode;
    61     }
    62   currentNode->position = newNode;
    63   currentNode->next = 0; // not sure if this really points to NULL!!
    64   currentNode->number = (++nodeCount);
    65   return;
    6669}
    6770
     
    136139
    137140
    138 int BezierCurve::ncr(int n, int i)
     141int ncr(int n, int i)
    139142{
    140143  int ret = 1;
Note: See TracChangeset for help on using the changeset viewer.