Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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)
 
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 ()
 

Static Public Member Functions

static GEOM_ActorNew ()
 

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

Enumerator
eWireframe 
eShading 
eShadingWithEdges 

Constructor & Destructor Documentation

GEOM_Actor::~GEOM_Actor ( )
protected
GEOM_Actor::GEOM_Actor ( const GEOM_Actor )
private

Member Function Documentation

vtkProperty * GEOM_Actor::GetBackMaterial ( )

References myShadingBackFaceProp.

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

References myShadingFaceProp.

double GEOM_Actor::GetDeflection ( ) const
inline
vtkProperty * GEOM_Actor::GetFaceEdgeProperty ( )

References myOneFaceEdgeActor.

vtkProperty * GEOM_Actor::GetFrontMaterial ( )

References myShadingFaceProp.

vtkProperty * GEOM_Actor::GetIsolatedEdgeProperty ( )

References myIsolatedEdgeActor.

int GEOM_Actor::GetIsosWidth ( ) const

References myWireframeFaceActor.

void GEOM_Actor::GetMatrix ( vtkCamera *  theCam,
vtkMatrix4x4 *  result 
)
protected
bool GEOM_Actor::GetNameMode ( )
virtual
void GEOM_Actor::GetNbIsos ( int &  theNbU,
int &  theNbV 
)
virtual
double GEOM_Actor::GetOpacity ( )

References myShadingFaceProp.

vtkProperty * GEOM_Actor::GetShadingProperty ( )

References myShadingFaceProp.

vtkProperty * GEOM_Actor::GetSharedEdgeProperty ( )

References mySharedEdgeActor.

vtkProperty * GEOM_Actor::GetStandaloneVertexProperty ( )
const TopoDS_Shape & GEOM_Actor::getTopo ( )

References myShape.

bool GEOM_Actor::GetVectorMode ( )
virtual
vtkProperty * GEOM_Actor::GetVertexProperty ( )

References myVertexActor.

bool GEOM_Actor::GetVerticesMode ( )
virtual
int GEOM_Actor::GetWidth ( ) const

References myIsolatedEdgeActor.

vtkProperty * GEOM_Actor::GetWireframeProperty ( )

References myWireframeFaceActor.

virtual bool GEOM_Actor::hasHighlight ( )
inlinevirtual
void GEOM_Actor::highlight ( bool  theHighlight)
virtual
void GEOM_Actor::Highlight ( bool  theIsHighlight)
virtual

To map current selection to VTK representation

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

To process highlight (called from SVTK_InteractorStyle)

bool GEOM_Actor::IsInfinitive ( )
virtual

References isOnlyVertex, and myShape.

bool GEOM_Actor::IsSelected ( ) const
inline
double GEOM_Actor::isVector ( )
GEOM_Actor * GEOM_Actor::New ( )
static
void GEOM_Actor::operator= ( const GEOM_Actor )
private
bool GEOM_Actor::PreHighlight ( vtkInteractorStyle *  theInteractorStyle,
SVTK_SelectionEvent *  theSelectionEvent,
bool  theIsHighlight 
)
virtual

To process prehighlight (called from SVTK_InteractorStyle)

void GEOM_Actor::ReleaseGraphicsResources ( vtkWindow *  )
void GEOM_Actor::Render ( vtkRenderer *  ren,
vtkMapper *  theMapper 
)
virtual
void GEOM_Actor::SetColor ( double  r,
double  g,
double  b 
)
void GEOM_Actor::SetDeflection ( double  theDeflection)
void GEOM_Actor::SetEdgesInShadingColor ( double  r,
double  g,
double  b 
)

References myEdgesInShadingColor.

void GEOM_Actor::SetFreeEdgeColor ( double  r,
double  g,
double  b 
)
void GEOM_Actor::SetHighlightProperty ( vtkProperty Prop)

References myHighlightActor.

void GEOM_Actor::setInputShape ( const TopoDS_Shape &  ashape,
double  adef1,
int  imode,
bool  isVector = false 
)
void GEOM_Actor::SetIsolatedEdgeColor ( double  r,
double  g,
double  b 
)
void GEOM_Actor::SetIsosColor ( double  r,
double  g,
double  b 
)

