const Handle(Graphic3d_TransformPers)& theTrsfPers)
{
theObject->SetTransformPersistence (theTrsfPers);
+ UpdateOnTransformPersistence (theObject);
+}
+
+//=======================================================================
+//function : UpdateOnTransformPersistence
+//purpose :
+//=======================================================================
+void AIS_InteractiveContext::UpdateOnTransformPersistence (const Handle(AIS_InteractiveObject)& theObject)
+{
if (!myObjects.IsBound (theObject))
{
return;
Standard_EXPORT void SetTransformPersistence (const Handle(AIS_InteractiveObject)& theObject,
const Handle(Graphic3d_TransformPers)& theTrsfPers);
+ //! Updates displayed interactive object by checking and recomputing its flagged as "to be recomputed" presentation and selection structures.
+ //! This method does not force any recomputation on its own.
+ //! The method recomputes selections even if they are loaded without activation in particular selector.
+ Standard_EXPORT void UpdateOnTransformPersistence (const Handle(AIS_InteractiveObject)& theIObj);
+
Standard_DEPRECATED("This method is deprecated - SetTransformPersistence() taking Graphic3d_TransformPers should be called instead")
void SetTransformPersistence (const Handle(AIS_InteractiveObject)& theObj,
const Graphic3d_TransModeFlags& theFlag,
}
}
+//-----------------------------------------------------------------------------
+void AIS_InteractiveObject::SetTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers)
+{
+ SelectMgr_SelectableObject::SetTransformPersistence (theTrsfPers);
+
+ if (!GetContext().IsNull())
+ {
+ GetContext()->UpdateOnTransformPersistence (this);
+ }
+}
+
//=======================================================================
//function : HasPresentation
//purpose :
//! Returns the context pointer to the interactive context.
Standard_EXPORT Handle(AIS_InteractiveContext) GetContext() const;
+ //! Sets up Transform Persistence defining a special Local Coordinate system where this object should be located.
+ //! Updates the presentation in context if it is not NULL
+ //! @sa Graphic3d_TransformPers class description
+ Standard_EXPORT virtual void SetTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers);
+
//! Returns TRUE when this object has a presentation in the current DisplayMode()
Standard_EXPORT Standard_Boolean HasPresentation() const;