We use the SetOwner and GetOwner method of AIS_InteractiveObject.
Commenter-1.
Archived discussion
Hi, I manage a list of interactive object for vizualisation and I need to store some data (pointer) in the interactive object themselves to identify them from my application.
What is the best way to do it ?
Is there a free data member in AIS object to store this information ?
Regards
Jerome
Discussion
Posts are displayed in their archived order.
We use the SetOwner and GetOwner method of AIS_InteractiveObject.
Commenter-1.
I agree but the SetOwner and GetOwner methods return/get a "const Handle(Standard_Transient)& " and my object don't inherits from Standard_Transient. I try to make casts but don't find any solution.
Is there another way ?
Commenter-2
I don't see any other way but to attach a derived class from Handle(Standard_Transient). You could create a wrapper derived from Handle(Standard_Transient) that will hold a pointer to your object.
Good Luck,
Commenter-1.