Changeset 5414 in orxonox.OLD for trunk/src/lib/coord
- Timestamp:
- Oct 21, 2005, 9:45:54 AM (19 years ago)
- Location:
- trunk/src/lib/coord
- Files:
-
- 2 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 /** -
trunk/src/lib/coord/p_node.h
r5406 r5414 83 83 void setAbsDir (const Quaternion& absDir); 84 84 void setAbsDir (float x, float y, float z); 85 void setAbsDirSoft(const Quaternion& absDirSoft, float bias = 1.0); 86 void setAbsDirSoft(float x, float y, float z, float bias = 1.0); 85 87 /** @returns the absolute Direction */ 86 88 inline const Quaternion& getAbsDir () const { return this->absDirection; };
Note: See TracChangeset
for help on using the changeset viewer.