VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkTextureMapToSphere Class Reference

generate texture coordinates by mapping points to sphere More...

#include <vtkTextureMapToSphere.h>

Inheritance diagram for vtkTextureMapToSphere:
Inheritance graph
[legend]
Collaboration diagram for vtkTextureMapToSphere:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkDataSetAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkTextureMapToSphereNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetCenter (double, double, double)
virtual void SetCenter (double[3])
virtual doubleGetCenter ()
virtual void GetCenter (double data[3])
virtual void SetAutomaticSphereGeneration (int)
virtual int GetAutomaticSphereGeneration ()
virtual void AutomaticSphereGenerationOn ()
virtual void AutomaticSphereGenerationOff ()
virtual void SetPreventSeam (int)
virtual int GetPreventSeam ()
virtual void PreventSeamOn ()
virtual void PreventSeamOff ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkTextureMapToSphereSafeDownCast (vtkObjectBase *o)
static vtkTextureMapToSphereNew ()

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkTextureMapToSphere ()
 ~vtkTextureMapToSphere ()
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)

Protected Attributes

double Center [3]
int AutomaticSphereGeneration
int PreventSeam

Detailed Description

generate texture coordinates by mapping points to sphere

vtkTextureMapToSphere is a filter that generates 2D texture coordinates by mapping input dataset points onto a sphere. The sphere can either be user specified or generated automatically. (The sphere is generated automatically by computing the center (i.e., averaged coordinates) of the sphere.) Note that the generated texture coordinates range between (0,1). The s-coordinate lies in the angular direction around the z-axis, measured counter-clockwise from the x-axis. The t-coordinate lies in the angular direction measured down from the north pole towards the south pole.

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

Warning:
The resulting texture coordinates will lie between (0,1), and the texture coordinates are determined with respect to the modeler's x-y-z coordinate system. Use the class vtkTransformTextureCoords to linearly scale and shift the origin of the texture coordinates (if necessary).
See also:
vtkTextureMapToPlane vtkTextureMapToCylinder vtkTransformTexture vtkThresholdTextureCoords
Examples:
vtkTextureMapToSphere (Examples)
Tests:
vtkTextureMapToSphere (Tests)

Definition at line 55 of file vtkTextureMapToSphere.h.


Member Typedef Documentation

Reimplemented from vtkDataSetAlgorithm.

Definition at line 58 of file vtkTextureMapToSphere.h.


Constructor & Destructor Documentation

Definition at line 91 of file vtkTextureMapToSphere.h.


Member Function Documentation

static int vtkTextureMapToSphere::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkDataSetAlgorithm.

virtual int vtkTextureMapToSphere::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkDataSetAlgorithm.

Reimplemented from vtkDataSetAlgorithm.

virtual vtkObjectBase* vtkTextureMapToSphere::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkDataSetAlgorithm.

Reimplemented from vtkDataSetAlgorithm.

void vtkTextureMapToSphere::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkDataSetAlgorithm.

Create object with Center (0,0,0) and the PreventSeam ivar is set to true. The sphere center is automatically computed.

Reimplemented from vtkDataSetAlgorithm.

virtual void vtkTextureMapToSphere::SetCenter ( double  ,
double  ,
double   
) [virtual]

Specify a point defining the center of the sphere.

virtual void vtkTextureMapToSphere::SetCenter ( double  [3]) [virtual]

Specify a point defining the center of the sphere.

virtual double* vtkTextureMapToSphere::GetCenter ( ) [virtual]

Specify a point defining the center of the sphere.

virtual void vtkTextureMapToSphere::GetCenter ( double  data[3]) [virtual]

Specify a point defining the center of the sphere.

Turn on/off automatic sphere generation. This means it automatically finds the sphere center.

Turn on/off automatic sphere generation. This means it automatically finds the sphere center.

Turn on/off automatic sphere generation. This means it automatically finds the sphere center.

Turn on/off automatic sphere generation. This means it automatically finds the sphere center.

virtual void vtkTextureMapToSphere::SetPreventSeam ( int  ) [virtual]

Control how the texture coordinates are generated. If PreventSeam is set, the s-coordinate ranges from 0->1 and 1->0 corresponding to the theta angle variation between 0->180 and 180->0 degrees. Otherwise, the s-coordinate ranges from 0->1 between 0->360 degrees.

Control how the texture coordinates are generated. If PreventSeam is set, the s-coordinate ranges from 0->1 and 1->0 corresponding to the theta angle variation between 0->180 and 180->0 degrees. Otherwise, the s-coordinate ranges from 0->1 between 0->360 degrees.

virtual void vtkTextureMapToSphere::PreventSeamOn ( ) [virtual]

Control how the texture coordinates are generated. If PreventSeam is set, the s-coordinate ranges from 0->1 and 1->0 corresponding to the theta angle variation between 0->180 and 180->0 degrees. Otherwise, the s-coordinate ranges from 0->1 between 0->360 degrees.

virtual void vtkTextureMapToSphere::PreventSeamOff ( ) [virtual]

Control how the texture coordinates are generated. If PreventSeam is set, the s-coordinate ranges from 0->1 and 1->0 corresponding to the theta angle variation between 0->180 and 180->0 degrees. Otherwise, the s-coordinate ranges from 0->1 between 0->360 degrees.

This is called within ProcessRequest when a request asks the algorithm to do its work. This is the method you should override to do whatever the algorithm is designed to do. This happens during the fourth pass in the pipeline execution process.

Reimplemented from vtkDataSetAlgorithm.


Member Data Documentation

Definition at line 95 of file vtkTextureMapToSphere.h.

Definition at line 96 of file vtkTextureMapToSphere.h.

Definition at line 97 of file vtkTextureMapToSphere.h.


The documentation for this class was generated from the following file: