Version: 9.12.0
SALOME_Actor Class Reference

The class is a basic one for all SALOME VTK presentation. More...

#include <SALOME_Actor.h>

Inheritance diagram for SALOME_Actor:
Inheritance graph

Public Member Functions

 vtkTypeMacro (SALOME_Actor, VTKViewer_Actor) virtual Standard_Boolean hasIO()
 To check, if the SALOME_Actor has a reference to SALOME_InteractiveObject. More...
 
virtual const Handle (SALOME_InteractiveObject) &getIO()
 Get correspoinding reference to SALOME_InteractiveObject. More...
 
virtual void setIO (const Handle(SALOME_InteractiveObject)&theIO)
 Set reference to SALOME_InteractiveObject. More...
 
virtual void setName (const char *theName)
 Name the SALOME_Actor. More...
 
virtual void SetTransform (VTKViewer_Transform *theTransform)
 Apply view transformation. More...
 
virtual void SetPosition (double _arg1, double _arg2, double _arg3)
 Apply additional position. More...
 
virtual void SetPosition (double _arg[3])
 Apply additional position. More...
 
virtual void SetVisibility (int)
 Visibility management. More...
 
virtual bool ShouldBeDisplayed ()
 Gets know whether the actor should be displayed or not. More...
 
virtual void AddToRender (vtkRenderer *theRendere)
 To publish the actor an all its internal devices. More...
 
virtual void RemoveFromRender (vtkRenderer *theRendere)
 To remove the actor an all its internal devices. More...
 
vtkRenderer * GetRenderer ()
 Get reference on renderer where it is published. More...
 
virtual void SetInteractor (vtkRenderWindowInteractor *theInteractor)
 To set interactor in order to use vtkInteractorObserver devices. More...
 
virtual void Update ()
 Put a request to redraw the view. More...
 
virtual void SetSelector (SVTK_Selector *theSelector)
 Set selector in order to the actor at any time can restore current selection. More...
 
virtual void highlight (bool theHighlight)
 Just to update visibility of the highlight devices. More...
 
virtual void Highlight (bool theHighlight)
 To map current selection to VTK representation. More...
 
virtual bool PreHighlight (vtkInteractorStyle *theInteractorStyle, SVTK_SelectionEvent *theSelectionEvent, bool theIsHighlight)
 To process prehighlight (called from SVTK_InteractorStyle) More...
 
virtual bool Highlight (vtkInteractorStyle *theInteractorStyle, SVTK_SelectionEvent *theSelectionEvent, bool theIsHighlight)
 To process highlight (called from SVTK_InteractorStyle) More...
 
virtual bool IsDisplayNameActor () const
 To get flag of displaying of name actor. More...
 
virtual void SetIsDisplayNameActor (bool theIsDisplayNameActor)
 To set flag of displaying of name actor. More...
 
virtual void SetNameActorText (const char *theText)
 To set text of name actor. More...
 
virtual void SetNameActorOffset (double theOffset[2])
 To set offset of name actor. More...
 
virtual void GetNameActorSize (vtkRenderer *theRenderer, double theSize[2]) const
 To get size of name actor. More...
 
virtual void UpdateNameActors ()
 To update visibility of name actors. More...
 
virtual void SetMarkerStd (VTK::MarkerType, VTK::MarkerScale)
 Set standard point marker. More...
 
virtual void SetMarkerTexture (int, VTK::MarkerTexture)
 Set custom point marker. More...
 
virtual VTK::MarkerType GetMarkerType ()
 Get type of the point marker. More...
 
virtual VTK::MarkerScale GetMarkerScale ()
 Get scale of the point marker. More...
 
virtual int GetMarkerTexture ()
 Get texture identifier of the point marker. More...
 
void SetPointPicker (vtkPointPicker *thePointPicker)
 To set up a picker for nodal selection (initialized by SVTK_Renderer::AddActor) More...
 
