On 10/8/07, Schmidt, Richard, SDGE1 <[EMAIL PROTECTED]> wrote:
>
> Hi
> Daniel
>
> Ulrich presented a nice outlining technique on his homepage:
>
> http://www.sandbox.de/osg/
>
> Richard
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Daniel
> Moos
> Sent: Sunday, October 07, 2007 1:52 PM
> To: [email protected]
> 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
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> g
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to