Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3327 in orxonox.OLD for orxonox/branches/parenting/src/world.cc


Ignore:
Timestamp:
Jan 3, 2005, 6:57:01 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/parenting: added Class UPointCurve. It is so Bad, I can't even believe it myself… you can see the behaviour of this curve in this revision. have fun

File:
1 edited

Legend:

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

    r3324 r3327  
    153153        case DEBUG_WORLD_0:
    154154          {
    155             testCurve = new BezierCurve();
    156             testCurve->addNode(Vector(0,0,0));
    157             testCurve->addNode(Vector(5,7,0));
    158             testCurve->addNode(Vector(10,-5,0));
    159             testCurve->addNode(Vector(20, 0,10));
    160             testCurve->addNode(Vector(50, 7,-5));
    161             testCurve->addNode(Vector(60, -20,0));
    162             testCurve->addNode(Vector(60, 10,0));
     155            testCurve = new UPointCurve();
     156            testCurve->addNode(Vector( 0, 0, 0));
     157            testCurve->addNode(Vector(10, 0, 5));
     158            testCurve->addNode(Vector(20, -5,-5));
     159            testCurve->addNode(Vector(30, 5, 10));
     160            testCurve->addNode(Vector(40, 0,-10));
     161            testCurve->addNode(Vector(50, 0,-10));
     162
    163163           
    164164            this->nullParent = NullParent::getInstance ();
     
    447447
    448448  glBegin(GL_LINES);
    449   for(float i=0.0; i<1; i+=.01)
    450     {
    451       printf("%f %f %f\n",testCurve->calcDir(i).x,testCurve->calcDir(i).y,testCurve->calcDir(i).z);
     449  for(float i=0.0; i<1; i+=.001)
     450    {
     451      printf("%f %f %f\n",testCurve->calcPos(i).x,testCurve->calcPos(i).y,testCurve->calcPos(i).z);
    452452      glVertex3f(testCurve->calcPos(i).x, testCurve->calcPos(i).y, testCurve->calcPos(i).z);
    453       glVertex3f(testCurve->calcPos(i).x+testCurve->calcDir(i).x, testCurve->calcPos(i).y+testCurve->calcDir(i).y, testCurve->calcPos(i).z+testCurve->calcDir(i).z);
     453      //      glVertex3f(testCurve->calcPos(i).x+testCurve->calcDir(i).x, testCurve->calcPos(i).y+testCurve->calcDir(i).y, testCurve->calcPos(i).z+testCurve->calcDir(i).z);
    454454    }
    455455  glEnd();
Note: See TracChangeset for help on using the changeset viewer.