Changeset 5487 in orxonox.OLD for trunk/src/lib/collision_detection
- Timestamp:
- Nov 4, 2005, 3:34:58 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_detection/obb_tree_node.cc
r5481 r5487 838 838 glDisable(GL_LIGHTING); 839 839 glDisable(GL_TEXTURE_2D); 840 glDisable(GL_BLEND);841 840 } 842 841 glColor3f(color.x, color.y, color.z); … … 891 890 if( drawMode & DRAW_BV_POLYGON || drawMode & DRAW_ALL || drawMode & DRAW_BV_BLENDED) 892 891 { 892 if (top) 893 { 894 glEnable(GL_BLEND); 895 glBlendFunc(GL_SRC_ALPHA, GL_ONE); 896 } 897 893 898 if(this->nodeLeft == NULL || this->nodeRight == NULL) 894 899 depth = 0; … … 901 906 if( this->bvElement->bCollided) 902 907 { 903 glColor 3f(1.0, 1.0, 1.0); // COLLISION COLOR908 glColor4f(1.0, 1.0, 1.0, .5); // COLLISION COLOR 904 909 } 905 910 else if( drawMode & DRAW_BV_BLENDED) … … 907 912 glColor4f(color.x, color.y, color.z, .5); 908 913 } 909 910 911 914 912 915 /* draw bounding box */ … … 1055 1058 if (depth > 0) 1056 1059 { 1057 Vector childColor = Color::HSVtoRGB(Color::RGBtoHSV(color)+Vector(20,0,.0)); 1060 Vector childColor1 = Color::HSVtoRGB(Color::RGBtoHSV(color)+Vector(10.0,0.0,0.0)); 1061 Vector childColor2 = Color::HSVtoRGB(Color::RGBtoHSV(color)-Vector(10.0,0.0,0.0)); 1058 1062 if( this->nodeLeft != NULL) 1059 this->nodeLeft->drawBV(depth - 1, drawMode, childColor , false);1063 this->nodeLeft->drawBV(depth - 1, drawMode, childColor1, false); 1060 1064 if( this->nodeRight != NULL) 1061 this->nodeRight->drawBV(depth - 1, drawMode, childColor , false);1065 this->nodeRight->drawBV(depth - 1, drawMode, childColor2, false); 1062 1066 } 1063 1067 this->bvElement->bCollided = false;
Note: See TracChangeset
for help on using the changeset viewer.