Version: 9.12.0
GEOM_Actor Class Reference

This class allows to display an OpenCASCADE CAD model in a VTK viewer.

#include <GEOM_Actor.h>

Inheritance diagram for GEOM_Actor:
Inheritance graph

Public Types

enum  EDisplayMode { eWireframe , eShading , eShadingWithEdges = eShading + 2 }
 

Public Member Functions

 vtkTypeMacro (GEOM_Actor, SALOME_Actor) static GEOM_Actor *New()
 
void SetShape (const TopoDS_Shape &theShape, double theDeflection, bool theIsVector=false)
 
void SetDeflection (double theDeflection)
 
double GetDeflection () const
 
void AddToRender (vtkRenderer *theRenderer)
 
void RemoveFromRender (vtkRenderer *theRenderer)
 
void SetSelected (bool theIsSelected)
 
bool IsSelected () const
 
void SetHighlightProperty (vtkProperty *Prop)
 
void SetWireframeProperty (vtkProperty *Prop)
 
void SetShadingProperty (vtkProperty *Prop)
 
vtkPropertyGetWireframeProperty ()
 
vtkPropertyGetShadingProperty ()
 
vtkPropertyGetIsolatedEdgeProperty ()
 
vtkPropertyGetVertexProperty ()
 
vtkPropertyGetStandaloneVertexProperty ()
 
vtkPropertyGetSharedEdgeProperty ()
 
vtkPropertyGetFaceEdgeProperty ()
 
virtual void setDisplayMode (int thenewmode)
 
virtual void Render (vtkRenderer *, vtkMapper *)
 
void ReleaseGraphicsResources (vtkWindow *)
 
const TopoDS_Shape & getTopo ()
 
void setInputShape (const TopoDS_Shape &ashape, double adef1, int imode, bool isVector=false)
 
double isVector ()
 
void SubShapeOn ()
 
void SubShapeOff ()
 
virtual void highlight (bool theHighlight)
 
virtual bool hasHighlight ()
 
void ShallowCopy (vtkProp *prop)
 
void SetOpacity (double opa)
 
double GetOpacity ()
 
void SetColor (double r, double g, double b)
 
void GetColor (double &r, double &g, double &b)
 
void SetPointColor (double r, double g, double b)
 Set color of points Points actor is shown in Wireframe mode only, see SetVisibility() More...
 
void SetIsolatedEdgeColor (double r, double g, double b)
 Set color of standalone edges, wires, vectors This actor is shown in all display mode, see SetVisibility() TODO: check - this color seems to be used not only for standalone edges. More...
 
void SetSharedEdgeColor (double r, double g, double b)
 Set color of shared edges This actor is shown only in wireframe and shading+edges display modes, see SetVisibility() TODO: check - this seems to be not working currently. More...
 
void SetFreeEdgeColor (double r, double g, double b)
 Set color of edges for standalone faces This actor is shown only in wireframe and shading+edges display modes, see SetVisibility() TODO: this color should be used not only for faces. More...
 
void SetEdgesInShadingColor (double r, double g, double b)
 
void SetIsosColor (double r, double g, double b)
 Set color of iso-lines This actor is shown only in wireframe display mode, see SetVisibility() More...
 
void SetLabelColor (double r, double g, double b)
 Set color of labels This actor is shown only if 'Show name' is switched-on, see SetVisibility() More...
 
void SetMaterial (std::vector< vtkProperty * > theProps)
 
vtkPropertyGetFrontMaterial ()
 
vtkPropertyGetBackMaterial ()
 
virtual bool IsInfinitive ()
 
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 void SetVisibility (int)
 Visibility management. More...
 
virtual void SetNbIsos (const int theNb[2])
 IsoLines management. More...
 
virtual void GetNbIsos (int &theNbU, int &theNbV)
 
virtual void SetIsosWidth (const int width)
 
int GetIsosWidth () const
 
virtual void SetWidth (const int width)
 
int GetWidth () const
 
virtual void SetVectorMode (const bool theMode)
 Vector mode management. More...
 
virtual bool GetVectorMode ()
 
virtual void SetVerticesMode (const bool theMode)
 Vertices mode management. More...
 
virtual bool GetVerticesMode ()
 
virtual void SetNameMode (const bool theMode)
 Name mode management. More...
 
virtual bool GetNameMode ()
 
virtual void SetTransform (VTKViewer_Transform *theTransform)
 

Protected Member Functions

void SetModified ()
 
void GetMatrix (vtkCamera *theCam, vtkMatrix4x4 *result)
 
void SetShapeName ()
 
 GEOM_Actor ()
 
 ~GEOM_Actor ()
 

Private Member Functions

virtual void SetMapper (vtkMapper *)
 
 GEOM_Actor (const GEOM_Actor &)
 
void operator= (const GEOM_Actor &)
 

Private Attributes

TopoDS_Shape myShape
 
bool isOnlyVertex
 
double myDeflection
 
bool myIsForced
 
bool myIsSelected
 
bool myVectorMode
 
bool myVerticesMode
 
bool myNameMode
 
PDeviceActor myVertexActor
 
PVertexSource myVertexSource
 
PDeviceActor myStandaloneVertexActor
 
PVertexSource myStandaloneVertexSource
 
PDeviceActor myIsolatedEdgeActor
 
PEdgeSource myIsolatedEdgeSource
 
PDeviceActor myOneFaceEdgeActor
 
PEdgeSource myOneFaceEdgeSource
 
PDeviceActor mySharedEdgeActor
 
PEdgeSource mySharedEdgeSource
 
PDeviceActor myWireframeFaceActor
 
PWFaceSource myWireframeFaceSource
 
PDeviceActor myShadingFaceActor
 
PSFaceSource myShadingFaceSource
 
PDeviceActor myHighlightActor
 
vtkTextActor * myTextActor
 
vtkSmartPointer< vtkPropertymyHighlightProp
 
vtkSmartPointer< vtkPropertymyPreHighlightProp
 
vtkSmartPointer< vtkPropertymyShadingFaceProp
 
vtkSmartPointer< vtkPropertymyShadingBackFaceProp
 
PAppendFilter myAppendFilter
 
PPolyGeomPainterDataMapper myPolyDataMapper
 
double myEdgesInWireframeColor [3]
 
double myEdgesInShadingColor [3]
 
double myIsolatedEdgeColor [3]
 
double mySharedEdgeColor [3]
 
double myOneFaceEdgeColor [3]
 

Member Enumeration Documentation

◆ EDisplayMode

Enumerator
eWireframe 
eShading 
eShadingWithEdges 

Constructor & Destructor Documentation

◆ GEOM_Actor() [1/2]

◆ ~GEOM_Actor()

GEOM_Actor::~GEOM_Actor ( )
protected

◆ GEOM_Actor() [2/2]

GEOM_Actor::GEOM_Actor ( const GEOM_Actor )
private

Member Function Documentation

◆ AddToRender()

◆ GetBackMaterial()

vtkProperty * GEOM_Actor::GetBackMaterial ( )

References myShadingBackFaceProp.

◆ GetColor()

void GEOM_Actor::GetColor ( double &  r,
double &  g,
double &  b 
)

References myShadingFaceProp.

◆ GetDeflection()

double GEOM_Actor::GetDeflection ( ) const
inline

◆ GetFaceEdgeProperty()

vtkProperty * GEOM_Actor::GetFaceEdgeProperty ( )

References myOneFaceEdgeActor.

◆ GetFrontMaterial()

vtkProperty * GEOM_Actor::GetFrontMaterial ( )

References myShadingFaceProp.

◆ GetIsolatedEdgeProperty()

vtkProperty * GEOM_Actor::GetIsolatedEdgeProperty ( )

References myIsolatedEdgeActor.

◆ GetIsosWidth()

int GEOM_Actor::GetIsosWidth ( ) const

References myWireframeFaceActor.

◆ GetMatrix()

void GEOM_Actor::GetMatrix ( vtkCamera *  theCam,
vtkMatrix4x4 *  result 
)
protected

◆ GetNameMode()

bool GEOM_Actor::GetNameMode ( )
virtual

◆ GetNbIsos()

void GEOM_Actor::GetNbIsos ( int &  theNbU,
int &  theNbV 
)
virtual

◆ GetOpacity()

double GEOM_Actor::GetOpacity ( )

References myShadingFaceProp.

◆ GetShadingProperty()

vtkProperty * GEOM_Actor::GetShadingProperty ( )

References myShadingFaceProp.

◆ GetSharedEdgeProperty()

vtkProperty * GEOM_Actor::GetSharedEdgeProperty ( )

References mySharedEdgeActor.

◆ GetStandaloneVertexProperty()

vtkProperty * GEOM_Actor::GetStandaloneVertexProperty ( )

◆ getTopo()

const TopoDS_Shape & GEOM_Actor::getTopo ( )

References myShape.

◆ GetVectorMode()

bool GEOM_Actor::GetVectorMode ( )
virtual

◆ GetVertexProperty()

vtkProperty * GEOM_Actor::GetVertexProperty ( )

References myVertexActor.

◆ GetVerticesMode()

bool GEOM_Actor::GetVerticesMode ( )
virtual

◆ GetWidth()

int GEOM_Actor::GetWidth ( ) const

References myIsolatedEdgeActor.

◆ GetWireframeProperty()

vtkProperty * GEOM_Actor::GetWireframeProperty ( )

References myWireframeFaceActor.

◆ hasHighlight()

virtual bool GEOM_Actor::hasHighlight ( )
inlinevirtual

◆ highlight()

void GEOM_Actor::highlight ( bool  theHighlight)
virtual

◆ Highlight() [1/2]

void GEOM_Actor::Highlight ( bool  theIsHighlight)
virtual

To map current selection to VTK representation

◆ Highlight() [2/2]

bool GEOM_Actor::Highlight ( vtkInteractorStyle *  theInteractorStyle,
SVTK_SelectionEvent *  theSelectionEvent,
bool  theIsHighlight 
)
virtual

To process highlight (called from SVTK_InteractorStyle)

◆ IsInfinitive()

bool GEOM_Actor::IsInfinitive ( )
virtual

References isOnlyVertex, and myShape.

◆ IsSelected()

bool GEOM_Actor::IsSelected ( ) const
inline

◆ isVector()

double GEOM_Actor::isVector ( )

◆ operator=()

void GEOM_Actor::operator= ( const GEOM_Actor )
private

◆ PreHighlight()

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

To process prehighlight (called from SVTK_InteractorStyle)

◆ ReleaseGraphicsResources()

void GEOM_Actor::ReleaseGraphicsResources ( vtkWindow *  )

◆ RemoveFromRender()

◆ Render()

void GEOM_Actor::Render ( vtkRenderer *  ren,
vtkMapper *  theMapper 
)
virtual

◆ SetColor()

void GEOM_Actor::SetColor ( double  r,
double  g,
double  b 
)

◆ SetDeflection()

void GEOM_Actor::SetDeflection ( double  theDeflection)

◆ setDisplayMode()

◆ SetEdgesInShadingColor()

void GEOM_Actor::SetEdgesInShadingColor ( double  r,
double  g,
double  b 
)

References myEdgesInShadingColor.

◆ SetFreeEdgeColor()

void GEOM_Actor::SetFreeEdgeColor ( double  r,
double  g,
double  b 
)

◆ SetHighlightProperty()

void GEOM_Actor::SetHighlightProperty ( vtkProperty Prop)

References myHighlightActor.

◆ setInputShape()

void GEOM_Actor::setInputShape ( const TopoDS_Shape &  ashape,
double  adef1,
int  imode,
bool  isVector = false 
)

◆ SetIsolatedEdgeColor()

void GEOM_Actor::SetIsolatedEdgeColor ( double  r,
double  g,
double  b 
)

◆ SetIsosColor()

void GEOM_Actor::SetIsosColor ( double  r,
double  g,
double  b 
)

References myWireframeFaceActor.

◆ SetIsosWidth()

void GEOM_Actor::SetIsosWidth ( const int  width)
virtual

References myWireframeFaceActor.

◆ SetLabelColor()

void GEOM_Actor::SetLabelColor ( double  r,
double  g,
double  b 
)

References myTextActor.

◆ SetMapper()

void GEOM_Actor::SetMapper ( vtkMapper *  theMapper)
privatevirtual

◆ SetMaterial()

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

◆ SetModified()

◆ SetNameMode()

void GEOM_Actor::SetNameMode ( const bool  theMode)
virtual

◆ SetNbIsos()

void GEOM_Actor::SetNbIsos ( const int  theNb[2])
virtual

◆ SetOpacity()

void GEOM_Actor::SetOpacity ( double  opa)

◆ SetPointColor()

void GEOM_Actor::SetPointColor ( double  r,
double  g,
double  b 
)

◆ SetSelected()

void GEOM_Actor::SetSelected ( bool  theIsSelected)

References myIsSelected, and SetVisibility().

◆ SetShadingProperty()

void GEOM_Actor::SetShadingProperty ( vtkProperty Prop)

References myShadingFaceProp.

◆ SetShape()

◆ SetShapeName()

void GEOM_Actor::SetShapeName ( )
protected

◆ SetSharedEdgeColor()

void GEOM_Actor::SetSharedEdgeColor ( double  r,
double  g,
double  b 
)

◆ SetTransform()

void GEOM_Actor::SetTransform ( VTKViewer_Transform *  theTransform)
virtual

◆ SetVectorMode()

void GEOM_Actor::SetVectorMode ( const bool  theMode)
virtual

◆ SetVerticesMode()

void GEOM_Actor::SetVerticesMode ( const bool  theMode)
virtual

◆ SetVisibility()

◆ SetWidth()

void GEOM_Actor::SetWidth ( const int  width)
virtual

◆ SetWireframeProperty()

void GEOM_Actor::SetWireframeProperty ( vtkProperty Prop)

References myWireframeFaceActor.

◆ ShallowCopy()

void GEOM_Actor::ShallowCopy ( vtkProp *  prop)

◆ SubShapeOff()

void GEOM_Actor::SubShapeOff ( )

◆ SubShapeOn()

void GEOM_Actor::SubShapeOn ( )

◆ vtkTypeMacro()

GEOM_Actor::vtkTypeMacro ( GEOM_Actor  ,
SALOME_Actor   
)

Member Data Documentation

◆ isOnlyVertex

bool GEOM_Actor::isOnlyVertex
private

◆ myAppendFilter

PAppendFilter GEOM_Actor::myAppendFilter
private

◆ myDeflection

double GEOM_Actor::myDeflection
private

◆ myEdgesInShadingColor

double GEOM_Actor::myEdgesInShadingColor[3]
private

◆ myEdgesInWireframeColor

double GEOM_Actor::myEdgesInWireframeColor[3]
private

◆ myHighlightActor

PDeviceActor GEOM_Actor::myHighlightActor
private

◆ myHighlightProp

vtkSmartPointer<vtkProperty> GEOM_Actor::myHighlightProp
private

◆ myIsForced

bool GEOM_Actor::myIsForced
private

◆ myIsolatedEdgeActor

PDeviceActor GEOM_Actor::myIsolatedEdgeActor
private

◆ myIsolatedEdgeColor

double GEOM_Actor::myIsolatedEdgeColor[3]
private

◆ myIsolatedEdgeSource

PEdgeSource GEOM_Actor::myIsolatedEdgeSource
private

◆ myIsSelected

bool GEOM_Actor::myIsSelected
private

◆ myNameMode

bool GEOM_Actor::myNameMode
private

◆ myOneFaceEdgeActor

PDeviceActor GEOM_Actor::myOneFaceEdgeActor
private

◆ myOneFaceEdgeColor

double GEOM_Actor::myOneFaceEdgeColor[3]
private

◆ myOneFaceEdgeSource

PEdgeSource GEOM_Actor::myOneFaceEdgeSource
private

◆ myPolyDataMapper

PPolyGeomPainterDataMapper GEOM_Actor::myPolyDataMapper
private

◆ myPreHighlightProp

vtkSmartPointer<vtkProperty> GEOM_Actor::myPreHighlightProp
private

◆ myShadingBackFaceProp

vtkSmartPointer<vtkProperty> GEOM_Actor::myShadingBackFaceProp
private

◆ myShadingFaceActor

PDeviceActor GEOM_Actor::myShadingFaceActor
private

◆ myShadingFaceProp

vtkSmartPointer<vtkProperty> GEOM_Actor::myShadingFaceProp
private

◆ myShadingFaceSource

PSFaceSource GEOM_Actor::myShadingFaceSource
private

◆ myShape

TopoDS_Shape GEOM_Actor::myShape
private

◆ mySharedEdgeActor

PDeviceActor GEOM_Actor::mySharedEdgeActor
private

◆ mySharedEdgeColor

double GEOM_Actor::mySharedEdgeColor[3]
private

◆ mySharedEdgeSource

PEdgeSource GEOM_Actor::mySharedEdgeSource
private

◆ myStandaloneVertexActor

PDeviceActor GEOM_Actor::myStandaloneVertexActor
private

◆ myStandaloneVertexSource

PVertexSource GEOM_Actor::myStandaloneVertexSource
private

◆ myTextActor

vtkTextActor* GEOM_Actor::myTextActor
private

◆ myVectorMode

bool GEOM_Actor::myVectorMode
private

◆ myVertexActor

PDeviceActor GEOM_Actor::myVertexActor
private

◆ myVertexSource

PVertexSource GEOM_Actor::myVertexSource
private

◆ myVerticesMode

bool GEOM_Actor::myVerticesMode
private

◆ myWireframeFaceActor

PDeviceActor GEOM_Actor::myWireframeFaceActor
private

◆ myWireframeFaceSource

PWFaceSource GEOM_Actor::myWireframeFaceSource
private

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