Hello Rainer,

Rainer Schuetze wrote:
> i'm looking for a function to pick a single point in the scene. 
> I've had a deep look in the picking tutorial, bit couldn't get down to
> the single point.
> 
> I've created a point cloud by the geometry class. All points are in one
> geometry "node".
> # I like to pick one point
> # I like to select a bunch of point (e.g. by a quader)
> 
> I've just found the OpenSG funktion OSGIntersectAction. As it was shown
> in the example the intersection accept just a line (vector). I assume a
> line can not intersect a point. What I might need is a volume object,
> like a Frustum.

yes, the IntersectAction is intended for use with polygon based geometry 
(and also only for occasional picks, as OpenSG does not maintain data 
structures to speed up calculation of the intersection point inside a 
_single_ geometry).

> Is there already a function for picking / selec points in OpenSG
> available and I couldn't find it?

no, there is no complete solution implemented already.

> Or must I implement this funktionality by my own, if yes how?

This is a quite general question, and its answer depends at least to 
some extend on the size of your point cloud and the frequency you expect 
to run the picking at.
You probably want to write your own action for this or at least make use 
of the traverse functions from OSGAction.h. The general idea would be to 
take the object (possibly a BoxVolume or CylinderVolume) you use for 
picking and apply transformations to it while traversing the scene. If 
you encounter a Geometry you test the points for intersection with the 
volume. Spatial splitting of your point cloud into more than one 
geometry or building additional data structures on the side may be 
necessary to improve performance.

        Hope it helps,
                Carsten

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to