1 #include <cpPluginsMeshSources/CylinderSource.h>
2 #include <cpPlugins/Mesh.h>
4 #include <vtkCylinderSource.h>
6 // -------------------------------------------------------------------------
7 cpPluginsMeshSources::CylinderSource::
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 );
19 // -------------------------------------------------------------------------
20 cpPluginsMeshSources::CylinderSource::
25 // -------------------------------------------------------------------------
26 void cpPluginsMeshSources::CylinderSource::
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" ) );
34 this->GetOutput( "Output" )->SetVTK( src->GetOutput( ) );