From 1f80e1e6c439e29fd0fc13643eb1bbb1a9a487b7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 12 Feb 2004 01:42:00 +0000 Subject: [PATCH] From Shane Arnott, added drawing of "split" --- src/osgSim/SphereSegment.cpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/osgSim/SphereSegment.cpp b/src/osgSim/SphereSegment.cpp index 98002f7c3..0ea30fe55 100644 --- a/src/osgSim/SphereSegment.cpp +++ b/src/osgSim/SphereSegment.cpp @@ -493,8 +493,6 @@ bool SphereSegment::Surface_computeBound(osg::BoundingBox& bbox) const void SphereSegment::EdgeLine_drawImplementation(osg::State& /* state */) const { - // FIXME: Disable lighting for this draw routine - const float azIncr = (_azMax - _azMin)/_density; const float elevIncr = (_elevMax - _elevMin)/_density; @@ -553,6 +551,33 @@ void SphereSegment::EdgeLine_drawImplementation(osg::State& /* state */) const _centre.z() + _radius*sin(elev)); } glEnd(); +#if 0 + // Split right + glBegin(GL_LINE_STRIP); + glVertex3f( + _centre.x() + _radius*cos(_elevMin)*sin(_azMax), + _centre.y() + _radius*cos(_elevMin)*cos(_azMax), + _centre.z() + _radius*sin(_elevMin)); + glVertex3f(_centre.x(), _centre.y(), _centre.z()); + glVertex3f( + _centre.x() + _radius*cos(_elevMax)*sin(_azMax), + _centre.y() + _radius*cos(_elevMax)*cos(_azMax), + _centre.z() + _radius*sin(_elevMax)); + glEnd(); + + // Split left + glBegin(GL_LINE_STRIP); + glVertex3f( + _centre.x() + _radius*cos(_elevMin)*sin(_azMin), + _centre.y() + _radius*cos(_elevMin)*cos(_azMin), + _centre.z() + _radius*sin(_elevMin)); + glVertex3f(_centre.x(), _centre.y(), _centre.z()); + glVertex3f( + _centre.x() + _radius*cos(_elevMax)*sin(_azMin), + _centre.y() + _radius*cos(_elevMax)*cos(_azMin), + _centre.z() + _radius*sin(_elevMax)); + glEnd(); +#endif } }