Version: 9.15.0
VTKViewer_Actor Class Reference

#include <VTKViewer_Actor.h>

Inheritance diagram for VTKViewer_Actor:
Inheritance graph

Public Member Functions

 vtkTypeMacro (VTKViewer_Actor, vtkLODActor) virtual const char *getName()
 Get its name. More...
 
virtual void setName (const char *theName)
 Name the VTKViewer_Actor. 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 void SetTransform (VTKViewer_Transform *theTransform)
 Apply view transformation. 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 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...
 
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...
 
virtual void highlight (bool theHighlight)
 Just to update visibility of the highlight devices. 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 VTKViewer_ActorNew ()
 
static void GetDefaultPolygonOffsetParameters (double &factor, double &units)
 Get default ResolveCoincidentTopology parameters. More...
 

Protected Member Functions

void InitPipeLine (vtkMapper *theMapper)
 
 VTKViewer_Actor ()
 
 ~VTKViewer_Actor ()
 

Protected Attributes

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
 

Constructor & Destructor Documentation

◆ VTKViewer_Actor()

VTKViewer_Actor::VTKViewer_Actor ( )
protected

◆ ~VTKViewer_Actor()

VTKViewer_Actor::~VTKViewer_Actor ( )
protected

Destructor

Member Function Documentation

◆ AddToRender()

void VTKViewer_Actor::AddToRender ( vtkRenderer *  theRenderer)
virtual

To publish the actor an all its internal devices.

To publish the actor an all its internal devices

Reimplemented in SALOME_Actor.

◆ EnableSelection()

virtual void VTKViewer_Actor::EnableSelection ( bool  )
inlinevirtual

Is notified on enabling/disabling selection.

◆ GetBackMaterial()

vtkProperty * VTKViewer_Actor::GetBackMaterial ( )
virtual

Get current back material.

Get current back material

◆ GetBounds() [1/2]

double * VTKViewer_Actor::GetBounds ( )
virtual

To calcualte current bounding box.

Returns
current bounding box

◆ GetBounds() [2/2]

void VTKViewer_Actor::GetBounds ( double  theBounds[6])

To calcualte current bounding box.

Returns
current bounding box

◆ GetChildActors()

void VTKViewer_Actor::GetChildActors ( vtkActorCollection *  )
virtual

Used to obtain all dependent actors.

Used to obtain all dependent actors

◆ GetColor()

void VTKViewer_Actor::GetColor ( double &  r,
double &  g,
double &  b 
)
virtual

Get current color.

Get color

◆ GetDefaultPolygonOffsetParameters()

void VTKViewer_Actor::GetDefaultPolygonOffsetParameters ( double &  factor,
double &  units 
)
static

Get default ResolveCoincidentTopology parameters.

Get polygon offset parameters

Parameters
factor,units- Opengl polygon offset parameters

◆ getDisplayMode()

int VTKViewer_Actor::getDisplayMode ( )
virtual

Get current display mode (obsolete)

Returns
display mode

◆ GetElemCell()

vtkCell * VTKViewer_Actor::GetElemCell ( vtkIdType  theObjID)
virtual

Get corresponding #vtkCell for given object index.

Get corresponding #vtkCell for given object index

◆ GetElemObjId()

vtkIdType VTKViewer_Actor::GetElemObjId ( vtkIdType  theVtkID)
virtual

Maps VTK index of a cell to corresponding object index.

Maps VTK index of a cell to corresponding object index

◆ GetFrontMaterial()

vtkProperty * VTKViewer_Actor::GetFrontMaterial ( )
virtual

Get current front material.

Get current front material

◆ GetHighlightedDataSet()

vtkDataSet * VTKViewer_Actor::GetHighlightedDataSet ( )
virtual

Return pointer to the dataset, which used to calculation of the bounding box of the actor.

Return pointer to the dataset, which used to calculation of the bounding box of the actor. By default it is the input dataset.

References GetInput().

◆ GetInput()

vtkDataSet * VTKViewer_Actor::GetInput ( )
virtual

Allows to get initial #vtkDataSet.

Allows to get initial #vtkDataSet

◆ GetMTime()

vtkMTimeType VTKViewer_Actor::GetMTime ( )
virtual

To calculatate last modified time.

To calculatate last modified time

◆ GetNodeCoord()

double * VTKViewer_Actor::GetNodeCoord ( vtkIdType  theObjID)
virtual

Get coordinates of a node for given object index.

Get coordinates of a node for given object index

◆ GetNodeObjId()

vtkIdType VTKViewer_Actor::GetNodeObjId ( vtkIdType  theVtkID)
virtual

Maps VTK index of a node to corresponding object index.

Maps VTK index of a node to corresponding object index

◆ GetNodeVtkId()

vtkIdType VTKViewer_Actor::GetNodeVtkId ( vtkIdType  theObjID)
virtual

Maps object index of a node to corresponding VTK index.

Maps object index of a node to corresponding VTK index

◆ GetObjDimension()

int VTKViewer_Actor::GetObjDimension ( const vtkIdType  theObjId)
virtual

Get dimension of corresponding mesh element.

Returns
object dimension. Virtual method should be redifined by derived classes

◆ GetOpacity()

double VTKViewer_Actor::GetOpacity ( )
virtual

Get current opacity.

◆ GetPolygonOffsetParameters()

void VTKViewer_Actor::GetPolygonOffsetParameters ( double &  factor,
double &  units 
)

Get current ResolveCoincidentTopology parameters.

Get polygon offset parameters

Parameters
factor,units- Opengl polygon offset parameters

◆ GetQuadraticArcAngle()

double VTKViewer_Actor::GetQuadraticArcAngle ( ) const
virtual

Return Max angle of the representation 2D quadratic element as arked polygon

References VTKViewer_GeometryFilter::GetQuadraticArcAngle(), and myGeomFilter.

◆ GetQuadraticArcMode()

bool VTKViewer_Actor::GetQuadraticArcMode ( ) const
virtual

Return true if 2D quadratic element displayed as arked polygon

References VTKViewer_GeometryFilter::GetQuadraticArcMode(), and myGeomFilter.

◆ GetRepresentation()

int VTKViewer_Actor::GetRepresentation ( )
virtual

Get current representation mode.

Returns
current representation mode

◆ GetShrinkFactor()

double VTKViewer_Actor::GetShrinkFactor ( )
virtual

Get current shrink factor.

Returns
shrink factor

◆ hasHighlight()

bool VTKViewer_Actor::hasHighlight ( )
virtual

Ask, if the descendant of the VTKViewer_Actor will implement its own highlight or not.

Returns
true if the descendant of the VTKViewer_Actor will implement its own highlight or not

◆ highlight()

void VTKViewer_Actor::highlight ( bool  theIsHighlight)
virtual

Just to update visibility of the highlight devices.

Just to update visibility of the highlight devices

Reimplemented in SALOME_Actor.

◆ InitPipeLine()

void VTKViewer_Actor::InitPipeLine ( vtkMapper *  theMapper)
protected

Initialization

◆ isHighlighted()

bool VTKViewer_Actor::isHighlighted ( )
virtual

Ask, if the VTKViewer_Actor is already highlighted.

Returns
true if the VTKViewer_Actor is already highlighted

◆ IsInfinitive()

bool VTKViewer_Actor::IsInfinitive ( )
virtual

Get infinive flag.

Returns
infinive flag

◆ isPreselected()

bool VTKViewer_Actor::isPreselected ( )
virtual

Ask, if the VTKViewer_Actor is already preselected.

Returns
true if the VTKViewer_Actor is already preselected

◆ IsResizable()

bool VTKViewer_Actor::IsResizable ( ) const
virtual

◆ IsSetCamera()

bool VTKViewer_Actor::IsSetCamera ( ) const
virtual

◆ IsShrunk()

bool VTKViewer_Actor::IsShrunk ( )
virtual

Is the actor is shrunk.

Returns
true if the actor is shrunk

◆ IsShrunkable()

bool VTKViewer_Actor::IsShrunkable ( )
virtual

Is the actor is shrunkable.

Returns
true if the actor is shrunkable

◆ New()

static VTKViewer_Actor* VTKViewer_Actor::New ( )
static

◆ RemoveFromRender()

void VTKViewer_Actor::RemoveFromRender ( vtkRenderer *  theRenderer)
virtual

To remove the actor an all its internal devices.

To remove the actor an all its internal devices

Reimplemented in SALOME_Actor.

◆ Render()

void VTKViewer_Actor::Render ( vtkRenderer *  ren,
vtkMapper *  m 
)
virtual

Renders actor

◆ SetCamera()

void VTKViewer_Actor::SetCamera ( vtkCamera *  )
virtual

◆ SetColor() [1/2]

void VTKViewer_Actor::SetColor ( const double  theRGB[3])
virtual

Change color.

Change color

◆ SetColor() [2/2]

void VTKViewer_Actor::SetColor ( double  r,
double  g,
double  b 
)
virtual

Change color.

Change color

◆ setDisplayMode()

void VTKViewer_Actor::setDisplayMode ( int  theMode)
virtual

Set display mode (obsolete)

Change display mode

◆ SetInfinitive()

void VTKViewer_Actor::SetInfinitive ( bool  theIsInfinite)

Set infinive flag.

Infinitive means actor without size (point for example), which is not taken into account in calculation of boundaries of the scene

◆ SetMapper()

void VTKViewer_Actor::SetMapper ( vtkMapper *  theMapper)
virtual

To insert some additional filters and then sets the given #vtkMapper.

To insert some additional filters and then sets the given #vtkMapper

◆ SetMaterial()

