- Timestamp:
- Aug 14, 2005, 2:20:51 AM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.cc
r5006 r5007 559 559 PRINTF(5)("PNode::update - %s - (%f, %f, %f)\n", this->getName(), this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 560 560 561 562 if( this->parentMode & PNODE_LOCAL_ROTATE && this->bRelDirChanged) 563 { 564 /* update the current absDirection - remember * means rotation around sth.*/ 565 this->absDirection = this->relDirection * parent->getAbsDir();; 566 } 567 561 568 if(likely(this->parentMode & PNODE_MOVEMENT)) 562 569 { … … 564 571 this->absCoordinate = this->parent->getAbsCoor() + this->relCoordinate; 565 572 } 566 567 if( this->parentMode & PNODE_LOCAL_ROTATE && this->bRelDirChanged) 568 { 569 /* update the current absDirection - remember * means rotation around sth.*/ 570 this->absDirection = this->relDirection * parent->getAbsDir();; 571 } 572 573 if( this->parentMode & PNODE_ROTATE_MOVEMENT) 573 else if( this->parentMode & PNODE_ROTATE_MOVEMENT) 574 574 { 575 575 /* update the current absCoordinate */ … … 657 657 displays the PNode at its position with its rotation as a cube. 658 658 */ 659 void PNode::debugDraw( float size) const659 void PNode::debugDraw(unsigned int depth, float size) const 660 660 { 661 661 glMatrixMode(GL_MODELVIEW); … … 701 701 702 702 glPopMatrix(); 703 if (depth >= 2 || depth == 0) 704 { 705 tIterator<PNode>* iterator = this->children->getIterator(); 706 //PNode* pn = this->children->enumerate (); 707 PNode* pn = iterator->nextElement(); 708 while( pn != NULL) 709 { 710 if (depth == 0) 711 pn->debugDraw(0, size); 712 else 713 pn->debugDraw(depth - 1, size); 714 pn = iterator->nextElement(); 715 } 716 delete iterator; 717 } 703 718 } 704 719 -
orxonox/trunk/src/lib/coord/p_node.h
r5006 r5007 116 116 117 117 void debug (unsigned int depth = 1, unsigned int level = 0) const; 118 void debugDraw( float size = 1.0) const;118 void debugDraw(unsigned int depth = 1, float size = 1.0) const; 119 119 120 120 -
orxonox/trunk/src/world_entities/camera.cc
r5005 r5007 144 144 this->softReparent("Player"); 145 145 this->target->softReparent("Player"); 146 this->setRelCoorSoft(4, 0, 0 );147 this->target->setRelCoorSoft( 10,0,0);146 this->setRelCoorSoft(4, 0, 0, 5); 147 this->target->setRelCoorSoft(Vector(10,0,0), 5); 148 148 // this->target->setRelDirSoft(Quaternion(M_PI/4.0, Vector(0,1,0))); 149 149 break; … … 192 192 void Camera::apply () 193 193 { 194 this->target-> debugDraw(2);194 this->target->getParent()->debugDraw(0, 2); 195 195 // switching to Projection Matrix 196 196 glMatrixMode (GL_PROJECTION);
Note: See TracChangeset
for help on using the changeset viewer.