void SetCellPicker (vtkCellPicker *theCellPicker)
 To set up a picker for cell selection (initialized by SVTK_Renderer::AddActor) More...
 
void SetPointAreaPicker (SVTK_AreaPicker *theAreaPicker)
 To set up a picker for point rectangle selection (initialized by SVTK_Renderer::AddActor) More...
 
void SetCellAreaPicker (SVTK_AreaPicker *theAreaPicker)
 To set up a picker for cell rectangle selection (initialized by SVTK_Renderer::AddActor) More...
 
double * GetGravityCenter (int)
 To find a gravity center of object. More...
 
void SetPreHighlightProperty (vtkProperty *theProperty)
 To set up a prehighlight property (initialized by SVTK_Renderer::AddActor) More...
 
void SetHighlightProperty (vtkProperty *theProperty)
 To set up a highlight property (initialized by SVTK_Renderer::AddActor) More...
 
- Public Member Functions inherited from VTKViewer_Actor
 vtkTypeMacro (VTKViewer_Actor, vtkLODActor) virtual const char *getName()
 Get its name. More...
 
virtual void SetOpacity (double theOpacity)
 Change opacity. More...
 
virtual double GetOpacity ()
 Get current opacity. More...
 
virtual void SetColor (double r, double g, double b)
 Change color. More...
 
virtual void GetColor (double &r, double &g, double &b)
 Get current color. More...
 
virtual void SetColor (const double theRGB[3])
 Change color. More...
 
virtual void SetMaterial (std::vector< vtkProperty * > theProps)
 Change material. More...
 
virtual vtkProperty * GetFrontMaterial ()
 Get current front material. More...
 
virtual vtkProperty * GetBackMaterial ()
 Get current back material. More...
 
virtual vtkIdType GetNodeObjId (vtkIdType theVtkID)
 Maps VTK index of a node to corresponding object index. More...
 
virtual double * GetNodeCoord (vtkIdType theObjID)
 Get coordinates of a node for given object index. More...
 
virtual vtkIdType GetNodeVtkId (vtkIdType theObjID)
 Maps object index of a node to corresponding VTK index. More...
 
virtual vtkIdType GetElemObjId (vtkIdType theVtkID)
 Maps VTK index of a cell to corresponding object index. More...
 
virtual vtkCell * GetElemCell (vtkIdType theObjID)
 Get corresponding #vtkCell for given object index. More...
 
virtual int GetObjDimension (const vtkIdType theObjId)
 Get dimension of corresponding mesh element. More...
 
virtual void SetMapper (vtkMapper *theMapper)
 To insert some additional filters and then sets the given #vtkMapper. More...
 
virtual vtkDataSet * GetInput ()
 Allows to get initial #vtkDataSet. More...
 
virtual vtkMTimeType GetMTime ()
 To calculatate last modified time. More...
 
virtual void SetRepresentation (int theMode)
 Set representation (VTK_SURFACE, VTK_POINTS, VTK_WIREFRAME and so on) More...
 
virtual int GetRepresentation ()
 Get current representation mode. More...
 
virtual int getDisplayMode ()
 Get current display mode (obsolete) More...
 
virtual void setDisplayMode (int theMode)
 Set display mode (obsolete) More...
 
void SetInfinitive (bool theIsInfinite)
 Set infinive flag. More...
 
virtual bool IsInfinitive ()
 Get infinive flag. More...
 
virtual double * GetBounds ()
 To calcualte current bounding box. More...
 
void GetBounds (double bounds[6])
 To calcualte current bounding box. More...
 
virtual bool IsSetCamera () const
 
virtual bool IsResizable () const
 
virtual void SetSize (const double)
 
virtual void SetCamera (vtkCamera *)
 
void SetResolveCoincidentTopology (bool theIsResolve)
 Set ResolveCoincidentTopology flag. More...
 
