Open CASCADE Technology 6.6.0
|
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>
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_GUID & | ID () 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_GUID & | GetID () |
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. |
TPrsStd_AISPresentation::TPrsStd_AISPresentation | ( | ) |
virtual void TPrsStd_AISPresentation::AfterAddition | ( | ) | [virtual] |
Reimplemented from TDF_Attribute.
virtual void TPrsStd_AISPresentation::AfterResume | ( | ) | [virtual] |
Reimplemented from TDF_Attribute.
virtual Standard_Boolean TPrsStd_AISPresentation::AfterUndo | ( | const Handle< TDF_AttributeDelta > & | anAttDelta, |
const Standard_Boolean | forceIt = Standard_False |
||
) | [virtual] |
Reimplemented from TDF_Attribute.
virtual Handle_TDF_Attribute TPrsStd_AISPresentation::BackupCopy | ( | ) | const [virtual] |
Reimplemented from TDF_Attribute.
virtual void TPrsStd_AISPresentation::BeforeForget | ( | ) | [virtual] |
Reimplemented from TDF_Attribute.
virtual void TPrsStd_AISPresentation::BeforeRemoval | ( | ) | [virtual] |
Reimplemented from TDF_Attribute.
virtual Standard_Boolean TPrsStd_AISPresentation::BeforeUndo | ( | const Handle< TDF_AttributeDelta > & | anAttDelta, |
const Standard_Boolean | forceIt = Standard_False |
||
) | [virtual] |
Reimplemented from TDF_Attribute.
Quantity_NameOfColor TPrsStd_AISPresentation::Color | ( | ) | const |
void TPrsStd_AISPresentation::Display | ( | const Standard_Boolean | update = Standard_False | ) |
void TPrsStd_AISPresentation::Erase | ( | const Standard_Boolean | remove = Standard_False | ) |
Handle_AIS_InteractiveObject TPrsStd_AISPresentation::GetAIS | ( | ) | const |
Standard_GUID TPrsStd_AISPresentation::GetDriverGUID | ( | ) | const |
static const Standard_GUID& TPrsStd_AISPresentation::GetID | ( | ) | [static] |
Standard_Boolean TPrsStd_AISPresentation::HasOwnColor | ( | ) | const |
Standard_Boolean TPrsStd_AISPresentation::HasOwnMaterial | ( | ) | const |
Standard_Boolean TPrsStd_AISPresentation::HasOwnMode | ( | ) | const |
Standard_Boolean TPrsStd_AISPresentation::HasOwnSelectionMode | ( | ) | const |
Standard_Boolean TPrsStd_AISPresentation::HasOwnTransparency | ( | ) | const |
Standard_Boolean TPrsStd_AISPresentation::HasOwnWidth | ( | ) | const |
const Standard_GUID& TPrsStd_AISPresentation::ID | ( | ) | const [virtual] |
Implements TDF_Attribute.
Standard_Boolean TPrsStd_AISPresentation::IsDisplayed | ( | ) | const |
Graphic3d_NameOfMaterial TPrsStd_AISPresentation::Material | ( | ) | const |
Standard_Integer TPrsStd_AISPresentation::Mode | ( | ) | const |
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.
void TPrsStd_AISPresentation::Restore | ( | const Handle< TDF_Attribute > & | anAttribute | ) | [virtual] |
Implements TDF_Attribute.
Standard_Integer TPrsStd_AISPresentation::SelectionMode | ( | ) | const |
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] |
void TPrsStd_AISPresentation::SetColor | ( | const Quantity_NameOfColor | aColor | ) |
void TPrsStd_AISPresentation::SetDisplayed | ( | const Standard_Boolean | B | ) |
void TPrsStd_AISPresentation::SetDriverGUID | ( | const Standard_GUID & | guid | ) |
void TPrsStd_AISPresentation::SetMaterial | ( | const Graphic3d_NameOfMaterial | aName | ) |
void TPrsStd_AISPresentation::SetMode | ( | const Standard_Integer | theMode | ) |
void TPrsStd_AISPresentation::SetSelectionMode | ( | const Standard_Integer | theSelectionMode | ) |
void TPrsStd_AISPresentation::SetTransparency | ( | const Standard_Real | aValue = 0.6 | ) |
void TPrsStd_AISPresentation::SetWidth | ( | const Standard_Real | aWidth | ) |
Standard_Real TPrsStd_AISPresentation::Transparency | ( | ) | const |
static void TPrsStd_AISPresentation::Unset | ( | const TDF_Label & | L | ) | [static] |
void TPrsStd_AISPresentation::UnsetColor | ( | ) |
void TPrsStd_AISPresentation::UnsetMaterial | ( | ) |
void TPrsStd_AISPresentation::UnsetMode | ( | ) |
void TPrsStd_AISPresentation::UnsetSelectionMode | ( | ) |
void TPrsStd_AISPresentation::UnsetTransparency | ( | ) |
void TPrsStd_AISPresentation::UnsetWidth | ( | ) |
void TPrsStd_AISPresentation::Update | ( | ) |
Standard_Real TPrsStd_AISPresentation::Width | ( | ) | const |