X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FMesh.cxx;h=94adb2bb163ae5f47da17ff9e62abb41d22d74c4;hb=f654620df52b811be7bd263a1775c93d29c69a65;hp=0dc2f9aab5ab3872b59cdbf5247d5b614a6c18eb;hpb=2da3b422ceb0b6abfd336200a4ede6efe982ebe2;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Mesh.cxx b/lib/cpPlugins/Interface/Mesh.cxx index 0dc2f9a..94adb2b 100644 --- a/lib/cpPlugins/Interface/Mesh.cxx +++ b/lib/cpPlugins/Interface/Mesh.cxx @@ -10,63 +10,13 @@ SetVTK( vtkObject* mesh ) this->m_VTKObject = mesh; else this->m_VTKObject = NULL; - this->m_Mapper = NULL; - this->m_Actor = NULL; this->Modified( ); } - -// ------------------------------------------------------------------------- -void cpPlugins::Interface::Mesh:: -CreateVTKActor( ) -{ - vtkPolyData* pd = this->GetVTK< vtkPolyData >( ); - if( - pd != NULL && - ( - this->m_Mapper.GetPointer( ) == NULL || - this->m_Actor.GetPointer( ) == NULL - ) - ) - { - double range[ 2 ]; - pd->GetScalarRange( range ); - - this->m_Mapper = vtkSmartPointer< vtkPolyDataMapper >::New( ); - this->m_Actor = vtkSmartPointer< vtkActor >::New( ); - this->m_Mapper->SetInputData( pd ); - this->m_Mapper->UseLookupTableScalarRangeOff( ); - this->m_Mapper->SetScalarRange( - range[ 0 ], ( ( range[ 1 ] - range[ 0 ] ) * 0.75 ) + range[ 0 ] - ); - this->m_Actor->SetMapper( this->m_Mapper ); - this->Modified( ); - - } // fi -} - -// ------------------------------------------------------------------------- -vtkActor* cpPlugins::Interface::Mesh:: -GetVTKActor( ) -{ - return( this->m_Actor ); -} - -// ------------------------------------------------------------------------- -const vtkActor* cpPlugins::Interface::Mesh:: -GetVTKActor( ) const -{ - return( this->m_Actor ); -} - // ------------------------------------------------------------------------- cpPlugins::Interface::Mesh:: Mesh( ) - : Superclass( ), - m_Mapper( NULL ), - m_Actor( NULL ) + : Superclass( ) { - this->m_ClassName = "cpPlugins::Interface::Mesh"; - this->m_ClassCategory = "BasicObject"; } // -------------------------------------------------------------------------