void SetPolygonOffsetParameters (double factor, double units)
 Set ResolveCoincidentTopology parameters. More...
 
void GetPolygonOffsetParameters (double &factor, double &units)
 Get current ResolveCoincidentTopology parameters. More...
 
virtual void Render (vtkRenderer *, vtkMapper *)
 
virtual double GetShrinkFactor ()
 Get current shrink factor. More...
 
virtual bool IsShrunkable ()
 Is the actor is shrunkable. More...
 
virtual bool IsShrunk ()
 Is the actor is shrunk. More...
 
virtual void SetShrink ()
 Insert shrink filter into pipeline. More...
 
virtual void UnShrink ()
 Remove shrink filter from pipeline. More...
 
virtual void GetChildActors (vtkActorCollection *)
 Used to obtain all dependent actors. More...
 
virtual void EnableSelection (bool)
 Is notified on enabling/disabling selection. More...
 
virtual bool hasHighlight ()
 Ask, if the descendant of the VTKViewer_Actor will implement its own highlight or not. More...
 
virtual bool isHighlighted ()
 Ask, if the VTKViewer_Actor is already highlighted. More...
 
virtual bool isPreselected ()
 Ask, if the VTKViewer_Actor is already preselected. More...
 
virtual void SetPreSelected (bool thePreselect=false)
 Set preselection mode. More...
 
void SetPreviewProperty (vtkProperty *theProperty)
 
virtual void SetQuadraticArcMode (bool theFlag)
 Setting for displaying quadratic elements. More...
 
virtual bool GetQuadraticArcMode () const
 
virtual void SetQuadraticArcAngle (double theMaxAngle)
 
virtual double GetQuadraticArcAngle () const
 
virtual vtkDataSet * GetHighlightedDataSet ()
 Return pointer to the dataset, which used to calculation of the bounding box of the actor. More...
 

Static Public Member Functions

static SALOME_ActorNew ()
 
- Static Public Member Functions inherited from VTKViewer_Actor
static VTKViewer_ActorNew ()
 
static void GetDefaultPolygonOffsetParameters (double &factor, double &units)
 Get default ResolveCoincidentTopology parameters. More...
 

Protected Member Functions

 Handle (SALOME_InteractiveObject) myIO
 
 SALOME_Actor ()
 
 ~SALOME_Actor ()
 
- Protected Member Functions inherited from VTKViewer_Actor
void InitPipeLine (vtkMapper *theMapper)
 
 VTKViewer_Actor ()
 
 ~VTKViewer_Actor ()
 

Protected Attributes

vtkRenderWindowInteractormyInteractor
 
vtkRenderer * myRenderer
 
Selection_Mode mySelectionMode
 
vtkSmartPointer< SVTK_SelectormySelector
 
vtkSmartPointer< vtkPointPicker > myPointPicker
 
vtkSmartPointer< vtkCellPicker > myCellPicker
 
vtkSmartPointer< SVTK_AreaPickermyPointAreaPicker
 
vtkSmartPointer< SVTK_AreaPickermyCellAreaPicker
 
vtkSmartPointer< SVTK_ActormyPreHighlightActor
 
vtkSmartPointer< SVTK_ActormyHighlightActor
 
vtkSmartPointer< VTKViewer_ActormyOutlineActor
 
vtkSmartPointer< vtkOutlineSource > myOutline
 
bool myIsDisplayNameActor
 
vtkSmartPointer< VTKViewer_FramedTextActormyNameActor
 
- Protected Attributes inherited from VTKViewer_Actor
bool myIsResolveCoincidentTopology
 
double myPolygonOffsetFactor
 
double myPolygonOffsetUnits
 
std::string myName
 
double myOpacity
 
int myDisplayMode
 
bool myIsInfinite
 
bool myStoreMapping
 
VTKViewer_GeometryFiltermyGeomFilter
 
VTKViewer_TransformFiltermyTransformFilter
 