References myWireframeFaceActor.

void GEOM_Actor::SetIsosWidth ( const int  width)
virtual

References myWireframeFaceActor.

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

References myTextActor.

void GEOM_Actor::SetMapper ( vtkMapper *  theMapper)
privatevirtual
void GEOM_Actor::SetMaterial ( std::vector< vtkProperty * >  theProps)
void GEOM_Actor::SetNameMode ( const bool  theMode)
virtual
void GEOM_Actor::SetNbIsos ( const int  theNb[2])
virtual
void GEOM_Actor::SetOpacity ( double  opa)
void GEOM_Actor::SetPointColor ( double  r,
double  g,
double  b 
)
void GEOM_Actor::SetSelected ( bool  theIsSelected)

References myIsSelected, and SetVisibility().

void GEOM_Actor::SetShadingProperty ( vtkProperty Prop)

References myShadingFaceProp.

void GEOM_Actor::SetShapeName ( )
protected
void GEOM_Actor::SetSharedEdgeColor ( double  r,
double  g,
double  b 
)
void GEOM_Actor::SetVectorMode ( const bool  theMode)
virtual
void GEOM_Actor::SetVerticesMode ( const bool  theMode)
virtual
void GEOM_Actor::SetWidth ( const int  width)
virtual
void GEOM_Actor::SetWireframeProperty ( vtkProperty Prop)

References myWireframeFaceActor.

void GEOM_Actor::ShallowCopy ( vtkProp *  prop)
void GEOM_Actor::SubShapeOff ( )
void GEOM_Actor::SubShapeOn ( )
GEOM_Actor::vtkTypeMacro ( GEOM_Actor  ,
SALOME_Actor   
)

Member Data Documentation

bool GEOM_Actor::isOnlyVertex
private
PAppendFilter GEOM_Actor::myAppendFilter
private
double GEOM_Actor::myDeflection
private
double GEOM_Actor::myEdgesInShadingColor[3]
private
double GEOM_Actor::myEdgesInWireframeColor[3]
private
PDeviceActor GEOM_Actor::myHighlightActor
private
vtkSmartPointer<vtkProperty> GEOM_Actor::myHighlightProp
private
bool GEOM_Actor::myIsForced
private
PDeviceActor GEOM_Actor::myIsolatedEdgeActor
private
double GEOM_Actor::myIsolatedEdgeColor[3]
private
PEdgeSource GEOM_Actor::myIsolatedEdgeSource
private
bool GEOM_Actor::myIsSelected
private
bool GEOM_Actor::myNameMode
private
PDeviceActor GEOM_Actor::myOneFaceEdgeActor
private
double GEOM_Actor::myOneFaceEdgeColor[3]
private
PEdgeSource GEOM_Actor::myOneFaceEdgeSource
private
PPolyGeomPainterDataMapper GEOM_Actor::myPolyDataMapper
private
vtkSmartPointer<vtkProperty> GEOM_Actor::myPreHighlightProp
private
vtkSmartPointer<vtkProperty> GEOM_Actor::myShadingBackFaceProp
private
PDeviceActor GEOM_Actor::myShadingFaceActor
private
vtkSmartPointer<vtkProperty> GEOM_Actor::myShadingFaceProp
private
PSFaceSource GEOM_Actor::myShadingFaceSource
private
TopoDS_Shape GEOM_Actor::myShape
private
PDeviceActor GEOM_Actor::mySharedEdgeActor
private
double GEOM_Actor::mySharedEdgeColor[3]
private
PEdgeSource GEOM_Actor::mySharedEdgeSource
private
PDeviceActor GEOM_Actor::myStandaloneVertexActor
private
PVertexSource GEOM_Actor::myStandaloneVertexSource
private
vtkTextActor* GEOM_Actor::myTextActor
private
bool GEOM_Actor::myVectorMode
private
PDeviceActor GEOM_Actor::myVertexActor
private
PVertexSource GEOM_Actor::myVertexSource
private
bool GEOM_Actor::myVerticesMode
private
PDeviceActor GEOM_Actor::myWireframeFaceActor
private
PWFaceSource GEOM_Actor::myWireframeFaceSource
private

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