FreeMat

- Main Page
- Related Pages

vtkTextureMapToCylinder

Section: Visualization Toolkit Graphics Classes

# Usage

vtkTextureMapToCylinder is a filter that generates 2D texture coordinates by mapping input dataset points onto a cylinder. The cylinder can either be user specified or generated automatically. (The cylinder is generated automatically by computing the axis of the cylinder.) Note that the generated texture coordinates for the s-coordinate ranges from (0-1) (corresponding to angle of 0->360 around axis), while the mapping of the t-coordinate is controlled by the projection of points along the axis.

To specify a cylinder manually, you must provide two points that define the axis of the cylinder. The length of the axis will affect the t-coordinates.

A special ivar controls how the s-coordinate is generated. If PreventSeam is set to true, the s-texture varies from 0->1 and then 1->0 (corresponding to angles of 0->180 and 180->360).

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

      obj = vtkTextureMapToCylinder

# Methods

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

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkTextureMapToCylinder = obj.NewInstance ()`
- `vtkTextureMapToCylinder = obj.SafeDownCast (vtkObject o)`
- `obj.SetPoint1 (double , double , double )` - Specify the first point defining the cylinder axis,
- `obj.SetPoint1 (double a[3])` - Specify the first point defining the cylinder axis,
- `double = obj. GetPoint1 ()` - Specify the first point defining the cylinder axis,
- `obj.SetPoint2 (double , double , double )` - Specify the second point defining the cylinder axis,
- `obj.SetPoint2 (double a[3])` - Specify the second point defining the cylinder axis,
- `double = obj. GetPoint2 ()` - Specify the second point defining the cylinder axis,
- `obj.SetAutomaticCylinderGeneration (int )` - Turn on/off automatic cylinder generation. This means it automatically finds the cylinder center and axis.
- `int = obj.GetAutomaticCylinderGeneration ()` - Turn on/off automatic cylinder generation. This means it automatically finds the cylinder center and axis.
- `obj.AutomaticCylinderGenerationOn ()` - Turn on/off automatic cylinder generation. This means it automatically finds the cylinder center and axis.
- `obj.AutomaticCylinderGenerationOff ()` - Turn on/off automatic cylinder generation. This means it automatically finds the cylinder center and axis.
- `obj.SetPreventSeam (int )` - Control how the texture coordinates are generated. If PreventSeam is set, the s-coordinate ranges from 0->1 and 1->0 corresponding to the angle variation from 0->180 and 180->0. Otherwise, the s-coordinate ranges from 0->1 from 0->360 degrees.
- `int = obj.GetPreventSeam ()` - Control how the texture coordinates are generated. If PreventSeam is set, the s-coordinate ranges from 0->1 and 1->0 corresponding to the angle variation from 0->180 and 180->0. Otherwise, the s-coordinate ranges from 0->1 from 0->360 degrees.
- `obj.PreventSeamOn ()` - Control how the texture coordinates are generated. If PreventSeam is set, the s-coordinate ranges from 0->1 and 1->0 corresponding to the angle variation from 0->180 and 180->0. Otherwise, the s-coordinate ranges from 0->1 from 0->360 degrees.
- `obj.PreventSeamOff ()` - Control how the texture coordinates are generated. If PreventSeam is set, the s-coordinate ranges from 0->1 and 1->0 corresponding to the angle variation from 0->180 and 180->0. Otherwise, the s-coordinate ranges from 0->1 from 0->360 degrees.