Commit 78770551 authored by Mathieu Malaterre's avatar Mathieu Malaterre
Browse files

ENH: Add doc on how to compute cellId

parent aae89130
......@@ -20,7 +20,7 @@
// only provides an interface to access the datasets through iterators.
// .SECTION See Also
// vtkCompositeDataIterator
// vtkCompositeDataIterator
#ifndef __vtkCompositeDataSet_h
#define __vtkCompositeDataSet_h
......@@ -38,7 +38,7 @@ public:
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Return a new (forward) iterator
// Return a new (forward) iterator
// (the iterator has to be deleted by user)
virtual vtkCompositeDataIterator* NewIterator() = 0;
......@@ -57,7 +57,7 @@ public:
// depends on the actual subclass.
virtual void AddDataSet(vtkInformation* index, vtkDataObject* dobj) = 0;
// Description:
// Description:
// Returns a dataset pointed by appropriate keys in the index information
// object. Which keys are used depends on the actual subclass.
virtual vtkDataObject* GetDataSet(vtkInformation* index) = 0;
......
......@@ -18,6 +18,19 @@
// vtkHierarchicalDataSet. The dataset type is restricted to
// vtkUniformGrid. Each dataset has an associated vtkAMRBox
// that represents it's region (similar to extent) in space.
// .SECTION Warning
// To compute the cellId of a cell within a vtkUniformGrid with AMRBox=box,
// you should not use vtkUniformGrid::ComputeCellId( {x,y,z} ) but instead
// use the following pseudo code:
// for (int i=0; i<3; i++)
// {
// cellDims[i] = box.HiCorner[i] - box.LoCorner[i] + 1;
// }
// vtkIdType cellId =
// (z-box.LoCorner[2])*cellDims[0]*cellDims[1] +
// (y-box.LoCorner[1])*cellDims[0] +
// (x-box.LoCorner[0]);
#ifndef __vtkHierarchicalBoxDataSet_h
#define __vtkHierarchicalBoxDataSet_h
......@@ -58,8 +71,8 @@ public:
// Description:
// Get a dataset given a level and an id.
vtkUniformGrid* GetDataSet(unsigned int level,
unsigned int id,
vtkUniformGrid* GetDataSet(unsigned int level,
unsigned int id,
vtkAMRBox& box);
//ETX
vtkDataObject* GetDataSet(unsigned int level, unsigned int id)
......@@ -83,7 +96,7 @@ public:
// Description:
// Shallow and Deep copy.
virtual void ShallowCopy(vtkDataObject *src);
virtual void ShallowCopy(vtkDataObject *src);
virtual void DeepCopy(vtkDataObject *src);
static vtkInformationIntegerVectorKey* BOX();
......
......@@ -73,7 +73,7 @@ public:
virtual void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Return a new (forward) iterator
// Return a new (forward) iterator
// (the iterator has to be deleted by user)
virtual vtkCompositeDataIterator* NewIterator();
......@@ -112,7 +112,7 @@ public:
void InitializeNode(unsigned int group, unsigned int id);
// Description:
// Set the dataset pointer for a given group id and position.
// Set the dataset pointer for a given group id and position.
// NULL pointer is an accepted assignment and will replace
// the dataset. Use NULL pointer to mark a dataset as existant, possibly
// on another processor. Metadata can still be associated with
......@@ -133,7 +133,7 @@ public:
// Description:
// Shallow and Deep copy.
virtual void ShallowCopy(vtkDataObject *src);
virtual void ShallowCopy(vtkDataObject *src);
virtual void DeepCopy(vtkDataObject *src);
// Description:
......@@ -144,7 +144,7 @@ public:
vtkGetObjectMacro(MultiGroupDataInformation,vtkMultiGroupDataInformation);
// Description:
// Set the information about the datasets.
// Set the information about the datasets.
// This is an information object containing the meta-data associated with
// this dataset. This may include things like datatypes, extents...
void SetMultiGroupDataInformation(vtkMultiGroupDataInformation* info);
......
......@@ -31,7 +31,7 @@
#include "vtkVertex.h"
#include "vtkVoxel.h"
vtkCxxRevisionMacro(vtkUniformGrid, "1.12");
vtkCxxRevisionMacro(vtkUniformGrid, "1.13");
vtkStandardNewMacro(vtkUniformGrid);
vtkCxxSetObjectMacro(vtkUniformGrid, PointVisibility,
......@@ -65,7 +65,7 @@ void vtkUniformGrid::CopyStructure(vtkDataSet *ds)
this->Superclass::CopyStructure(ds);
vtkUniformGrid *sPts=vtkUniformGrid::SafeDownCast(ds);
vtkUniformGrid *sPts = vtkUniformGrid::SafeDownCast(ds);
if (!sPts)
{
return;
......
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