Changeset 5008 in orxonox.OLD for orxonox/trunk/src/lib/coord
- Timestamp:
- Aug 14, 2005, 2:46:29 AM (19 years ago)
- Location:
- orxonox/trunk/src/lib/coord
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.cc
r5007 r5008 657 657 displays the PNode at its position with its rotation as a cube. 658 658 */ 659 void PNode::debugDraw(unsigned int depth, float size ) const659 void PNode::debugDraw(unsigned int depth, float size, Vector color) const 660 660 { 661 661 glMatrixMode(GL_MODELVIEW); 662 662 glPushMatrix(); 663 glDisable(GL_LIGHTING); 663 664 664 665 /* translate */ … … 671 672 672 673 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 674 glColor3f(color.x, color.y, color.z); 673 675 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 674 676 { … … 705 707 tIterator<PNode>* iterator = this->children->getIterator(); 706 708 //PNode* pn = this->children->enumerate (); 709 Vector childColor = color - Vector(.0,.3,.3); 707 710 PNode* pn = iterator->nextElement(); 708 711 while( pn != NULL) 709 712 { 710 713 if (depth == 0) 711 pn->debugDraw(0, size );714 pn->debugDraw(0, size, childColor); 712 715 else 713 pn->debugDraw(depth - 1, size );716 pn->debugDraw(depth - 1, size, childColor); 714 717 pn = iterator->nextElement(); 715 718 } 716 719 delete iterator; 717 720 } 721 glEnable(GL_LIGHTING); 718 722 } 719 723 -
orxonox/trunk/src/lib/coord/p_node.h
r5007 r5008 116 116 117 117 void debug (unsigned int depth = 1, unsigned int level = 0) const; 118 void debugDraw(unsigned int depth = 1, float size = 1.0 ) const;118 void debugDraw(unsigned int depth = 1, float size = 1.0, Vector color = Vector(1,1,1)) const; 119 119 120 120
Note: See TracChangeset
for help on using the changeset viewer.