Unselectable Shape

I want to draw shapes that are not selectable at all. The solution I came up with is to derive UnselectableShape class from AIS_Shape and implement an empty ComputeSelection method. Is this an exceptable method?

class UnselectableShape : public AIS_Shape
UnselectableShape(const TopoDS_Shape& shap) : AIS_Shape(shap) {}

void ComputeSelection(const Handle(SelectMgr_Selection)&, const Standard_Integer)

Sven Jungnickel's picture

Simlpy use AIS_InteractiveObject::UnsetSelectionMode to unset the selection mode of an AIS-Object.