Documentation for vtkTextureMapToCylinder

vtkTextureMapToCylinder - generate texture coordinates by mapping points to cylinder

Super Class: vtkDataSetToDataSetFilter

Description:

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).

 

Caveats:

Since the resulting texture s-coordinate will lie between (0,1), and the origin of the texture coordinates is not user-controllable, you may want to se the class vtkTransformTexture to linearly scale and shift the origin of the texture coordinates.

 

See Also:

vtkTextureMapToPlane vtkTextureMapToSphere vtkTextureMapToBox vtkTransformTexture vtkThresholdTextureCoords

 

Methods:

void vtkTextureMapToCylinder ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
static vtkTextureMapToCylinder *New ()
void SetPoint1 (float ,float ,float )
void SetPoint1 (float *)
float *GetPoint1 ()
void SetPoint2 (float ,float ,float )
void SetPoint2 (float *)
float *GetPoint2 ()
void SetAutomaticCylinderGeneration (int )
int GetAutomaticCylinderGeneration ()
void AutomaticCylinderGenerationOn ()
void AutomaticCylinderGenerationOff ()
void SetPreventSeam (int )
int GetPreventSeam ()
void PreventSeamOn ()
void PreventSeamOff ()
void Execute ()

 

Detailed Method Descriptions:

Create object with cylinder axis parallel to z-axis (points (0,0,-0.5) and (0,0,0.5)). The PreventSeam ivar is set to true. The cylinder is automatically generated.

static vtkTextureMapToCylinder *New ()

Specify the first point defining the cylinder axis,

void SetPoint1 (float ,float ,float )
void SetPoint1 (float *)
float *GetPoint1 ()

Specify the second point defining the cylinder axis,

void SetPoint2 (float ,float ,float )
void SetPoint2 (float *)
float *GetPoint2 ()

Turn on/off automatic cylinder generation. This means it automatically finds the cylinder center and axis.

void SetAutomaticCylinderGeneration (int )
int GetAutomaticCylinderGeneration ()
void AutomaticCylinderGenerationOn ()
void AutomaticCylinderGenerationOff ()

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-ccordinate ranges from 0->1 from 0->360 degrees.

void SetPreventSeam (int )
int GetPreventSeam ()
void PreventSeamOn ()
void PreventSeamOff ()