Re: [osg-users] Multi-colored osgSim::SphereSegment?

2009-02-25 Thread Robert Osfield
Hi Ben,

osgSim::SphereSegment is a very specialist feature, it's not design to
provide lots of flexibility.  For the level of flexibility you require
you'll need to build your own collection of one or more osg::Geometry
leaves.  Have a look at the osggeometry example as a guide.


Robert.

On Tue, Feb 24, 2009 at 9:13 PM, Ben Cain bc...@digitalfusion.com wrote:
 Hello,



 What’s the best way to draw a sphere with the ability to color some of the
 surface’s segments differently?   What I’m trying to do ... I’d like to
 change the color of a given segment if it is intersected by a ray (leaving
 the rest of the sphere color the same).



 I’ve used the osgSim::SphereSegment, but I don’t think it allows for
 explicitly coloring a specified segment.  It looks like the entire Surface
 is added as one drawable.



 Would be easy to change how the way the Surface drawable is added … creating
 a different drawable for every segment … and enabling them to be indexed by
 azimuth/elevation angle (or range)?



 I could start from scratch, but I was hoping to leverage
 osgSim::SphereSegment in some way.



 Any suggestions will be greatly appreciated!



 Thanks,

    Ben



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Multi-colored osgSim::SphereSegment?

2009-02-24 Thread Ben Cain
Hello,

What's the best way to draw a sphere with the ability to color some of the 
surface's segments differently?   What I'm trying to do ... I'd like to change 
the color of a given segment if it is intersected by a ray (leaving the rest of 
the sphere color the same).

I've used the osgSim::SphereSegment, but I don't think it allows for explicitly 
coloring a specified segment.  It looks like the entire Surface is added as one 
drawable.

Would be easy to change how the way the Surface drawable is added ... creating 
a different drawable for every segment ... and enabling them to be indexed by 
azimuth/elevation angle (or range)?

I could start from scratch, but I was hoping to leverage osgSim::SphereSegment 
in some way.

Any suggestions will be greatly appreciated!

Thanks,
   Ben

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org