I created a class similar to User_Cylinder called User_Point. This class helps to store and display Point Cloud vertices in a fast way. The method was described in one of the earlier post in this forum, which is to use,
Handle(Graphic3d_Structure) theStructure = Handle(Graphic3d_Structure)::DownCast(aPresentation);
Handle(Graphic3d_Group) theGroup= new Graphic3d_Group(theStructure);
asp = myDrawer->PointAspect();
Graphic3d_Array1OfVertex& theArray = GetVertices(); //your points
But I want to allow the user to select these point and has been looking at StdSelect classes.
As these point clouds are not part of TopoDS classes, but merely coordinates which I inserted into the display, the existing selection tools doesn't allow me to select a point and highlight it?
Anybody can help?
P/S: In ACIS, I created a new tool called SelectTool which returns a screen coordinate (X,Y) when I click on the view. (X,Y) is transformed to (x,y,z) by using a position mapping function provided by the display context. Next, I use this coordinate to search for the nearest point cloud and highlight it.