Section: Visualization Toolkit Filtering Classes
The following procedure is used to compute the implicit function value for a point x. Each point of the loop is first projected onto the plane defined by the loop normal. This forms a polygon. Then, to evaluate the implicit function value, inside/outside tests are used to determine if x is inside the polygon, and the distance to the loop boundary is computed (negative values are inside the loop).
One example application of this implicit function class is to draw a loop on the surface of a mesh, and use the loop to clip or extract cells from within the loop. Remember, the selection loop is "infinite" in length, you can use a plane (in boolean combination) to cap the extent of the selection loop. Another trick is to use a connectivity filter to extract the closest region to a given point (i.e., one of the points used to define the selection loop).
To create an instance of class vtkImplicitSelectionLoop, simply invoke its constructor as follows
obj = vtkImplicitSelectionLoop
obj
is an instance of the vtkImplicitSelectionLoop class.
string = obj.GetClassName ()
- Standard VTK methods for printing and type information.
int = obj.IsA (string name)
- Standard VTK methods for printing and type information.
vtkImplicitSelectionLoop = obj.NewInstance ()
- Standard VTK methods for printing and type information.
vtkImplicitSelectionLoop = obj.SafeDownCast (vtkObject o)
- Standard VTK methods for printing and type information.
double = obj.EvaluateFunction (double x[3])
- Evaluate selection loop returning a signed distance.
double = obj.EvaluateFunction (double x, double y, double z)
- Evaluate selection loop returning a signed distance.
obj.EvaluateGradient (double x[3], double n[3])
- Evaluate selection loop returning the gradient.
obj.SetLoop (vtkPoints )
- Set/Get the array of point coordinates defining the loop. There must
be at least three points used to define a loop.
vtkPoints = obj.GetLoop ()
- Set/Get the array of point coordinates defining the loop. There must
be at least three points used to define a loop.
obj.SetAutomaticNormalGeneration (int )
- Turn on/off automatic normal generation. By default, the normal is
computed from the accumulated cross product of the edges. You can also
specify the normal to use.
int = obj.GetAutomaticNormalGeneration ()
- Turn on/off automatic normal generation. By default, the normal is
computed from the accumulated cross product of the edges. You can also
specify the normal to use.
obj.AutomaticNormalGenerationOn ()
- Turn on/off automatic normal generation. By default, the normal is
computed from the accumulated cross product of the edges. You can also
specify the normal to use.
obj.AutomaticNormalGenerationOff ()
- Turn on/off automatic normal generation. By default, the normal is
computed from the accumulated cross product of the edges. You can also
specify the normal to use.
obj.SetNormal (double , double , double )
- Set / get the normal used to determine whether a point is inside or outside
the selection loop.
obj.SetNormal (double a[3])
- Set / get the normal used to determine whether a point is inside or outside
the selection loop.
double = obj. GetNormal ()
- Set / get the normal used to determine whether a point is inside or outside
the selection loop.
long = obj.GetMTime ()
- Overload GetMTime() because we depend on the Loop