]> Creatis software - cpPlugins.git/blob - plugins/MeshSources/CylinderSource.cxx
Code cleaning
[cpPlugins.git] / plugins / MeshSources / CylinderSource.cxx
1 #include <plugins/MeshSources/CylinderSource.h>
2 #include <cpPlugins/Mesh.h>
3
4 #include <vtkCylinderSource.h>
5
6 // -------------------------------------------------------------------------
7 cpPluginsMeshSources::CylinderSource::
8 CylinderSource( )
9   : Superclass( )
10 {
11   this->_AddOutput< cpPlugins::Mesh >( "Output" );
12   this->m_Parameters.ConfigureAsReal( "Height" );
13   this->m_Parameters.ConfigureAsReal( "Radius" );
14   this->m_Parameters.ConfigureAsUint( "Resolution" );
15   this->m_Parameters.SetReal( "Radius", 1 );
16   this->m_Parameters.SetUint( "Resolution", 8 );
17 }
18
19 // -------------------------------------------------------------------------
20 cpPluginsMeshSources::CylinderSource::
21 ~CylinderSource( )
22 {
23 }
24
25 // -------------------------------------------------------------------------
26 void cpPluginsMeshSources::CylinderSource::
27 _GenerateData( )
28 {
29   auto src = this->_CreateVTK< vtkCylinderSource >( );
30   src->SetHeight( this->m_Parameters.GetReal( "Height" ) );
31   src->SetRadius( this->m_Parameters.GetReal( "Radius" ) );
32   src->SetResolution( this->m_Parameters.GetUint( "Resolution" ) );
33   src->Update( );
34   this->GetOutput( "Output" )->SetVTK( src->GetOutput( ) );
35 }
36
37 // eof - $RCSfile$