std::vector< vtkPassThrough * > myPassFilter
 
int myRepresentation
 
vtkProperty * myProperty
 
vtkProperty * PreviewProperty
 
bool myIsPreselected
 
bool myIsHighlighted
 

Detailed Description

The class is a basic one for all SALOME VTK presentation.

Abstract class of SALOME Objects in VTK.

It provide highlight and prehighlight capabilites, common way to publish and remove VTK presentation, mapping of VTK and object IDs and so on.

Constructor & Destructor Documentation

◆ SALOME_Actor()

SALOME_Actor::SALOME_Actor ( )
protected

◆ ~SALOME_Actor()

SALOME_Actor::~SALOME_Actor ( )
protected

Destructor

Member Function Documentation

◆ AddToRender()

void SALOME_Actor::AddToRender ( vtkRenderer *  theRenderer)
virtual

To publish the actor an all its internal devices.

Publishes the actor in all its internal devices

Reimplemented from VTKViewer_Actor.

◆ GetGravityCenter()

double * SALOME_Actor::GetGravityCenter ( int  theObjId)

To find a gravity center of object.

To find a gravity center of object

Parameters
theObjId- identification of object

◆ GetMarkerScale()

VTK::MarkerScale SALOME_Actor::GetMarkerScale ( )
virtual

Get scale of the point marker.

Get scale of the point marker

Returns
scale of the point marker

◆ GetMarkerTexture()

int SALOME_Actor::GetMarkerTexture ( )
virtual

Get texture identifier of the point marker.

Get texture identifier of the point marker

Returns
texture identifier of the point marker

◆ GetMarkerType()

VTK::MarkerType SALOME_Actor::GetMarkerType ( )
virtual

Get type of the point marker.

Get type of the point marker

Returns
type of the point marker

◆ GetNameActorSize()

void SALOME_Actor::GetNameActorSize ( vtkRenderer *  theRenderer,
double  theSize[2] 
) const
virtual

To get size of name actor.

To get size of name actor

Parameters
theRenderer- renderer
theSize- size of name actor

◆ GetRenderer()

vtkRenderer * SALOME_Actor::GetRenderer ( )

Get reference on renderer where it is published.

Returns
reference on renderer where it is published

◆ Handle() [1/2]

virtual const SALOME_Actor::Handle ( SALOME_InteractiveObject  ) &
virtual

Get correspoinding reference to SALOME_InteractiveObject.

◆ Handle() [2/2]

SALOME_Actor::Handle ( SALOME_InteractiveObject  )
protected

◆ highlight()

void SALOME_Actor::highlight ( bool  theIsHighlight)
virtual

Just to update visibility of the highlight devices.

Updates visibility of the highlight devices

Reimplemented from VTKViewer_Actor.

◆ Highlight() [1/2]

void SALOME_Actor::Highlight ( bool  theIsHighlight)
virtual

To map current selection to VTK representation.

To map current selection to VTK representation

References ActorSelection, BallSelection, CellSelection, EdgeOfCellSelection, EdgeSelection, Elem0DSelection, FaceSelection, NodeSelection, and VolumeSelection.

◆ Highlight() [2/2]

◆ IsDisplayNameActor()

bool SALOME_Actor::IsDisplayNameActor ( ) const
virtual

To get flag of displaying of name actor.

To get flag of displaying of name actor

Returns
flag to display or not to display name actor

◆ New()

static SALOME_Actor* SALOME_Actor::New ( )
static

◆ PreHighlight()

bool SALOME_Actor::PreHighlight ( vtkInteractorStyle theInteractorStyle,
SVTK_SelectionEvent theSelectionEvent,
bool  theIsHighlight 
)
virtual

◆ RemoveFromRender()

void SALOME_Actor::RemoveFromRender ( vtkRenderer *  theRenderer)
virtual

To remove the actor an all its internal devices.

Removes the actor from all its internal devices

Reimplemented from VTKViewer_Actor.

◆ SetCellAreaPicker()

void SALOME_Actor::SetCellAreaPicker ( SVTK_AreaPicker theAreaPicker)

To set up a picker for cell rectangle selection (initialized by SVTK_Renderer::AddActor)

To set up a picker for cell rectangle of polygonal selection (initialized by SVTK_Renderer::AddActor)

Parameters
theAreaPicker- new picker

◆ SetCellPicker()

void SALOME_Actor::SetCellPicker ( vtkCellPicker *  theCellPicker)

To set up a picker for cell selection (initialized by SVTK_Renderer::AddActor)

To set up a picker for cell selection (initialized by SVTK_Renderer::AddActor)

Parameters
theCellPicker- new picker

◆ SetHighlightProperty()

void SALOME_Actor::SetHighlightProperty ( vtkProperty *  theProperty)

To set up a highlight property (initialized by SVTK_Renderer::AddActor)

To set up a highlight property (initialized by SVTK_Renderer::AddActor)

◆ SetInteractor()

void SALOME_Actor::SetInteractor ( vtkRenderWindowInteractor theInteractor)
virtual

To set interactor in order to use vtkInteractorObserver devices.

Sets interactor in order to use vtkInteractorObserver devices

Parameters
theInteractor- new interactor

◆ setIO()

void SALOME_Actor::setIO ( const Handle(SALOME_InteractiveObject)&  theIO)
virtual

Set reference to SALOME_InteractiveObject.

Sets reference to SALOME_InteractiveObject

Parameters
theIO- new SALOME_InteractiveObject

◆ SetIsDisplayNameActor()

void SALOME_Actor::SetIsDisplayNameActor ( bool  theIsDisplayNameActor)
virtual

To set flag of displaying of name actor.

To set flag of displaying of name actor

Parameters
theIsDisplayNameActorflag to display or not to display name actor

References QtxResourceMgr::booleanValue(), SUIT_Session::resourceMgr(), and SUIT_Session::session().

◆ SetMarkerStd()

void SALOME_Actor::SetMarkerStd ( VTK::MarkerType  theMarkerType,
VTK::MarkerScale  theMarkerScale 
)
virtual

Set standard point marker.

Set standard point marker

Parameters
theMarkerTypetype of the marker
theMarkerScalescale of the marker

◆ SetMarkerTexture()

void SALOME_Actor::SetMarkerTexture ( int  theMarkerId,
VTK::MarkerTexture  theMarkerTexture 
)
virtual

Set custom point marker.

Set custom point marker

Parameters
theMarkerIdid of the marker texture
theMarkerTexturemarker texture

◆ setName()

void SALOME_Actor::setName ( const char *  theName)
virtual

Name the SALOME_Actor.

Sets name the SALOME_Actor

Parameters
theName- new name

Reimplemented from VTKViewer_Actor.

◆ SetNameActorOffset()

void SALOME_Actor::SetNameActorOffset ( double  theOffset[2])
virtual

To set offset of name actor.

To set offset of name actor

Parameters
theOffset- offset of name actor

◆ SetNameActorText()

void SALOME_Actor::SetNameActorText ( const char *  theText)
virtual

To set text of name actor.

To set text of name actor

Parameters
theText- text of name actor

◆ SetPointAreaPicker()

void SALOME_Actor::SetPointAreaPicker ( SVTK_AreaPicker theAreaPicker)

To set up a picker for point rectangle selection (initialized by SVTK_Renderer::AddActor)

To set up a picker for point rectangle or polygonal selection (initialized by SVTK_Renderer::AddActor)

Parameters
theAreaPicker- new picker

◆ SetPointPicker()

void SALOME_Actor::SetPointPicker ( vtkPointPicker *  thePointPicker)

To set up a picker for nodal selection (initialized by SVTK_Renderer::AddActor)

To set up a picker for nodal selection (initialized by SVTK_Renderer::AddActor)

