#include "VTKViewer_Actor.h"
#include "SALOME_Selection.h"
#include "SALOME_ListIteratorOfListIO.hxx"
+#include "SALOME_CubeAxesActor2D.h"
#include <vtkObjectFactory.h>
#include <vtkMath.h>
VTKViewer_InteractorStyleSALOME::VTKViewer_InteractorStyleSALOME()
{
m_Trihedron = 0;
+ m_CubeAxes = 0;
this->MotionFactor = 10.0;
this->State = VTK_INTERACTOR_STYLE_CAMERA_NONE;
this->RadianToDegree = 180.0 / vtkMath::Pi();
m_Trihedron = theTrihedron;
}
+void VTKViewer_InteractorStyleSALOME::setCubeAxes(SALOME_CubeAxesActor2D* theCubeAxes){
+ m_CubeAxes = theCubeAxes;
+}
+
//----------------------------------------------------------------------------
void VTKViewer_InteractorStyleSALOME::RotateXY(int dx, int dy)
{
//----------------------------------------------------------------------------
void VTKViewer_InteractorStyleSALOME::ViewFitAll() {
int aTriedronWasVisible = false;
+ int aCubeAxesWasVisible = false;
if(m_Trihedron){
aTriedronWasVisible = m_Trihedron->GetVisibility() == VTKViewer_Trihedron::eOn;
if(aTriedronWasVisible) m_Trihedron->VisibilityOff();
}
+ if(m_CubeAxes){
+ aCubeAxesWasVisible = m_CubeAxes->GetVisibility();
+ if(aCubeAxesWasVisible) m_CubeAxes->VisibilityOff();
+ }
if(m_Trihedron->GetVisibleActorCount(CurrentRenderer)){
m_Trihedron->VisibilityOff();
+ m_CubeAxes->VisibilityOff();
::ResetCamera(CurrentRenderer);
}else{
m_Trihedron->SetVisibility(VTKViewer_Trihedron::eOnlyLineOn);
+ m_CubeAxes->SetVisibility(2);
::ResetCamera(CurrentRenderer,true);
}
if(aTriedronWasVisible) m_Trihedron->VisibilityOn();
else m_Trihedron->VisibilityOff();
+ if(aCubeAxesWasVisible) m_CubeAxes->VisibilityOn();
+ else m_CubeAxes->VisibilityOff();
::ResetCameraClippingRange(CurrentRenderer);
}