Changeset 5406 in orxonox.OLD for trunk/src/lib/coord
- Timestamp:
- Oct 19, 2005, 6:30:07 PM (19 years ago)
- Location:
- trunk/src/lib/coord
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r5397 r5406 12 12 main-programmer: Patrick Boenzli 13 13 co-programmer: 14 15 @todo Smooth-Parent: delay, speed16 14 */ 17 15 … … 31 29 #include "vector.h" 32 30 33 //#include "vector.h" 34 //#include "quaternion.h" 31 #include "color.h" 35 32 36 33 using namespace std; … … 278 275 this->setAbsCoor(Vector(x, y, z)); 279 276 } 277 278 /** 279 * @param absCoord set absolute coordinate 280 * @todo check off 281 */ 282 void PNode::setAbsCoorSoft (const Vector& absCoordSoft, float bias) 283 { 284 if (this->toCoordinate == NULL) 285 this->toCoordinate = new Vector; 286 287 if( likely(this->parentMode & PNODE_MOVEMENT)) 288 { 289 /* if you have set the absolute coordinates this overrides all other changes */ 290 if (likely(this->parent != NULL)) 291 *this->toCoordinate = absCoordSoft - parent->getAbsCoor (); 292 else 293 *this->toCoordinate = absCoordSoft; 294 } 295 if( this->parentMode & PNODE_ROTATE_MOVEMENT) 296 { 297 if (likely(this->parent != NULL)) 298 *this->toCoordinate = absCoordSoft - parent->getAbsCoor (); 299 else 300 *this->toCoordinate = absCoordSoft; 301 } 302 } 303 280 304 281 305 /** … … 695 719 } 696 720 } 697 #include "color.h"698 721 699 722 /** … … 767 790 { 768 791 // drawing the Dependency graph 769 792 if (this != NullParent::getInstance()) 770 793 { 771 794 glBegin(GL_LINES); -
trunk/src/lib/coord/p_node.h
r5405 r5406 65 65 void setAbsCoor (const Vector& absCoord); 66 66 void setAbsCoor (float x, float y, float z); 67 void setAbsCoorSoft(const Vector& absCoordSoft, float bias = 1.0); 68 void setAbsCoorSoft(float x, float y, float z, float bias = 1.0); 67 69 /** @returns the absolute position */ 68 70 inline const Vector& getAbsCoor () const { return this->absCoordinate; };
Note: See TracChangeset
for help on using the changeset viewer.