I have rendered a Point cloud succesfully by subclassing AIS_InteractiveObject.
thanks to the guidance in this thread : http://www.opencascade.org/org/forum/thread_1125/
So my compute function is like this:
void AIS_PointCloud::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode)
Handle(Graphic3d_Structure) theStructure = Handle(Graphic3d_Structure)::DownCast(aPresentation);
Handle(Graphic3d_Group) theGroup= theStructure->NewGroup();
asp = myDrawer->PointAspect()->Aspect();
const Graphic3d_ArrayOfPoints& theArray= new Graphic3d_ArrayOfPoints(vertlist.size(),Standard_True); //vertlist is list of your points with colors.
lit = vertlist.begin();
lend = vertlist.end();
theArray->AddVertex(lit->pnt, lit->color); //add every point with it color
When I select this point cloud object, the point colors changes to the default selection color which is Quantity_NOC_GRAY80. I would like that color points remain unchanged after selection knowing that it is work with OCC 6.7.1
But after migration to OCC 6.8, it didn't work.
Please help me.