FreeMat
vtkGenericPointIterator

Section: Visualization Toolkit Filtering Classes

Usage

This class (and subclasses) are used to iterate over points. Use it only in conjunction with vtkGenericDataSet (i.e., the adaptor framework).

Typical use is:

 vtkGenericDataSet *dataset;
 vtkGenericPointIterator *it = dataset->NewPointIterator();
 for (it->Begin(); !it->IsAtEnd(); it->Next());
   {
   x=it->GetPosition();
   }
 

To create an instance of class vtkGenericPointIterator, simply invoke its constructor as follows

  obj = vtkGenericPointIterator

Methods

The class vtkGenericPointIterator has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkGenericPointIterator class.

  • string = obj.GetClassName () - Standard VTK construction and type macros.
  • int = obj.IsA (string name) - Standard VTK construction and type macros.
  • vtkGenericPointIterator = obj.NewInstance () - Standard VTK construction and type macros.
  • vtkGenericPointIterator = obj.SafeDownCast (vtkObject o) - Standard VTK construction and type macros.
  • obj.Begin () - Move iterator to first position if any (loop initialization).
  • int = obj.IsAtEnd () - Is the iterator at the end of traversal?
  • obj.Next () - Move the iterator to the next position in the list.
    Precondition:
    not_off: !IsAtEnd()
  • obj.GetPosition (double x[3]) - Get the coordinates of the point at the current iterator position.
    Precondition:
    not_off: !IsAtEnd()
    x_exists: x!=0
  • vtkIdType = obj.GetId () - Return the unique identifier for the point, could be non-contiguous.
    Precondition:
    not_off: !IsAtEnd()