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" );
13 this->m_Parameters.ConfigureAsUint( "PhiResolution" );
14 this->m_Parameters.ConfigureAsUint( "ThetaResolution" );
15 this->m_Parameters.SetReal( "Radius", 1 );
16 this->m_Parameters.SetUint( "PhiResolution", 8 );
17 this->m_Parameters.SetUint( "ThetaResolution", 8 );
20 // -------------------------------------------------------------------------
21 cpPluginsMeshSources::SphereSource::
26 // -------------------------------------------------------------------------
27 void cpPluginsMeshSources::SphereSource::
30 auto src = this->_CreateVTK< vtkSphereSource >( );
31 src->SetRadius( this->m_Parameters.GetReal( "Radius" ) );
32 src->SetPhiResolution( this->m_Parameters.GetUint( "PhiResolution" ) );
33 src->SetThetaResolution( this->m_Parameters.GetUint( "ThetaResolution" ) );
35 this->GetOutput( "Output" )->SetVTK( src->GetOutput( ) );