From: rkv Date: Fri, 20 Dec 2013 09:07:38 +0000 (+0000) Subject: Fix for the bug #262: Problem with scale Z in VTK. X-Git-Tag: BR_hydro_v_0_6~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1396a93f3c36462b2822ca9f86a8c030504ea613;p=modules%2Fhydro.git Fix for the bug #262: Problem with scale Z in VTK. --- diff --git a/src/HYDROGUI/HYDROGUI_Actor.cxx b/src/HYDROGUI/HYDROGUI_Actor.cxx index 4848a0b1..9b27a1fd 100644 --- a/src/HYDROGUI/HYDROGUI_Actor.cxx +++ b/src/HYDROGUI/HYDROGUI_Actor.cxx @@ -6,6 +6,25 @@ #include #include #include +#include +#include +#include + +HYDROGUI_Actor::HYDROGUI_Actor() +{ + myVertexActor->GetDeviceActor()->SetMapper( myVertexActor->GetDeviceActor()->GetMapper() ); + myIsolatedEdgeActor->GetDeviceActor()->SetMapper( myIsolatedEdgeActor->GetDeviceActor()->GetMapper() ); + myOneFaceEdgeActor->GetDeviceActor()->SetMapper( myOneFaceEdgeActor->GetDeviceActor()->GetMapper() ); + mySharedEdgeActor->GetDeviceActor()->SetMapper( mySharedEdgeActor->GetDeviceActor()->GetMapper() ); + myWireframeFaceActor->GetDeviceActor()->SetMapper( myWireframeFaceActor->GetDeviceActor()->GetMapper() ); + myShadingFaceActor->GetDeviceActor()->SetMapper( myShadingFaceActor->GetDeviceActor()->GetMapper() ); + GEOM_Actor::myHighlightActor->GetDeviceActor()->SetMapper( GEOM_Actor::myHighlightActor->GetDeviceActor()->GetMapper() ); +} + + +HYDROGUI_Actor::~HYDROGUI_Actor() +{ +} HYDROGUI_Actor* HYDROGUI_Actor::New() { @@ -15,26 +34,20 @@ HYDROGUI_Actor* HYDROGUI_Actor::New() } void HYDROGUI_Actor::SetMapper( vtkMapper* theMapper ) -{ - SALOME_Actor::SetMapper(theMapper); -} - -/*double* HYDROGUI_Actor::GetBounds() { - double* aBounds = GEOM_Actor::GetBounds(); - return aBounds; -}*/ + SALOME_Actor::SetMapper( theMapper ); +} void HYDROGUI_Actor::SetTransform( VTKViewer_Transform* theTransform ) { - SALOME_Actor::SetTransform( theTransform ); + Superclass::SetTransform(theTransform); myVertexActor ->GetDeviceActor()->SetTransform( theTransform ); myIsolatedEdgeActor ->GetDeviceActor()->SetTransform( theTransform ); myOneFaceEdgeActor ->GetDeviceActor()->SetTransform( theTransform ); mySharedEdgeActor ->GetDeviceActor()->SetTransform( theTransform ); myWireframeFaceActor->GetDeviceActor()->SetTransform( theTransform ); myShadingFaceActor ->GetDeviceActor()->SetTransform( theTransform ); - myHighlightActor ->GetDeviceActor()->SetTransform( theTransform ); + GEOM_Actor::myHighlightActor->GetDeviceActor()->SetTransform( theTransform ); } void HYDROGUI_Actor::SetShape( const TopoDS_Shape& theShape, diff --git a/src/HYDROGUI/HYDROGUI_Actor.h b/src/HYDROGUI/HYDROGUI_Actor.h index 19d6eb53..68b6e996 100644 --- a/src/HYDROGUI/HYDROGUI_Actor.h +++ b/src/HYDROGUI/HYDROGUI_Actor.h @@ -10,14 +10,17 @@ public: vtkTypeMacro( HYDROGUI_Actor, GEOM_Actor ); static HYDROGUI_Actor* New(); - void SetMapper( vtkMapper* theMapper ); - - //virtual double* GetBounds(); virtual void SetTransform( VTKViewer_Transform* theTransform ); void SetShape(const TopoDS_Shape& theShape, float theDeflection, bool theIsVector = false); + + protected: + virtual void SetMapper(vtkMapper*); + + HYDROGUI_Actor(); + ~HYDROGUI_Actor(); }; #endif diff --git a/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx b/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx index a75f52a9..94d0d405 100644 --- a/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx +++ b/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx @@ -265,7 +265,7 @@ void HYDROGUI_VTKPrsDisplayer::Display( const HYDROData_SequenceOfObjects& theOb } else if ( isChanged ) { - aView->Repaint(); + aView->Repaint( true ); } } }