Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
TPrsStd_AISPresentation Class Reference

An attribute to associate an
AIS_InteractiveObject to a label in an AIS viewer.
This attribute works in collaboration with TPrsStd_AISViewer.
Note that all the Set... and Unset... attribute
methods as well as the query methods for
visualization attributes and the HasOwn... test
methods are shortcuts to the respective
AIS_InteractiveObject settings.

#include <TPrsStd_AISPresentation.hxx>

Inheritance diagram for TPrsStd_AISPresentation:
Inheritance graph
[legend]

Public Member Functions

 TPrsStd_AISPresentation ()
void SetDisplayed (const Standard_Boolean B)
void Display (const Standard_Boolean update=Standard_False)
 Display presentation of object in AIS viewer.
If <update> = True then AISObject is recomputed and all
the visualization settings are applied

void Erase (const Standard_Boolean remove=Standard_False)
 Removes the presentation of this AIS
presentation attribute from the TPrsStd_AISViewer.
If remove is true, this AIS presentation attribute
is removed from the interactive context.

void Update ()
 Recompute presentation of object and apply the visualization settings

Standard_GUID GetDriverGUID () const
void SetDriverGUID (const Standard_GUID &guid)
Standard_Boolean IsDisplayed () const
 Returns true if this AIS presentation attribute is displayed.

Handle_AIS_InteractiveObject GetAIS () const
 Returns AIS_InteractiveObject stored in the presentation attribute

Graphic3d_NameOfMaterial Material () const
 Returns the material setting for this presentation attribute.

void SetMaterial (const Graphic3d_NameOfMaterial aName)
 Sets the material aName for this presentation attribute.

Standard_Boolean HasOwnMaterial () const
 Returns true if this presentation attribute already has a material setting.

void UnsetMaterial ()
 Removes the material setting from this presentation attribute.

void SetTransparency (const Standard_Real aValue=0.6)
 Sets the transparency value aValue for this
presentation attribute.
This value is 0.6 by default.

Standard_Real Transparency () const
Standard_Boolean HasOwnTransparency () const
 Returns true if this presentation attribute already has a transparency setting.

void UnsetTransparency ()
 Removes the transparency setting from this presentation attribute.

Quantity_NameOfColor Color () const
void SetColor (const Quantity_NameOfColor aColor)
 Sets the color aColor for this presentation attribute.

Standard_Boolean HasOwnColor () const
 Returns true if this presentation attribute already has a color setting.

void UnsetColor ()
 Removes the color setting from this presentation attribute.

Standard_Real Width () const
void SetWidth (const Standard_Real aWidth)
 Sets the width aWidth for this presentation attribute.

Standard_Boolean HasOwnWidth () const
 Returns true if this presentation attribute already has a width setting.

void UnsetWidth ()
 Removes the width setting from this presentation attribute.

Standard_Integer Mode () const
void SetMode (const Standard_Integer theMode)
Standard_Boolean HasOwnMode () const
void UnsetMode ()
Standard_Integer SelectionMode () const
void SetSelectionMode (const Standard_Integer theSelectionMode)
Standard_Boolean HasOwnSelectionMode () const
void UnsetSelectionMode ()
const Standard_GUIDID () const
 Returns the ID of the attribute.


Handle_TDF_Attribute NewEmpty () const
 Returns an new empty attribute from the good end
type. It is used by the copy algorithm.

void Restore (const Handle< TDF_Attribute > &with)
 Restores the backuped contents from <anAttribute>
into this one. It is used when aborting a
transaction.

void Paste (const Handle< TDF_Attribute > &into, const Handle< TDF_RelocationTable > &RT) const
 This method is different from the "Copy" one,
because it is used when copying an attribute from
a source structure into a target structure. This
method may paste the contents of <me> into
<intoAttribute>.

The given pasted attribute can be full or empty of
its contents. But don't make a NEW! Just set the
contents!

It is possible to use <aRelocationTable> to
get/set the relocation value of a source
attribute.

virtual Handle_TDF_Attribute BackupCopy () const
 Copies the attribute contents into a new other
attribute. It is used by Backup().

virtual void AfterAddition ()
 Something to do after adding an Attribute to a label.

virtual void BeforeRemoval ()
 Something to do before removing an Attribute from
a label.

virtual void BeforeForget ()
 Something to do before forgetting an Attribute to a
label.

virtual void AfterResume ()
 Something to do after resuming an Attribute from
a label.

virtual Standard_Boolean BeforeUndo (const Handle< TDF_AttributeDelta > &anAttDelta, const Standard_Boolean forceIt=Standard_False)
 Something to do before applying <anAttDelta>. The
returned status says if AfterUndo has been
performed (true) or if this callback must be
called once again further (false). If <forceIt> is
set to true, the method MUST perform and return
true. Does nothing by default and returns true.

virtual Standard_Boolean AfterUndo (const Handle< TDF_AttributeDelta > &anAttDelta, const Standard_Boolean forceIt=Standard_False)
 update AIS viewer according to delta

Static Public Member Functions

static const Standard_GUIDGetID ()
 Returns the GUID for TPrsStd_AISPresentation attributes.

static
Handle_TPrsStd_AISPresentation 
Set (const TDF_Label &L, const Standard_GUID &driver)
 Creates or retrieves the presentation attribute on
the label L, and sets the GUID driver.

static void Unset (const TDF_Label &L)
 Delete (if exist) the presentation attribute associated to the label <L>.

static
Handle_TPrsStd_AISPresentation 
Set (const Handle< TDF_Attribute > &master)
 Creates or retrieves the AISPresentation
attribute attached to master.
The GUID of the driver will be the GUID of master.
master is the attribute you want to display.


Constructor & Destructor Documentation


Member Function Documentation

Reimplemented from TDF_Attribute.

Reimplemented from TDF_Attribute.

Reimplemented from TDF_Attribute.

virtual Handle_TDF_Attribute TPrsStd_AISPresentation::BackupCopy ( ) const [virtual]

Reimplemented from TDF_Attribute.

Reimplemented from TDF_Attribute.

Reimplemented from TDF_Attribute.

Reimplemented from TDF_Attribute.

Handle_AIS_InteractiveObject TPrsStd_AISPresentation::GetAIS ( ) const

Implements TDF_Attribute.

Handle_TDF_Attribute TPrsStd_AISPresentation::NewEmpty ( ) const [virtual]

Implements TDF_Attribute.

void TPrsStd_AISPresentation::Paste ( const Handle< TDF_Attribute > &  intoAttribute,
const Handle< TDF_RelocationTable > &  aRelocationTable 
) const [virtual]

Implements TDF_Attribute.

Implements TDF_Attribute.

static Handle_TPrsStd_AISPresentation TPrsStd_AISPresentation::Set ( const TDF_Label L,
const Standard_GUID driver 
) [static]
static Handle_TPrsStd_AISPresentation TPrsStd_AISPresentation::Set ( const Handle< TDF_Attribute > &  master) [static]

The documentation for this class was generated from the following file: