Re: [osg-users] Highlighting with OSG

2007-10-13 Thread deepti g
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: osg-users@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_castosg::Vec3Array*(geom-getVertexArray());

where Vertices is the vertex list of that node.

--Deepti.

___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
 g
 ___
 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


Re: [osg-users] Highlighting with OSG

2007-10-08 Thread Schmidt, Richard, SDGE1
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: osg-users@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
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org