Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 int GetNodeObjId (int theVtkID)
 Maps VTK index of a node to corresponding object index. More...
 
virtual double * GetNodeCoord (int theObjID)
 Get coordinates of a node for given object index. More...
 
virtual int GetElemObjId (int theVtkID)
 Maps VTK index of a cell to corresponding object index. More...
 
virtual vtkCell * GetElemCell (int theObjID)
 Get corresponding #vtkCell for given object index. More...
 
virtual int GetObjDimension (const int 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 enable)
 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 ()
 

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_FramedTextActor
myNameActor
 
- 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
< vtkPassThroughFilter * > 
myPassFilter
 
int myRepresentation
 
vtkProperty * myProperty
 
vtkProperty * PreviewProperty
 
bool myIsPreselected
 
bool myIsHighlighted
 

Detailed Description

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 ( )
protected

Destructor

Member Function Documentation

void SALOME_Actor::AddToRender ( vtkRenderer *  theRenderer)
virtual

Publishes the actor in all its internal devices

Reimplemented from VTKViewer_Actor.

double * SALOME_Actor::GetGravityCenter ( int  theObjId)

To find a gravity center of object

Parameters
theObjId- identification of object
VTK::MarkerScale SALOME_Actor::GetMarkerScale ( )
virtual

Get scale of the point marker

Returns
scale of the point marker
int SALOME_Actor::GetMarkerTexture ( )
virtual

Get texture identifier of the point marker

Returns
texture identifier of the point marker
VTK::MarkerType SALOME_Actor::GetMarkerType ( )
virtual

Get type of the point marker

Returns
type of the point marker
void SALOME_Actor::GetNameActorSize ( vtkRenderer *  theRenderer,
double  theSize[2] 
) const
virtual

To get size of name actor

Parameters
theRenderer- renderer
theSize- size of name actor
vtkRenderer * SALOME_Actor::GetRenderer ( )
Returns
reference on renderer where it is published
virtual const SALOME_Actor::Handle ( SALOME_InteractiveObject  )
virtual
SALOME_Actor::Handle ( SALOME_InteractiveObject  )
protected
Standard_Boolean SALOME_Actor::hasIO ( )
virtual
Returns
true if the SALOME_Actor has a reference to SALOME_InteractiveObject
void SALOME_Actor::highlight ( bool  theIsHighlight)
virtual

Updates visibility of the highlight devices

Reimplemented from VTKViewer_Actor.

void SALOME_Actor::Highlight ( bool  theIsHighlight)
virtual
bool SALOME_Actor::IsDisplayNameActor ( ) const
virtual

To get flag of displaying of name actor

Returns
flag to display or not to display name actor
static SALOME_Actor* SALOME_Actor::New ( )
static
void SALOME_Actor::RemoveFromRender ( vtkRenderer *  theRenderer)
virtual

Removes the actor from all its internal devices

Reimplemented from VTKViewer_Actor.

void SALOME_Actor::SetCellAreaPicker ( SVTK_AreaPicker theAreaPicker)

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

Parameters
theAreaPicker- new picker
void SALOME_Actor::SetCellPicker ( vtkCellPicker *  theCellPicker)

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

Parameters
theCellPicker- new picker
void SALOME_Actor::SetHighlightProperty ( vtkProperty *  theProperty)

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

void SALOME_Actor::SetInteractor ( vtkRenderWindowInteractor theInteractor)
virtual

Sets interactor in order to use vtkInteractorObserver devices

Parameters
theInteractor- new interactor
void SALOME_Actor::setIO ( const Handle(SALOME_InteractiveObject)&  theIO)
virtual

Sets reference to SALOME_InteractiveObject

Parameters
theIO- new SALOME_InteractiveObject
void SALOME_Actor::SetIsDisplayNameActor ( bool  theIsDisplayNameActor)
virtual

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().

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

Set standard point marker

Parameters
theMarkerTypetype of the marker
theMarkerScalescale of the marker
void SALOME_Actor::SetMarkerTexture ( int  theMarkerId,
VTK::MarkerTexture  theMarkerTexture 
)
virtual

Set custom point marker

Parameters
theMarkerIdid of the marker texture
theMarkerTexturemarker texture
void SALOME_Actor::setName ( const char *  theName)
virtual

Sets name the SALOME_Actor

Parameters
theName- new name

Reimplemented from VTKViewer_Actor.

References setName().

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

To set offset of name actor

Parameters
theOffset- offset of name actor
void SALOME_Actor::SetNameActorText ( const char *  theText)
virtual

To set text of name actor

Parameters
theText- text of name actor
void SALOME_Actor::SetPointAreaPicker ( SVTK_AreaPicker theAreaPicker)

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

Parameters
theAreaPicker- new picker
void SALOME_Actor::SetPointPicker ( vtkPointPicker *  thePointPicker)

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

Parameters
thePointPicker- new picker
void SALOME_Actor::SetPosition ( double  _arg1,
double  _arg2,
double  _arg3 
)
virtual

Apply additional position

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

Apply additional position

void SALOME_Actor::SetPreHighlightProperty ( vtkProperty *  theProperty)

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

void SALOME_Actor::SetSelector ( SVTK_Selector theSelector)
virtual

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

Parameters
theSelector- new selector
void SALOME_Actor::SetTransform ( VTKViewer_Transform theTransform)
virtual

Apply view transformation

Parameters
theTransform- transformation

Reimplemented from VTKViewer_Actor.

void SALOME_Actor::SetVisibility ( int  theVisibility)
virtual

Shows/hides actor

Parameters
theVisibility- new visibility state

References ActorSelection.

bool SALOME_Actor::ShouldBeDisplayed ( )
virtual

Gets know whether the actor should be displayed or not

void SALOME_Actor::Update ( )
virtual

Put a request to redraw the view

void SALOME_Actor::UpdateNameActors ( )
virtual

Update visibility of name actors

References VTK::ActorCollectionCopy::GetActors().

SALOME_Actor::vtkTypeMacro ( SALOME_Actor  ,
VTKViewer_Actor   
)

Member Data Documentation

vtkSmartPointer<SVTK_AreaPicker> SALOME_Actor::myCellAreaPicker
protected
vtkSmartPointer<vtkCellPicker> SALOME_Actor::myCellPicker
protected
vtkSmartPointer<SVTK_Actor> SALOME_Actor::myHighlightActor
protected
vtkRenderWindowInteractor* SALOME_Actor::myInteractor
protected
bool SALOME_Actor::myIsDisplayNameActor
protected
vtkSmartPointer<VTKViewer_FramedTextActor> SALOME_Actor::myNameActor
protected
vtkSmartPointer<vtkOutlineSource> SALOME_Actor::myOutline
protected
vtkSmartPointer<VTKViewer_Actor> SALOME_Actor::myOutlineActor
protected
vtkSmartPointer<SVTK_AreaPicker> SALOME_Actor::myPointAreaPicker
protected
vtkSmartPointer<vtkPointPicker> SALOME_Actor::myPointPicker
protected
vtkSmartPointer<SVTK_Actor> SALOME_Actor::myPreHighlightActor
protected
vtkRenderer* SALOME_Actor::myRenderer
protected
Selection_Mode SALOME_Actor::mySelectionMode
protected
vtkSmartPointer<SVTK_Selector> SALOME_Actor::mySelector
protected

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