Changeset 3004 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Nov 26, 2004, 11:29:46 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/track.cc
r2636 r3004 13 13 ### File Specific: 14 14 main-programmer: Christian Meyer 15 co-programmer: ...15 co-programmer: Benjamin Grauer 16 16 */ 17 17 … … 75 75 // camplc->r = *offset + Vector(0,0,0.5); 76 76 // camplc->w = Quaternion (trace.a, Vector(0,0,1)); 77 float r = (lookat->dist)*PI / l;77 // float r = (lookat->dist)*PI / l; 78 78 camplc->r = trace.r + (trace.a * ((lookat->dist-10.0) / l)) + Vector(0,0,5.0); 79 79 … … 111 111 if( loc->dist > l) 112 112 { 113 113 loc->dist -= l; 114 114 loc->part = nextID; 115 115 //FIXME: loc->track = this; -
orxonox/trunk/src/vector.cc
r3002 r3004 898 898 899 899 /** 900 \brief calculates (and does not return)the Position on the curve900 \brief calculates the Position on the curve 901 901 \param t The position on the Curve (0<=t<=1) 902 */ 903 void BezierCurve::calcPos(float t) 902 \return the Position on the Path 903 */ 904 Vector BezierCurve::calcPos(float t) 904 905 { 905 906 if (nodeCount <=4) … … 943 944 tmpNode = tmpNode->next; 944 945 } 945 curvePoint = b; 946 return; 946 return b; 947 } 948 949 Vector BezierCurve::calcDirection (float t) 950 { 951 double diff = .00000000001; 952 953 Vector diffV = ((calcPos(t+diff) - calcPos(t))/diff); 954 diffV.normalize(); 955 return diffV; 947 956 } 948 957 … … 955 964 return curvePoint; 956 965 } 957 958 /**959 \brief returns the position of the point on the Curve at position t960 \param t The position on the Curve (0<=t<=1)961 \return a Vector to the calculated position962 */963 Vector BezierCurve::getPos(float t)964 {965 calcPos(t);966 return curvePoint;967 } -
orxonox/trunk/src/vector.h
r3002 r3004 177 177 ~BezierCurve (void); 178 178 void addNode (const Vector& newNode); 179 void calcPos (float t); 179 Vector calcPos (float t); 180 Vector calcDirection (float t); 180 181 181 182 Vector getPos () const; 182 Vector getPos (float t);183 183 }; 184 184 -
orxonox/trunk/src/world.cc
r2864 r3004 428 428 } 429 429 430 for( int i = 0; i < tracklen; i++) track[i].tick (seconds);430 // for( int i = 0; i < tracklen; i++) track[i].tick (seconds); 431 431 } 432 432
Note: See TracChangeset
for help on using the changeset viewer.