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

# vtkSphereSource Class Reference

`#include <vtkSphereSource.h>`

Inheritance diagram for vtkSphereSource:

[legend]
Collaboration diagram for vtkSphereSource:

[legend]
List of all members.

## Detailed Description

create a polygonal sphere centered at the origin

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

Revision:
  1.50

vtkSphereSource creates a sphere (represented by polygons) of specified radius centered at the origin. The resolution (polygonal discretization) in both the latitude (phi) and longitude (theta) directions can be specified. It also is possible to create partial spheres by specifying maximum phi and theta angles. By default, the surface tessellation of the sphere uses triangles; however you can set LatLongTessellation to produce a tessellation using quadrilaterals.

Warning:
  Resolution means the number of latitude or longitude lines for a complete sphere. If you create partial spheres the number of latitude/longitude lines may be off by one.

Created by:
  - Schroeder, Will

CVS contributions (if > 5%):
  - Schroeder, Will (45%)
  - Henderson, Amy (28%)
  - Lorensen, Bill (10%)
  - Martin, Ken (5%)

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

Examples:
  vtkSphereSource (Examples)

Tests:
  vtkSphereSource (Tests)

Definition at line 61 of file vtkSphereSource.h.

## Public Types
typedef vtkPolyDataSource | Superclass
## Public Methods
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
virtual void | SetRadius (float)
virtual float | GetRadius ()
virtual void | SetCenter (float, float, float)
virtual void | SetCenter (float[3])
virtual float * | GetCenter ()
virtual void | GetCenter (float data[3])
virtual void | SetThetaResolution (int)
virtual int | GetThetaResolution ()
virtual void | SetPhiResolution (int)
virtual int | GetPhiResolution ()
virtual void | SetStartTheta (float)
virtual float | GetStartTheta ()
virtual void | SetEndTheta (float)
virtual float | GetEndTheta ()
virtual void | SetStartPhi (float)
virtual float | GetStartPhi ()
virtual void | SetEndPhi (float)
virtual float | GetEndPhi ()
virtual void | SetLatLongTessellation (int)
virtual int | GetLatLongTessellation ()
virtual void | LatLongTessellationOn ()
virtual void | LatLongTessellationOff ()
## Static Public Methods
int | IsTypeOf (const char *type)
vtkSphereSource * | SafeDownCast (vtkObject *o)
vtkSphereSource * | New ()
## Protected Methods
| vtkSphereSource (int res=8)
| ~vtkSphereSource ()
void | Execute ()
void | ExecuteInformation ()
## Protected Attributes
float | Radius
float | Center [3]
int | ThetaResolution
int | PhiResolution
float | StartTheta
float | EndTheta
float | StartPhi
float | EndPhi
int | LatLongTessellation

## Member Typedef Documentation

typedef vtkPolyDataSource vtkSphereSource::Superclass

| Reimplemented from vtkPolyDataSource. Reimplemented in vtkPSphereSource. Definition at line 64 of file vtkSphereSource.h.

## Constructor & Destructor Documentation

vtkSphereSource::vtkSphereSource | ( | int | res = 8 | ) | `[protected]`

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

| Definition at line 137 of file vtkSphereSource.h.

## Member Function Documentation

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

| Reimplemented from vtkPolyDataSource. Reimplemented in vtkPSphereSource.

int vtkSphereSource::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 vtkPolyDataSource. Reimplemented in vtkPSphereSource.

virtual int vtkSphereSource::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 vtkPolyDataSource. Reimplemented in vtkPSphereSource.

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

| Reimplemented from vtkPolyDataSource. Reimplemented in vtkPSphereSource.

void vtkSphereSource::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 vtkPolyDataSource. Reimplemented in vtkPSphereSource.

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

| Construct sphere with radius=0.5 and default resolution 8 in both Phi and Theta directions. Theta ranges from (0,360) and phi (0,180) degrees. Reimplemented from vtkObject. Reimplemented in vtkPSphereSource.

virtual void vtkSphereSource::SetRadius | ( | float |  | ) | `[virtual]`

| Set radius of sphere. Default is .5.

virtual float vtkSphereSource::GetRadius | ( |  | ) | `[virtual]`

| Set radius of sphere. Default is .5.

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

| Set the center of the sphere. Default is 0,0,0.

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

| Set the center of the sphere. Default is 0,0,0.

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

| Set the center of the sphere. Default is 0,0,0.

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

| Set the center of the sphere. Default is 0,0,0.

virtual void vtkSphereSource::SetThetaResolution | ( | int |  | ) | `[virtual]`

| Set the number of points in the longitude direction (ranging from StartTheta to EndTheta).

