Changeset 5414 in orxonox.OLD for trunk/src/lib/coord/p_node.cc
- Timestamp:
- Oct 21, 2005, 9:45:54 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r5406 r5414 415 415 this->setAbsDir(Quaternion(Vector(x,y,z), Vector(0,1,0))); 416 416 } 417 418 /** 419 * sets the absolute direction 420 * @param absDir absolute coordinates 421 */ 422 void PNode::setAbsDirSoft (const Quaternion& absDirSoft, float bias) 423 { 424 if (this->toDirection == NULL) 425 this->toDirection = new Quaternion(); 426 427 if (likely(this->parent != NULL)) 428 *this->toDirection = absDirSoft / this->parent->getAbsDir(); 429 else 430 *this->toDirection = absDirSoft; 431 432 this->bias = bias; 433 } 434 435 /** 436 * @see void PNode::setAbsDir (const Quaternion& relDir) 437 * @param x the x direction 438 * @param y the y direction 439 * @param z the z direction 440 * 441 * main difference is, that here you give a directional vector, that will be translated into a Quaternion 442 */ 443 void PNode::setAbsDirSoft (float x, float y, float z, float bias) 444 { 445 this->setAbsDirSoft(Quaternion(Vector(x,y,z), Vector(0,1,0)), bias); 446 } 447 417 448 418 449 /**
Note: See TracChangeset
for help on using the changeset viewer.