FreeMat
vtkDirectionEncoder

Section: Visualization Toolkit Volume Rendering Classes

Usage

Given a direction, encode it into an integer value. This value should be less than 65536, which is the maximum number of encoded directions supported by this superclass. A direction encoded is used to encode normals in a volume for use during volume rendering, and the amount of space that is allocated per normal is 2 bytes. This is an abstract superclass - see the subclasses for specific implementation details.

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

  obj = vtkDirectionEncoder

Methods

The class vtkDirectionEncoder 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 vtkDirectionEncoder class.

  • string = obj.GetClassName () - Get the name of this class
  • int = obj.IsA (string name) - Get the name of this class
  • vtkDirectionEncoder = obj.NewInstance () - Get the name of this class
  • vtkDirectionEncoder = obj.SafeDownCast (vtkObject o) - Get the name of this class
  • int = obj.GetEncodedDirection (float n[3]) - Given a normal vector n, return the encoded direction
  • float = obj.GetDecodedGradient (int value) - / Given an encoded value, return a pointer to the normal vector
  • int = obj.GetNumberOfEncodedDirections (void ) - Return the number of encoded directions