Adding data to AIS object

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

Francois Lauzon's picture

We use the SetOwner and GetOwner method of AIS_InteractiveObject.

Francois.

jerome's picture

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 ?
Jerome

Francois Lauzon's picture

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,
Francois.