Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkTextureMapToSphere Class Reference

`#include <vtkTextureMapToSphere.h>`

Inheritance diagram for vtkTextureMapToSphere:

[legend]
Collaboration diagram for vtkTextureMapToSphere:

[legend]
List of all members.

## Detailed Description

generate texture coordinates by mapping points to sphere

Date:
  2002/01/22 15:29:51

Revision:
  1.27

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 vtkTextureMapToBox vtkTransformTexture vtkThresholdTextureCoords

Created by:
  - Schroeder, Will

CVS contributions (if > 5%):
  - Schroeder, Will (71%)
  - Martin, Ken (11%)
  - Lorensen, Bill (7%)

CVS logs (CVSweb):
  - .`cxx` (`/Graphics/vtkTextureMapToSphere.cxx)`
  - .`h` (`/Graphics/vtkTextureMapToSphere.h)`

Examples:
  vtkTextureMapToSphere (Examples)

Tests:
  vtkTextureMapToSphere (Tests)

Definition at line 70 of file vtkTextureMapToSphere.h.

## Public Types

typedef vtkDataSetToDataSetFilter | Superclass

## Public Methods

virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
virtual void | SetCenter (float, float, float)
virtual void | SetCenter (float[3])
virtual float * | GetCenter ()
virtual void | GetCenter (float 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 Methods

int | IsTypeOf (const char *type)
vtkTextureMapToSphere * | SafeDownCast (vtkObject *o)
vtkTextureMapToSphere * | New ()

## Protected Methods

| vtkTextureMapToSphere ()
| ~vtkTextureMapToSphere ()
void | Execute ()

## Protected Attributes

float | Center [3]
int | AutomaticSphereGeneration
int | PreventSeam

## Member Typedef Documentation

typedef vtkDataSetToDataSetFilter vtkTextureMapToSphere::Superclass

| Reimplemented from vtkDataSetToDataSetFilter. Definition at line 73 of file vtkTextureMapToSphere.h.

## Constructor & Destructor Documentation

vtkTextureMapToSphere::vtkTextureMapToSphere | ( |  | ) | `[protected]`

vtkTextureMapToSphere::~vtkTextureMapToSphere | ( |  | ) | `[inline, protected]`

| Definition at line 106 of file vtkTextureMapToSphere.h.

## Member Function Documentation

virtual const char* vtkTextureMapToSphere::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkDataSetToDataSetFilter.

int vtkTextureMapToSphere::IsTypeOf | ( | const char * | type | ) | `[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 vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkDataSetToDataSetFilter.

virtual int vtkTextureMapToSphere::IsA | ( | const char * | type | ) | `[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 vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkDataSetToDataSetFilter.

vtkTextureMapToSphere* vtkTextureMapToSphere::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkDataSetToDataSetFilter.

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

vtkTextureMapToSphere* vtkTextureMapToSphere::New | ( |  | ) | `[static]`

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

virtual void vtkTextureMapToSphere::SetCenter | ( | float | ,
|  | float | ,
|  | float |
| ) | `[virtual]`

| Specify a point defining the center of the sphere.

virtual void vtkTextureMapToSphere::SetCenter | ( | float | [3] | ) | `[virtual]`

| Specify a point defining the center of the sphere.

virtual float* vtkTextureMapToSphere::GetCenter | ( |  | ) | `[virtual]`

| Specify a point defining the center of the sphere.

virtual void vtkTextureMapToSphere::GetCenter | ( | float | data[3] | ) | `[virtual]`

| Specify a point defining the center of the sphere.

virtual void vtkTextureMapToSphere::SetAutomaticSphereGeneration | ( | int |  | ) | `[virtual]`

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

virtual int vtkTextureMapToSphere::GetAutomaticSphereGeneration | ( |  | ) | `[virtual]`

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

virtual void vtkTextureMapToSphere::AutomaticSphereGenerationOn | ( |  | ) | `[virtual]`

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

virtual void vtkTextureMapToSphere::AutomaticSphereGenerationOff | ( |  | ) | `[virtual]`

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

virtual int vtkTextureMapToSphere::GetPreventSeam | ( |  | ) | `[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::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.

void vtkTextureMapToSphere::Execute | ( |  | ) | `[protected, virtual]`

| This method is the old style execute method Reimplemented from vtkSource.

## Member Data Documentation

float vtkTextureMapToSphere::Center[3]`[protected]`

| Definition at line 110 of file vtkTextureMapToSphere.h.

int vtkTextureMapToSphere::AutomaticSphereGeneration`[protected]`

| Definition at line 111 of file vtkTextureMapToSphere.h.

int vtkTextureMapToSphere::PreventSeam`[protected]`

| Definition at line 112 of file vtkTextureMapToSphere.h.

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

- Graphics/vtkTextureMapToSphere.h