how to get the AIS_InteractiveObject or PrsMgr_PresentableObject from SelectMgr_EntityOwner?

Try to override ProcessDragging by simply translating the object to mouse position.
I figure to do so I need the AIS_InteractiveObject and set its location.

So the question is how to get the AIS_InteractiveObject or PrsMgr_PresentableObject from SelectMgr_EntityOwner? or maybe there is another way to set its location in the ProcessDragging function?

Kirill Gavrilov's picture

or maybe there is another way to set its location in the ProcessDragging function?

ProcessDragging is the method of AIS_InteractiveObject itself (AIS_InteractiveObject::ProcessDragging()), so I don't quite understand which problem you are trying to solve.

As for SelectMgr_EntityOwner, it keeps reference to SelectMgr_SelectableObject - see method SelectMgr_EntityOwner::Selectable(), which you may DownCast() to your interactive object class.

john wick's picture

thankyou, what you provided works.

I have an another question through. The SelectMgr_EntityOwner does not move with the translated object. so after AIS_DragAction_Stop, you cannot select the object again. Also, after a while when you can select it, it start where the SelectMgr_EntityOwner originates.

I looked at the SetLocation function and it does nothing. Do I have to implement it or is there another way to have it move with the object at end of drag action?