void VTKViewer_Actor::SetMaterial ( std::vector< vtkProperty * >  theProps)
virtual

Change material.

Change material

◆ setName()

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

Name the VTKViewer_Actor.

Sets name

Parameters
theName- new name

Reimplemented in SALOME_Actor.

◆ SetOpacity()

void VTKViewer_Actor::SetOpacity ( double  theOpacity)
virtual

Change opacity.

◆ SetPolygonOffsetParameters()

void VTKViewer_Actor::SetPolygonOffsetParameters ( double  factor,
double  units 
)

Set ResolveCoincidentTopology parameters.

Set polygon offset parameters

Parameters
factor,units- Opengl polygon offset parameters

◆ SetPreSelected()

void VTKViewer_Actor::SetPreSelected ( bool  thePreselect = false)
virtual

Set preselection mode.

Set preselection mode

◆ SetPreviewProperty()

void VTKViewer_Actor::SetPreviewProperty ( vtkProperty *  theProperty)

◆ SetQuadraticArcAngle()

void VTKViewer_Actor::SetQuadraticArcAngle ( double  theMaxAngle)
virtual

Set Max angle for representation 2D quadratic element as arked polygon

References myGeomFilter, and VTKViewer_GeometryFilter::SetQuadraticArcAngle().

◆ SetQuadraticArcMode()

void VTKViewer_Actor::SetQuadraticArcMode ( bool  theFlag)
virtual

Setting for displaying quadratic elements.

On/Off representation 2D quadratic element as arked polygon

References myGeomFilter, and VTKViewer_GeometryFilter::SetQuadraticArcMode().

◆ SetRepresentation()

void VTKViewer_Actor::SetRepresentation ( int  theMode)
virtual

Set representation (VTK_SURFACE, VTK_POINTS, VTK_WIREFRAME and so on)

Set representation (VTK_SURFACE, VTK_POINTS, VTK_WIREFRAME and so on) param theMode - new mode

References VTKViewer::Representation::Insideframe, VTKViewer::Representation::Points, VTKViewer::Representation::Surface, VTKViewer::Representation::SurfaceWithEdges, VTKViewer_POINT_SIZE, and VTKViewer::Representation::Wireframe.

◆ SetResolveCoincidentTopology()

void VTKViewer_Actor::SetResolveCoincidentTopology ( bool  theIsResolve)

Set ResolveCoincidentTopology flag.

Set ResolveCoincidentTopology flag

Parameters
theIsResolve- new flag value

◆ SetShrink()

void VTKViewer_Actor::SetShrink ( )
virtual

Insert shrink filter into pipeline.

Insert shrink filter into pipeline

◆ SetSize()

void VTKViewer_Actor::SetSize ( const double  )
virtual

◆ SetTransform()

void VTKViewer_Actor::SetTransform ( VTKViewer_Transform theTransform)
virtual

Apply view transformation.

Apply view transformation

Parameters
theTransform- view transformation

Reimplemented in SALOME_Actor.

◆ UnShrink()

void VTKViewer_Actor::UnShrink ( )
virtual

Remove shrink filter from pipeline.

Remove shrink filter from pipeline

◆ vtkTypeMacro()

VTKViewer_Actor::vtkTypeMacro ( VTKViewer_Actor  ,
vtkLODActor   
) const

Get its name.

Member Data Documentation

◆ myDisplayMode

int VTKViewer_Actor::myDisplayMode
protected

◆ myGeomFilter

VTKViewer_GeometryFilter* VTKViewer_Actor::myGeomFilter
protected

◆ myIsHighlighted

bool VTKViewer_Actor::myIsHighlighted
protected

◆ myIsInfinite

bool VTKViewer_Actor::myIsInfinite
protected

◆ myIsPreselected

bool VTKViewer_Actor::myIsPreselected
protected

◆ myIsResolveCoincidentTopology

bool VTKViewer_Actor::myIsResolveCoincidentTopology
protected

◆ myName

std::string VTKViewer_Actor::myName
protected

◆ myOpacity

double VTKViewer_Actor::myOpacity
protected

◆ myPassFilter

std::vector<vtkPassThrough*> VTKViewer_Actor::myPassFilter
protected

◆ myPolygonOffsetFactor

double VTKViewer_Actor::myPolygonOffsetFactor
protected

◆ myPolygonOffsetUnits

double VTKViewer_Actor::myPolygonOffsetUnits
protected

◆ myProperty

vtkProperty* VTKViewer_Actor::myProperty
protected

◆ myRepresentation

int VTKViewer_Actor::myRepresentation
protected

◆ myStoreMapping

bool VTKViewer_Actor::myStoreMapping
protected

◆ myTransformFilter

VTKViewer_TransformFilter* VTKViewer_Actor::myTransformFilter
protected

◆ PreviewProperty

vtkProperty* VTKViewer_Actor::PreviewProperty
protected

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