So for my custom AIS_Shape, my overridden Compute is just a simple TopoDS_Wire.
In my overridden ComputeSelection I try to add sensitive entity for the wire so that it will be selectable.
this is what I did:
In my overridden ComputeSelection I try to add sensitive entity for the wire so that it will be selectable.
this is what I did:
Code:
void MyAisLine::ComputeSelection(const Handle(SelectMgr_Selection)& theSel, const Standard_Integer theMode)
{
if (!myshape.IsNull())
{
Handle(SelectMgr_EntityOwner) anOwner = new SelectMgr_EntityOwner(this);
Handle(Select3D_SensitiveWire) i = new Select3D_SensitiveWire(anOwner);
theSel->Add(i);
}
}