Parameters
thePointPicker- new picker

◆ SetPosition() [1/2]

void SALOME_Actor::SetPosition ( double  _arg1,
double  _arg2,
double  _arg3 
)
virtual

Apply additional position.

Apply additional position

◆ SetPosition() [2/2]

void SALOME_Actor::SetPosition ( double  _arg[3])
virtual

Apply additional position.

Apply additional position

◆ SetPreHighlightProperty()

void SALOME_Actor::SetPreHighlightProperty ( vtkProperty *  theProperty)

To set up a prehighlight property (initialized by SVTK_Renderer::AddActor)

To set up a prehighlight property (initialized by SVTK_Renderer::AddActor)

◆ SetSelector()

void SALOME_Actor::SetSelector ( SVTK_Selector theSelector)
virtual

Set selector in order to the actor at any time can restore current selection.

Set selector in order to the actor at any time can restore current selection

Parameters
theSelector- new selector

◆ SetTransform()

void SALOME_Actor::SetTransform ( VTKViewer_Transform theTransform)
virtual

Apply view transformation.

Apply view transformation

Parameters
theTransform- transformation

Reimplemented from VTKViewer_Actor.

◆ SetVisibility()

void SALOME_Actor::SetVisibility ( int  theVisibility)
virtual

Visibility management.

Shows/hides actor

Parameters
theVisibility- new visibility state

References ActorSelection.

◆ ShouldBeDisplayed()

bool SALOME_Actor::ShouldBeDisplayed ( )
virtual

Gets know whether the actor should be displayed or not.

Gets know whether the actor should be displayed or not

◆ Update()

void SALOME_Actor::Update ( )
virtual

Put a request to redraw the view.

Put a request to redraw the view

◆ UpdateNameActors()

void SALOME_Actor::UpdateNameActors ( )
virtual

To update visibility of name actors.

Update visibility of name actors

References VTK::ActorCollectionCopy::GetActors().

◆ vtkTypeMacro()

SALOME_Actor::vtkTypeMacro ( SALOME_Actor  ,
VTKViewer_Actor   
)

To check, if the SALOME_Actor has a reference to SALOME_InteractiveObject.

Member Data Documentation

◆ myCellAreaPicker

vtkSmartPointer<SVTK_AreaPicker> SALOME_Actor::myCellAreaPicker
protected

◆ myCellPicker

vtkSmartPointer<vtkCellPicker> SALOME_Actor::myCellPicker
protected

◆ myHighlightActor

vtkSmartPointer<SVTK_Actor> SALOME_Actor::myHighlightActor
protected

◆ myInteractor

vtkRenderWindowInteractor* SALOME_Actor::myInteractor
protected

◆ myIsDisplayNameActor

bool SALOME_Actor::myIsDisplayNameActor
protected

◆ myNameActor

vtkSmartPointer<VTKViewer_FramedTextActor> SALOME_Actor::myNameActor
protected

◆ myOutline

vtkSmartPointer<vtkOutlineSource> SALOME_Actor::myOutline
protected

◆ myOutlineActor

vtkSmartPointer<VTKViewer_Actor> SALOME_Actor::myOutlineActor
protected

◆ myPointAreaPicker

vtkSmartPointer<SVTK_AreaPicker> SALOME_Actor::myPointAreaPicker
protected

◆ myPointPicker

vtkSmartPointer<vtkPointPicker> SALOME_Actor::myPointPicker
protected

◆ myPreHighlightActor

vtkSmartPointer<SVTK_Actor> SALOME_Actor::myPreHighlightActor
protected

◆ myRenderer

vtkRenderer* SALOME_Actor::myRenderer
protected

◆ mySelectionMode

Selection_Mode SALOME_Actor::mySelectionMode
protected

◆ mySelector

vtkSmartPointer<SVTK_Selector> SALOME_Actor::mySelector
protected

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