[osg-users] Highlighting with OSG

deepti g deepti.iiit at gmail.com
Sat Oct 13 04:15:24 PDT 2007


On 10/8/07, Schmidt, Richard, SDGE1 <Richard.Schmidt at eads.com> wrote:
>
> Hi
> Daniel
>
> Ulrich presented a nice outlining technique on his homepage:
>
> http://www.sandbox.de/osg/
>
> Richard
>
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Daniel
> Moos
> Sent: Sunday, October 07, 2007 1:52 PM
> To: osg-users at lists.openscenegraph.org
> Subject: [osg-users] Highlighting with OSG
>
> Hi @all
>
> I'm new here and I try to make a "simple" hightlighting effect with
> OpenSceneGraph. I want to highlight triangles, vertexes and lines from a
>
> loaded model by picking it with the mouse.
>
> The picking isn't the problem. But how can I make a highlighting effect?
> For
> example change the color of the object...
>
> A second Question...
> If I loaded a model into my scene. Where can I get a list with all the
> triangles and its vertexes?
>
> Thank you!
> Daniel




Hi Daniel
              As Santosh said,after performing intersection,get the first
node which intersected with the point you clicked. Inorder to get the
geometry or the vertex list of this node,I did the following..

 osgUtil::LineSegmentIntersector::Intersection intersection =
picker->getFirstIntersection();
 osg::Geometry* geom=new osg::Geometry;
 geom =(intersection.drawable->asGeometry());
 osg::Vec3Array *vertices=new osg::Vec3Array;
vertices=dynamic_cast<osg::Vec3Array*>(geom->getVertexArray());

where Vertices is the vertex list of that node.

--Deepti.

_______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> g
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071013/3de5ff7d/attachment-0003.htm>


More information about the osg-users mailing list