virtual int vtkSphereSource::GetThetaResolution | ( |  | ) | `[virtual]`

| Set the number of points in the longitude direction (ranging from StartTheta to EndTheta).

virtual void vtkSphereSource::SetPhiResolution | ( | int |  | ) | `[virtual]`

| Set the number of points in the latitude direction (ranging from StartPhi to EndPhi).

virtual int vtkSphereSource::GetPhiResolution | ( |  | ) | `[virtual]`

| Set the number of points in the latitude direction (ranging from StartPhi to EndPhi).

virtual void vtkSphereSource::SetStartTheta | ( | float |  | ) | `[virtual]`

| Set the starting longitude angle. By default StartTheta=0 degrees.

virtual float vtkSphereSource::GetStartTheta | ( |  | ) | `[virtual]`

| Set the starting longitude angle. By default StartTheta=0 degrees.

virtual void vtkSphereSource::SetEndTheta | ( | float |  | ) | `[virtual]`

| Set the ending longitude angle. By default EndTheta=360 degrees.

virtual float vtkSphereSource::GetEndTheta | ( |  | ) | `[virtual]`

| Set the ending longitude angle. By default EndTheta=360 degrees.

virtual void vtkSphereSource::SetStartPhi | ( | float |  | ) | `[virtual]`

| Set the starting latitude angle (0 is at north pole). By default StartPhi=0 degrees.

virtual float vtkSphereSource::GetStartPhi | ( |  | ) | `[virtual]`

| Set the starting latitude angle (0 is at north pole). By default StartPhi=0 degrees.

virtual void vtkSphereSource::SetEndPhi | ( | float |  | ) | `[virtual]`

| Set the ending latitude angle. By default EndPhi=180 degrees.

virtual float vtkSphereSource::GetEndPhi | ( |  | ) | `[virtual]`

| Set the ending latitude angle. By default EndPhi=180 degrees.

virtual void vtkSphereSource::SetLatLongTessellation | ( | int |  | ) | `[virtual]`

| Cause the sphere to be tessellated with edges along the latitude and longitude lines. If off, triangles are generated at non-polar regions, which results in edges that are not parallel to latitude and longitude lines. If on, quadrilaterals are generated everywhere except at the poles. This can be useful for generating a wireframe sphere with natural latitude and longitude lines.

virtual int vtkSphereSource::GetLatLongTessellation | ( |  | ) | `[virtual]`

| Cause the sphere to be tessellated with edges along the latitude and longitude lines. If off, triangles are generated at non-polar regions, which results in edges that are not parallel to latitude and longitude lines. If on, quadrilaterals are generated everywhere except at the poles. This can be useful for generating a wireframe sphere with natural latitude and longitude lines.

virtual void vtkSphereSource::LatLongTessellationOn | ( |  | ) | `[virtual]`

| Cause the sphere to be tessellated with edges along the latitude and longitude lines. If off, triangles are generated at non-polar regions, which results in edges that are not parallel to latitude and longitude lines. If on, quadrilaterals are generated everywhere except at the poles. This can be useful for generating a wireframe sphere with natural latitude and longitude lines.

virtual void vtkSphereSource::LatLongTessellationOff | ( |  | ) | `[virtual]`

| Cause the sphere to be tessellated with edges along the latitude and longitude lines. If off, triangles are generated at non-polar regions, which results in edges that are not parallel to latitude and longitude lines. If on, quadrilaterals are generated everywhere except at the poles. This can be useful for generating a wireframe sphere with natural latitude and longitude lines.

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

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

void vtkSphereSource::ExecuteInformation | ( |  | ) | `[protected, virtual]`

| Reimplemented from vtkSource.

## Member Data Documentation

float vtkSphereSource::Radius`[protected]`

| Definition at line 142 of file vtkSphereSource.h.

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

| Definition at line 143 of file vtkSphereSource.h.

int vtkSphereSource::ThetaResolution`[protected]`

| Definition at line 144 of file vtkSphereSource.h.

int vtkSphereSource::PhiResolution`[protected]`

| Definition at line 145 of file vtkSphereSource.h.

float vtkSphereSource::StartTheta`[protected]`

| Definition at line 146 of file vtkSphereSource.h.

float vtkSphereSource::EndTheta`[protected]`

| Definition at line 147 of file vtkSphereSource.h.

float vtkSphereSource::StartPhi`[protected]`

| Definition at line 148 of file vtkSphereSource.h.

float vtkSphereSource::EndPhi`[protected]`

| Definition at line 149 of file vtkSphereSource.h.

int vtkSphereSource::LatLongTessellation`[protected]`

| Definition at line 150 of file vtkSphereSource.h.

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

- Graphics/vtkSphereSource.h