Hello Casten, first of all thanks for your extensive anwser.
Am Di 04.12.2007 17:37 schrieb Carsten Neumann : >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. Ok, the picking methode you propose is a suitable solution. Thanks forĀ the advice. I intend to handel about 1-10 Million (1E6) points, they are coming from a scanner. Putting all points in one geometry object might be very slow - the traversing the scene might be very slow (didn't test it by now). I was thinking of using a data structures to optimize the point handling, too. Do you have any experience with data structures for points. Would you create the data structure (e.g. R-Tree, Quadtree) within the scene graph (Nodes)? Would it be better to keep the tree out of the scene graph and just link (with pointer, if this is possible) the points to the scene graph? Greatings Rainer > >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 ------------------------------------------------------------------------- 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
