Commit ee2e3202 authored by Philippe Pébay's avatar Philippe Pébay Committed by Charles Law
Browse files

Running the tests with a hyper tree grid SOURCE now

Change-Id: I0b691deb59fbaee9ff749e72238a81021df0852a
parent 9009026f
......@@ -8,6 +8,7 @@
// This test was written by Charles Law and Philippe Pebay, Kitware 2012
#include "vtkHyperTreeGrid.h"
#include "vtkHyperTreeGridFractalSource.h"
#include "vtkHyperTreeGenerator.h"
#include "vtkCamera.h"
......@@ -30,13 +31,16 @@
int TestHyperTreeGrid( int argc, char* argv[] )
{
vtkNew<vtkHyperTreeGenerator> fractal;
//vtkNew<vtkHyperTreeGenerator> fractal;
vtkNew<vtkHyperTreeGridFractalSource> fractal;
fractal->SetMaximumLevel( 3 );
fractal->DualOn();
fractal->SetGridSize( 3, 2, 2 );
fractal->SetDimension( 3 );
fractal->SetAxisBranchFactor( 3 );
vtkHyperTreeGrid* htGrid = fractal->NewHyperTreeGrid();
//vtkHyperTreeGrid* htGrid = fractal->NewHyperTreeGrid();
fractal->Update();
vtkHyperTreeGrid* htGrid = fractal->GetOutput();
vtkNew<vtkCutter> cut;
vtkNew<vtkPlane> plane;
......@@ -109,7 +113,7 @@ int TestHyperTreeGrid( int argc, char* argv[] )
}
// Clean up
htGrid->Delete();
//htGrid->Delete();
return 0;
}
......@@ -44,15 +44,15 @@ vtkHyperTreeGridFractalSource::vtkHyperTreeGridFractalSource()
this->Dual = false;
// Grid geometry
this->XCoordinates=vtkDoubleArray::New();
this->XCoordinates = vtkDoubleArray::New();
this->XCoordinates->SetNumberOfTuples( 2 );
this->XCoordinates->SetComponent( 0, 0, 0. );
this->XCoordinates->SetComponent( 1, 0, 1. );
this->YCoordinates=vtkDoubleArray::New();
this->YCoordinates = vtkDoubleArray::New();
this->YCoordinates->SetNumberOfTuples( 2 );
this->YCoordinates->SetComponent( 0, 0, 0. );
this->YCoordinates->SetComponent( 1, 0, 1. );
this->ZCoordinates=vtkDoubleArray::New();
this->ZCoordinates = vtkDoubleArray::New();
this->ZCoordinates->SetNumberOfTuples( 2 );
this->ZCoordinates->SetComponent( 0, 0, 0. );
this->ZCoordinates->SetComponent( 1, 0, 1. );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment