Skip to content
Snippets Groups Projects
Commit 91aeffa0 authored by Andrew Maclean's avatar Andrew Maclean
Browse files

Reorganising the code.

Former-commit-id: fcdfde7a
parent 901e8d5f
No related branches found
No related tags found
No related merge requests found
......@@ -167,19 +167,19 @@ void MakeElevations(vtkPolyData* src, vtkPolyData* elev);
//! Make a torus as the source.
/*!
@param The vtkPolyData source with normal and scalar data.
@param src - The vtkPolyData source with normal and scalar data.
*/
void MakeTorus(vtkPolyData* src);
//! Make a parametric torus as the source.
/*!
@param The vtkPolyData source with normal and scalar data.
@param src - The vtkPolyData source with normal and scalar data.
*/
void MakeParametricTorus(vtkPolyData* src);
//! Make a parametric hills surface as the source.
/*!
@param The vtkPolyData source with normal and scalar data.
@param src - The vtkPolyData source with normal and scalar data.
*/
void MakeParametricHills(vtkPolyData* src);
......@@ -248,7 +248,28 @@ void MakeGlyphs(
@param iren - the interactor.
*/
void Display(SURFACE_TYPE st, vtkRenderWindowInteractor* iren);
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
//! Make and display the surface.
int main(int, char* [])
{
vtkSmartPointer<vtkRenderWindowInteractor> iren =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
// Select the surface you want displayed.
// Display(TORUS, iren);
// Display(PARAMETRIC_TORUS, iren);
Display(PARAMETRIC_HILLS, iren);
iren->Render();
iren->Start();
return EXIT_SUCCESS;
}
namespace
{
//-----------------------------------------------------------------------------
std::vector<std::vector<double>> MakeBands(
double const dR[2], int const& numberOfBands, bool const& nearestInteger)
......@@ -894,20 +915,5 @@ void Display(SURFACE_TYPE st, vtkRenderWindowInteractor* iren)
ren->GetActiveCamera()->Zoom(1.5);
}
} // end of unnamed namespace
//-----------------------------------------------------------------------------
//! Make and display the surface.
int main(int, char* [])
{
vtkSmartPointer<vtkRenderWindowInteractor> iren =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
// Select the surface you want displayed.
// Display(TORUS, iren);
// Display(PARAMETRIC_TORUS, iren);
Display(PARAMETRIC_HILLS, iren);
iren->Render();
iren->Start();
return EXIT_SUCCESS;
}
......@@ -181,6 +181,26 @@ void Display(SURFACE_TYPE st, vtkRenderWindowInteractor* iren);
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
//! Make and display the surface.
int main(int, char* [])
{
vtkSmartPointer<vtkRenderWindowInteractor> iren =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
// Select the surface you want displayed.
// Display(PLANE, iren);
// Display(SPHERE, iren);
Display(PARAMETRIC_SURFACE, iren);
iren->Render();
iren->Start();
return EXIT_SUCCESS;
}
namespace
{
//-----------------------------------------------------------------------------
std::vector<std::vector<double>> MakeBands(
double const dR[2], int const& numberOfBands, bool const& nearestInteger)
......@@ -654,20 +674,4 @@ void Display(SURFACE_TYPE st, vtkRenderWindowInteractor* iren)
ren->GetActiveCamera()->Zoom(1.5);
}
} // end of unnamed namespace
//-----------------------------------------------------------------------------
//! Make and display the surface.
int main(int, char* [])
{
vtkSmartPointer<vtkRenderWindowInteractor> iren =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
// Select the surface you want displayed.
// Display(PLANE, iren);
// Display(SPHERE, iren);
Display(PARAMETRIC_SURFACE, iren);
iren->Render();
iren->Start();
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment