| 30 | |
| 31 | |
| 32 | void BtDebugDraw::drawLine( const btVector3 &fromBt, const btVector3 &toBt, const btVector3 &color ) |
| 33 | { |
| 34 | Point3F from = btCast<Point3F>( fromBt ); |
| 35 | Point3F to = btCast<Point3F>( toBt ); |
| 36 | |
| 37 | // Cull first if we have a frustum. |
| 38 | //F32 distSquared = ( mCuller->getPosition() - from ).lenSquared(); |
| 39 | //if ( mCuller && distSquared > ( 150 * 150 ) ) //!mCuller->clipSegment( from, to ) ) |
| 40 | //return; |
| 41 | |
| 42 | // Do we need to flush the builder? |
| 43 | if ( mVertexCount + 2 >= 1000 ) |
| 44 | flush(); |
| 45 | |
| 46 | // Are we starting a new primitive? |
| 47 | if ( mVertexCount == 0 ) |
| 48 | PrimBuild::begin( GFXLineList, 1000 ); |
| 49 | |
| 50 | PrimBuild::color3f( color.x(), color.y(), color.z() ); |
| 51 | PrimBuild::vertex3f( from.x, from.y, from.z ); |
| 52 | PrimBuild::vertex3f( to.x, to.y, to.z ); |
| 53 | |
| 54 | mVertexCount += 2; |
| 55 | } |
| 56 | |
| 57 | void BtDebugDraw::drawTriangle( const btVector3 &v0, |
| 58 | const btVector3 &v1, |
no test coverage detected