1 #include <MeshSources/SphereSource.h>
2 #include <cpPlugins/DataObjects/Mesh.h>
4 #include <vtkSphereSource.h>
6 // -------------------------------------------------------------------------
7 cpPluginsMeshSources::SphereSource::
11 this->_ConfigureOutput< cpPlugins::DataObjects::Mesh >( "Output" );
12 this->m_Parameters.ConfigureAsReal( "Radius", 1 );
13 this->m_Parameters.ConfigureAsUint( "PhiResolution", 8 );
14 this->m_Parameters.ConfigureAsUint( "ThetaResolution", 8 );
17 // -------------------------------------------------------------------------
18 cpPluginsMeshSources::SphereSource::
23 // -------------------------------------------------------------------------
24 void cpPluginsMeshSources::SphereSource::
27 auto src = this->_CreateVTK< vtkSphereSource >( );
28 src->SetRadius( this->m_Parameters.GetReal( "Radius" ) );
29 src->SetPhiResolution( this->m_Parameters.GetUint( "PhiResolution" ) );
30 src->SetThetaResolution( this->m_Parameters.GetUint( "ThetaResolution" ) );
32 this->GetOutput( "Output" )->SetVTK( src->GetOutput( ) );