#include <SVTK_Renderer.h>
Public Member Functions | |
vtkTypeMacro (SVTK_Renderer, vtkObject) | |
vtkRenderer * | GetDevice () |
Get its device. More... | |
virtual void | Initialize (vtkRenderWindowInteractor *theInteractor, SVTK_Selector *theSelector) |
Initialize the class. More... | |
virtual void | AddActor (VTKViewer_Actor *theActor, bool theIsAdjustActors=true) |
Publishes pointed actor into the renderer. More... | |
virtual void | RemoveActor (VTKViewer_Actor *theActor, bool theIsAdjustActors=true) |
Removes pointed actor from the renderer. More... | |
VTKViewer_Transform * | GetTransform () |
Get special container that keeps scaling of the scene. More... | |
virtual void | SetScale (double theScale[3]) |
Allows to apply a scale on the whole scene. More... | |
void | GetScale (double theScale[3]) |
Allows to get a scale that is applied on the whole scene. More... | |
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. More... | |
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. More... | |
void | SetSelectionTolerance (const double &theTolNodes=0.025, const double &theTolCell=0.001, const double &theTolObjects=0.025) |
Setup requested tolerance for the picking. More... | |
void | AdjustActors () |
Adjust all intenal actors (trihedron and graduated rules) to the scene. More... | |
void | SetTrihedronSize (double theSize, const bool theRelative=true) |
Set size of the trihedron in percents from bounding box of the scene. More... | |
double | GetTrihedronSize () const |
Get size of the trihedron in percents from bounding box of the scene. More... | |
bool | IsTrihedronRelative () const |
Shows if the size of the trihedron is relative. More... | |
VTKViewer_Trihedron * | GetTrihedron () |
Get trihedron control. More... | |
bool | IsTrihedronDisplayed () |
Is trihedron displayed. More... | |
void | OnViewTrihedron () |
Toggle trihedron visibility. More... | |
void | SetTrihedronVisibility (const bool) |
Set Toggle trihedron visibility. More... | |
void | OnAdjustTrihedron () |
Adjust size of the trihedron to the bounding box of the scene. More... | |
SVTK_CubeAxesActor2D * | GetCubeAxes () |
Get graduated rules control. More... | |
bool | IsCubeAxesDisplayed () |
Is graduated rules displayed. More... | |
void | OnViewCubeAxes () |
Toggle graduated rules visibility. More... | |
void | OnAdjustCubeAxes () |
Adjust size of the graduated rules to the bounding box of the scene. More... | |
void | OnFitAll () |
Fit all presentation in the scene into the window. More... | |
void | onFitSelection () |
Fit all selected presentation in the scene. More... | |
void | OnResetView () |
Set camera into predefined state. More... | |
void | OnResetClippingRange () |
Reset camera clipping range to adjust the range to the bounding box of the scene. More... | |
void | OnFrontView () |
To reset direction of the camera to front view. More... | |
void | OnBackView () |
To reset direction of the camera to back view. More... | |
void | OnTopView () |
To reset direction of the camera to top view. More... | |
void | OnBottomView () |
To reset direction of the camera to bottom view. More... | |
void | OnRightView () |
To reset direction of the camera to right view. More... | |
void | OnLeftView () |
To reset direction of the camera to left view. More... | |
void | onClockWiseView () |
To rotate view 90 degrees clockwise. More... | |
void | onAntiClockWiseView () |
To rotate view 90 degrees counterclockwise. More... | |
Static Public Member Functions | |
static SVTK_Renderer * | New () |
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 | |
double | myPriority |
vtkSmartPointer < vtkCallbackCommand > | myEventCallbackCommand |
vtkSmartPointer< vtkRenderer > | myDevice |
vtkRenderWindowInteractor * | myInteractor |
vtkSmartPointer< SVTK_Selector > | mySelector |
vtkSmartPointer < VTKViewer_Transform > | myTransform |
vtkSmartPointer< vtkPointPicker > | myPointPicker |
vtkSmartPointer< vtkCellPicker > | myCellPicker |
vtkSmartPointer< SVTK_AreaPicker > | myPointAreaPicker |
vtkSmartPointer< SVTK_AreaPicker > | myCellAreaPicker |
vtkSmartPointer< vtkProperty > | myPreHighlightProperty |
vtkSmartPointer< vtkProperty > | myHighlightProperty |
vtkSmartPointer < SVTK_CubeAxesActor2D > | myCubeAxes |
vtkSmartPointer < VTKViewer_Trihedron > | myTrihedron |
double | myTrihedronSize |
bool | myIsTrihedronRelative |
double | myBndBox [6] |
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.
|
protected |
Constructor
References ProcessEvents(), SALOME_LINE_WIDTH, and SALOME_POINT_SIZE.
|
protected |
Destructor
References VTK::ActorCollectionCopy::GetActors().
|
virtual |
Publishes pointed actor into the renderer
void SVTK_Renderer::AdjustActors | ( | ) |
Adjusts size of actors
References ResetCameraClippingRange().
SVTK_CubeAxesActor2D * SVTK_Renderer::GetCubeAxes | ( | ) |
vtkRenderer * SVTK_Renderer::GetDevice | ( | ) |
void SVTK_Renderer::GetScale | ( | double | theScale[3] | ) |
Allows to get a scale that is applied on the whole scene
VTKViewer_Transform * SVTK_Renderer::GetTransform | ( | ) |
Get special container that keeps scaling of the scene
VTKViewer_Trihedron * SVTK_Renderer::GetTrihedron | ( | ) |
double SVTK_Renderer::GetTrihedronSize | ( | ) | const |
|
virtual |
Initialize renderer
bool SVTK_Renderer::IsCubeAxesDisplayed | ( | ) |
bool SVTK_Renderer::IsTrihedronDisplayed | ( | ) |
References VTKViewer_Trihedron::eOn.
bool SVTK_Renderer::IsTrihedronRelative | ( | ) | const |
|
static |
|
protectedvirtual |
Adjusts size of actors
References CheckBndBox(), ComputeTrihedronSize(), and VTK::ActorCollectionCopy::GetActors().
void SVTK_Renderer::OnAdjustCubeAxes | ( | ) |
Adjust size of the graduated rules to the bounding box of the scene
void SVTK_Renderer::OnAdjustTrihedron | ( | ) |
Adjust size of the trihedron to the bounding box of the scene
void SVTK_Renderer::onAntiClockWiseView | ( | ) |
To rotate view 90 degrees counterclockwise
void SVTK_Renderer::OnBackView | ( | ) |
To reset direction of the camera to back view
void SVTK_Renderer::OnBottomView | ( | ) |
To reset direction of the camera to bottom view
void SVTK_Renderer::onClockWiseView | ( | ) |
To rotate view 90 degrees clockwise
void SVTK_Renderer::OnFitAll | ( | ) |
Fit all presentation in the scene into the window
References VTKViewer_Trihedron::eOnlyLineOn, ResetCamera(), and ResetCameraClippingRange().
void SVTK_Renderer::onFitSelection | ( | ) |
Fit all selected presentation in the scene
References ComputeBounds(), VTK::ActorCollectionCopy::GetActors(), GetDevice(), Handle(), isBoundValid(), and mySelector.
void SVTK_Renderer::OnFrontView | ( | ) |
To reset direction of the camera to front view
void SVTK_Renderer::OnLeftView | ( | ) |
To reset direction of the camera to left view
void SVTK_Renderer::OnResetClippingRange | ( | ) |
Reset camera clipping range to adjust the range to the bounding box of the scene
References ResetCameraClippingRange().
void SVTK_Renderer::OnResetView | ( | ) |
Sets camera into predefined state
References VTKViewer_Trihedron::eOnlyLineOn, and ResetCamera().
void SVTK_Renderer::OnRightView | ( | ) |
To reset direction of the camera to right view
void SVTK_Renderer::OnTopView | ( | ) |
To reset direction of the camera to top view
void SVTK_Renderer::OnViewCubeAxes | ( | ) |
Toggle graduated rules visibility
void SVTK_Renderer::OnViewTrihedron | ( | ) |
Toggle trihedron visibility
|
staticprotected |
Main process event method
References OnResetView().
|
virtual |
Removes pointed actor from the renderer
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
|
virtual |
Allows to apply a scale on the whole scene
References VTK::ActorCollectionCopy::GetActors().
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::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::SetTrihedronSize | ( | double | theSize, |
const bool | theRelative = true |
||
) |
Set size of the trihedron
theSize | - new size |
theRelative | - if it is true, then size is mesured in percents from bounding box of the scene, otherwise - in viewer units |
void SVTK_Renderer::SetTrihedronVisibility | ( | const bool | show | ) |
Set trihedron visibility
SVTK_Renderer::vtkTypeMacro | ( | SVTK_Renderer | , |
vtkObject | |||
) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |