Commit 2db37f0f authored by George Zagaris's avatar George Zagaris
Browse files

ENH: Add global origin ivar in AMR dataset

Added global origin as an ivar in the AMR
dataset.
parent 584b385c
......@@ -58,6 +58,7 @@ vtkHierarchicalBoxDataSet::vtkHierarchicalBoxDataSet()
this->ScalarRange[0] = VTK_DOUBLE_MAX;
this->ScalarRange[1] = VTK_DOUBLE_MIN;
this->PadCellVisibility = false;
this->origin[0] = this->origin[1] = this->origin[3] = 0.0;
}
//----------------------------------------------------------------------------
......@@ -65,6 +66,20 @@ vtkHierarchicalBoxDataSet::~vtkHierarchicalBoxDataSet()
{
}
//----------------------------------------------------------------------------
void vtkHierarchicalBoxDataSet::SetOrigin( const double o[3] )
{
for( int i=0; i < 3; ++i )
this->origin[i] = o[i];
}
//----------------------------------------------------------------------------
void vtkHierarchicalBoxDataSet::GetOrigin( double o[3] )
{
for( int i=0; i < 3; ++i )
o[i] = this->origin[i];
}
//----------------------------------------------------------------------------
vtkCompositeDataIterator* vtkHierarchicalBoxDataSet::NewIterator()
{
......
......@@ -55,6 +55,12 @@ public:
vtkTypeMacro(vtkHierarchicalBoxDataSet,vtkCompositeDataSet);
void PrintSelf(ostream& os, vtkIndent indent);
// Descrition:
// Set & Get the AMR dataset origin
// The origin is essentially the minimum of all the grids.
void SetOrigin( const double origin[3] );
void GetOrigin( double origin[3] );
// Description:
// Return a new iterator (the iterator has to be deleted by user).
virtual vtkCompositeDataIterator* NewIterator();
......@@ -262,6 +268,9 @@ protected:
bool PadCellVisibility;
// Global Origin
double origin[3];
private:
......
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