Changeset 5383 in orxonox.OLD
- Timestamp:
- Oct 15, 2005, 8:42:17 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r5382 r5383 654 654 * displays some information about this pNode 655 655 * @param depth The deph into which to debug the children of this PNode to. 656 * (0: all children will be debugged, 1: only this PNode, 2: this and direct children ...)657 * @param level The n-th level of the Node we draw (this is internal and only for nice output)656 * (0: all children will be debugged, 1: only this PNode, 2: this and direct children, ...) 657 * @param level !! INTERNAL !! The n-th level of the Node we draw (this is internal and only for nice output). 658 658 */ 659 659 void PNode::debug(unsigned int depth, unsigned int level) const … … 697 697 698 698 /** 699 displays the PNode at its position with its rotation as a cube. 700 */ 701 void PNode::debugDraw(unsigned int depth, float size, const Vector& color) const 702 { 703 glMatrixMode(GL_MODELVIEW); 699 * displays the PNode at its position with its rotation as a cube. 700 * @param depth The deph into which to debug the children of this PNode to. 701 * (0: all children will be displayed, 1: only this PNode, 2: this and direct children, ...) 702 * @param size the Size of the Box to draw. 703 * @param color the color of the Box to display. 704 * @param level !! INTERNAL !! The n-th level of the Node we draw (this is internal and only for nice output). 705 */ 706 void PNode::debugDraw(unsigned int depth, float size, const Vector& color, unsigned int level) const 707 { 708 if (level == 0) 709 { 710 glPushAttrib(GL_ENABLE_BIT); 711 glMatrixMode(GL_MODELVIEW); 712 713 glDisable(GL_LIGHTING); 714 glDisable(GL_BLEND); 715 glDisable(GL_TEXTURE_2D); 716 } 717 704 718 glPushMatrix(); 705 glDisable(GL_LIGHTING);706 707 719 /* translate */ 708 720 glTranslatef (this->getAbsCoor ().x, … … 715 727 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 716 728 glColor3f(color.x, color.y, color.z); 729 717 730 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 718 731 { … … 745 758 746 759 glPopMatrix(); 747 glEnable(GL_LIGHTING);748 760 if (depth >= 2 || depth == 0) 749 761 { 750 762 Vector childColor = Color::HSVtoRGB(Color::RGBtoHSV(color)+Vector(20,0,.0)); 751 752 763 tIterator<PNode>* iterator = this->children->getIterator(); 753 764 PNode* pn = iterator->firstElement(); … … 755 766 { 756 767 if (depth == 0) 757 pn->debugDraw(0, size, childColor );768 pn->debugDraw(0, size, childColor, level+1); 758 769 else 759 pn->debugDraw(depth - 1, size, childColor );770 pn->debugDraw(depth - 1, size, childColor, level +1); 760 771 pn = iterator->nextElement(); 761 772 } 762 773 delete iterator; 763 774 } 775 if (level == 0) 776 glPopAttrib(); 764 777 } 765 778 -
trunk/src/lib/coord/p_node.h
r5382 r5383 118 118 119 119 void debug (unsigned int depth = 1, unsigned int level = 0) const; 120 void debugDraw(unsigned int depth = 1, float size = 1.0, const Vector& color = Vector(1, 1,1)) const;120 void debugDraw(unsigned int depth = 1, float size = 1.0, const Vector& color = Vector(1, 0, 0), unsigned int level = 0) const; 121 121 122 122 -
trunk/src/lib/shell/shell.cc
r5382 r5383 364 364 2: 365 365 */ 366 lastText->setRelDir2D(- 360);367 lastText->setRelDirSoft2D(0, 5);366 lastText->setRelDir2D(-90); 367 lastText->setRelDirSoft2D(0, 20); 368 368 lastText->setRelCoor2D(this->calculateLinePosition(0)- Vector(-1000,0,0)); 369 369 lastText->setRelCoorSoft2D(this->calculateLinePosition(0),10);
Note: See TracChangeset
for help on using the changeset viewer.