Version: 6.3.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes

SVTK_Renderer Class Reference

#include <SVTK_Renderer.h>

Inheritance diagram for SVTK_Renderer:
Inheritance graph

Public Member Functions

 vtkTypeMacro (SVTK_Renderer, vtkObject)
vtkRenderer * GetDevice ()
 Get its device.
virtual void Initialize (vtkRenderWindowInteractor *theInteractor, SVTK_Selector *theSelector)
 Initialize the class.
virtual void AddActor (VTKViewer_Actor *theActor, bool theIsAdjustActors=true)
 Publishes pointed actor into the renderer.
virtual void RemoveActor (VTKViewer_Actor *theActor, bool theIsAdjustActors=true)
 Removes pointed actor from the renderer.
VTKViewer_TransformGetTransform ()
 Get special container that keeps scaling of the scene.
virtual void SetScale (double theScale[3])
 Allows to apply a scale on the whole scene.
void GetScale (double theScale[3])
 Allows to get a scale that is applied on the whole scene.
void SetSelectionProp (const double &theRed=1, const double &theGreen=1, const double &theBlue=0, const int &theWidth=5)
 Applies color and size (PointSize and LineWidth) of primitives in selection mode.
void SetPreselectionProp (const double &theRed=0, const double &theGreen=1, const double &theBlue=1, const int &theWidth=5)
 Applies color and size (PointSize and LineWidth) of primitives in preselection mode.
void SetSelectionTolerance (const double &theTolNodes=0.025, const double &theTolCell=0.001, const double &theTolObjects=0.025)
 Setup requested tolerance for the picking.
void AdjustActors ()
 Adjust all intenal actors (trihedron and graduated rules) to the scene.
void SetTrihedronSize (vtkFloatingPointType theSize, const bool theRelative=true)
 Set size of the trihedron in percents from bounding box of the scene.
vtkFloatingPointType GetTrihedronSize () const
 Get size of the trihedron in percents from bounding box of the scene.
bool IsTrihedronRelative () const
 Shows if the size of the trihedron is relative.
VTKViewer_TrihedronGetTrihedron ()
 Get trihedron control.
bool IsTrihedronDisplayed ()
 Is trihedron displayed.
void OnViewTrihedron ()
 Toggle trihedron visibility.
void OnAdjustTrihedron ()
 Adjust size of the trihedron to the bounding box of the scene.
SVTK_CubeAxesActor2DGetCubeAxes ()
 Get graduated rules control.
bool IsCubeAxesDisplayed ()
 Is graduated rules displayed.
void OnViewCubeAxes ()
 Toggle graduated rules visibility.
void OnAdjustCubeAxes ()
 Adjust size of the graduated rules to the bounding box of the scene.
void OnFitAll ()
 Fit all presentation in the scene into the window.
void OnResetView ()
 Set camera into predefined state.
void OnResetClippingRange ()
 Reset camera clipping range to adjust the range to the bounding box of the scene.
void OnFrontView ()
 To reset direction of the camera to front view.
void OnBackView ()
 To reset direction of the camera to back view.
void OnTopView ()
 To reset direction of the camera to top view.
void OnBottomView ()
 To reset direction of the camera to bottom view.
void OnRightView ()
 To reset direction of the camera to right view.
void OnLeftView ()
 To reset direction of the camera to left view.
void onClockWiseView ()
 To rotate view 90 degrees clockwise.
void onAntiClockWiseView ()
 To rotate view 90 degrees counterclockwise.

Static Public Member Functions

static SVTK_RendererNew ()

Protected Member Functions

 SVTK_Renderer ()
 ~SVTK_Renderer ()
virtual bool OnAdjustActors ()

Static Protected Member Functions

static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)

Protected Attributes

vtkFloatingPointType myPriority
vtkSmartPointer
< vtkCallbackCommand > 
myEventCallbackCommand
vtkSmartPointer< vtkRenderer > myDevice
vtkRenderWindowInteractormyInteractor
vtkSmartPointer< SVTK_SelectormySelector
vtkSmartPointer
< VTKViewer_Transform
myTransform
vtkSmartPointer< vtkPointPicker > myPointPicker
vtkSmartPointer< vtkCellPicker > myCellPicker
vtkSmartPointer< SVTK_RectPickermyPointRectPicker
vtkSmartPointer< SVTK_RectPickermyCellRectPicker
vtkSmartPointer< vtkProperty > myPreHighlightProperty
vtkSmartPointer< vtkProperty > myHighlightProperty
vtkSmartPointer
< SVTK_CubeAxesActor2D
myCubeAxes
vtkSmartPointer
< VTKViewer_Trihedron
myTrihedron
vtkFloatingPointType myTrihedronSize
bool myIsTrihedronRelative
vtkFloatingPointType myBndBox [6]

Detailed Description

The class is a container for #vtkRenderer instance. Main goal of the class is to apply common behaviour to all SALOME_Actor, like selection and preselection colors. Also, the class is responsible for management of internal actors like trihedron an so on.


Constructor & Destructor Documentation

SVTK_Renderer::SVTK_Renderer ( ) [protected]

Constructor

References ProcessEvents(), SALOME_LINE_WIDTH, and SALOME_POINT_SIZE.

SVTK_Renderer::~SVTK_Renderer ( ) [protected]

Destructor

References VTK.ActorCollectionCopy.GetActors().


Member Function Documentation

SVTK_Renderer.vtkTypeMacro ( SVTK_Renderer  ,
vtkObject   
)
static SVTK_Renderer* SVTK_Renderer.New ( ) [static]
vtkRenderer * SVTK_Renderer::GetDevice ( )
Returns:
renderer's device
void SVTK_Renderer::Initialize ( vtkRenderWindowInteractor theInteractor,
SVTK_Selector theSelector 
) [virtual]

Initialize renderer

void SVTK_Renderer::AddActor ( VTKViewer_Actor theActor,
bool  theIsAdjustActors = true 
) [virtual]

Publishes pointed actor into the renderer

void SVTK_Renderer::RemoveActor ( VTKViewer_Actor theActor,
bool  theIsAdjustActors = true 
) [virtual]

Removes pointed actor from the renderer

VTKViewer_Transform * SVTK_Renderer::GetTransform ( )

Get special container that keeps scaling of the scene

void SVTK_Renderer::SetScale ( double  theScale[3]) [virtual]

Allows to apply a scale on the whole scene

References VTK.ActorCollectionCopy.GetActors().

void SVTK_Renderer::GetScale ( double  theScale[3])

Allows to get a scale that is applied on the whole scene

void SVTK_Renderer::SetSelectionProp ( const double &  theRed = 1,
const double &  theGreen = 1,
const double &  theBlue = 0,
const int &  theWidth = 5 
)

Applies color and size (PointSize and LineWidth) of primitives in selection mode

void SVTK_Renderer::SetPreselectionProp ( const double &  theRed = 0,
const double &  theGreen = 1,
const double &  theBlue = 1,
const int &  theWidth = 5 
)

Applies color and size (PointSize and LineWidth) of primitives in preselection mode

void SVTK_Renderer::SetSelectionTolerance ( const double &  theTolNodes = 0.025,
const double &  theTolCell = 0.001,
const double &  theTolObjects = 0.025 
)

Setup requested tolerance for the picking

void SVTK_Renderer::AdjustActors ( )

Adjusts size of actors

References ResetCameraClippingRange().

void SVTK_Renderer::SetTrihedronSize ( vtkFloatingPointType  theSize,
const bool  theRelative = true 
)

Set size of the trihedron

Parameters:
theSize- new size
theRelative- if it is true, then size is mesured in percents from bounding box of the scene, otherwise - in viewer units
vtkFloatingPointType SVTK_Renderer::GetTrihedronSize ( ) const
Returns:
size of the trihedron in percents from bounding box of the scene
bool SVTK_Renderer::IsTrihedronRelative ( ) const
Returns:
true if the size of the trihedron is relative
VTKViewer_Trihedron * SVTK_Renderer::GetTrihedron ( )
Returns:
trihedron control
bool SVTK_Renderer::IsTrihedronDisplayed ( )
Returns:
true if trihedron is displayed

References VTKViewer_Trihedron.eOn.

void SVTK_Renderer::OnViewTrihedron ( )

Toggle trihedron visibility

void SVTK_Renderer::OnAdjustTrihedron ( )

Adjust size of the trihedron to the bounding box of the scene

SVTK_CubeAxesActor2D * SVTK_Renderer::GetCubeAxes ( )
Returns:
graduated rules control
bool SVTK_Renderer::IsCubeAxesDisplayed ( )
Returns:
true if graduated rules displayed
void SVTK_Renderer::OnViewCubeAxes ( )

Toggle graduated rules visibility

void SVTK_Renderer::OnAdjustCubeAxes ( )

Adjust size of the graduated rules to the bounding box of the scene

void SVTK_Renderer::OnFitAll ( )

Fit all presentation in the scene into the window

References VTKViewer_Trihedron.eOnlyLineOn, ResetCamera(), and ResetCameraClippingRange().

void SVTK_Renderer::OnResetView ( )

Sets camera into predefined state

References VTKViewer_Trihedron.eOnlyLineOn, and ResetCamera().

void SVTK_Renderer::OnResetClippingRange ( )

Reset camera clipping range to adjust the range to the bounding box of the scene

References ResetCameraClippingRange().

void SVTK_Renderer::OnFrontView ( )

To reset direction of the camera to front view

void SVTK_Renderer::OnBackView ( )

To reset direction of the camera to back view

void SVTK_Renderer::OnTopView ( )

To reset direction of the camera to top view

void SVTK_Renderer::OnBottomView ( )

To reset direction of the camera to bottom view

void SVTK_Renderer::OnRightView ( )

To reset direction of the camera to right view

void SVTK_Renderer::OnLeftView ( )

To reset direction of the camera to left view

void SVTK_Renderer::onClockWiseView ( )

To rotate view 90 degrees clockwise

void SVTK_Renderer::onAntiClockWiseView ( )

To rotate view 90 degrees counterclockwise

bool SVTK_Renderer::OnAdjustActors ( ) [protected, virtual]
static void SVTK_Renderer.ProcessEvents ( vtkObject object,
unsigned long  event,
void *  clientdata,
void *  calldata 
) [static, protected]

Field Documentation

vtkSmartPointer<vtkCallbackCommand> SVTK_Renderer.myEventCallbackCommand [protected]
vtkSmartPointer<vtkRenderer> SVTK_Renderer.myDevice [protected]
vtkSmartPointer<SVTK_Selector> SVTK_Renderer.mySelector [protected]
vtkSmartPointer<VTKViewer_Transform> SVTK_Renderer.myTransform [protected]
vtkSmartPointer<vtkPointPicker> SVTK_Renderer.myPointPicker [protected]
vtkSmartPointer<vtkCellPicker> SVTK_Renderer.myCellPicker [protected]
vtkSmartPointer<SVTK_RectPicker> SVTK_Renderer.myPointRectPicker [protected]
vtkSmartPointer<SVTK_RectPicker> SVTK_Renderer.myCellRectPicker [protected]
vtkSmartPointer<vtkProperty> SVTK_Renderer.myPreHighlightProperty [protected]
vtkSmartPointer<vtkProperty> SVTK_Renderer.myHighlightProperty [protected]
vtkSmartPointer<SVTK_CubeAxesActor2D> SVTK_Renderer.myCubeAxes [protected]
vtkSmartPointer<VTKViewer_Trihedron> SVTK_Renderer.myTrihedron [protected]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS