1 #include <MeshSources/CylinderSource.h>
2 #include <cpPlugins/DataObjects/Mesh.h>
4 #include <vtkCylinderSource.h>
6 // -------------------------------------------------------------------------
7 cpPluginsMeshSources::CylinderSource::
11 this->_ConfigureOutput< cpPlugins::DataObjects::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( "Height", 1 );
16 this->m_Parameters.SetReal( "Radius", 1 );
17 this->m_Parameters.SetUint( "Resolution", 8 );
20 // -------------------------------------------------------------------------
21 cpPluginsMeshSources::CylinderSource::
26 // -------------------------------------------------------------------------
27 void cpPluginsMeshSources::CylinderSource::
30 auto src = this->_CreateVTK< vtkCylinderSource >( );
31 src->SetHeight( this->m_Parameters.GetReal( "Height" ) );
32 src->SetRadius( this->m_Parameters.GetReal( "Radius" ) );
33 src->SetResolution( this->m_Parameters.GetUint( "Resolution" ) );
35 this->GetOutput( "Output" )->SetVTK( src->GetOutput( ) );