vtkSphereSource Class Reference

#include <vtkSphereSource.h>

Inheritance diagram for vtkSphereSource:

Inheritance graph
[legend]
Collaboration diagram for vtkSphereSource:

Collaboration graph
[legend]

List of all members.


Detailed Description

create a polygonal sphere centered at the origin

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.
Examples:
vtkSphereSource (Examples)
Tests:
vtkSphereSource (Tests)

Definition at line 44 of file vtkSphereSource.h.


Public Types

typedef vtkPolyDataAlgorithm Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetRadius (double)
virtual double GetRadius ()
virtual void SetCenter (double, double, double)
virtual void SetCenter (double[3])
virtual double * GetCenter ()
virtual void GetCenter (double data[3])
virtual void SetThetaResolution (int)
virtual int GetThetaResolution ()
virtual void SetPhiResolution (int)
virtual int GetPhiResolution ()
virtual void SetStartTheta (double)
virtual double GetStartTheta ()
virtual void SetEndTheta (double)
virtual double GetEndTheta ()
virtual void SetStartPhi (double)
virtual double GetStartPhi ()
virtual void SetEndPhi (double)
virtual double GetEndPhi ()
virtual void SetLatLongTessellation (int)
virtual int GetLatLongTessellation ()
virtual void LatLongTessellationOn ()
virtual void LatLongTessellationOff ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkSphereSourceSafeDownCast (vtkObject *o)
static vtkSphereSourceNew ()

Protected Member Functions

 vtkSphereSource (int res=8)
 ~vtkSphereSource ()
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)

Protected Attributes

double Radius
double Center [3]
int ThetaResolution
int PhiResolution
double StartTheta
double EndTheta
double StartPhi
double EndPhi
int LatLongTessellation

Member Typedef Documentation

Reimplemented from vtkPolyDataAlgorithm.

Reimplemented in vtkPSphereSource.

Definition at line 47 of file vtkSphereSource.h.


Constructor & Destructor Documentation

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

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

Definition at line 120 of file vtkSphereSource.h.


Member Function Documentation

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

Reimplemented from vtkPolyDataAlgorithm.

Reimplemented in vtkPSphereSource.

static int vtkSphereSource::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 vtkPolyDataAlgorithm.

Reimplemented in vtkPSphereSource.

virtual int vtkSphereSource::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 vtkPolyDataAlgorithm.

Reimplemented in vtkPSphereSource.

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

Reimplemented from vtkPolyDataAlgorithm.

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

Reimplemented in vtkPSphereSource.

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

Reimplemented in vtkPSphereSource.

virtual void vtkSphereSource::SetRadius ( double   )  [virtual]

Set radius of sphere. Default is .5.

virtual double vtkSphereSource::GetRadius (  )  [virtual]

Set radius of sphere. Default is .5.

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

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

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

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

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

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

virtual void vtkSphereSource::GetCenter ( double  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 ( double   )  [virtual]

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

virtual double vtkSphereSource::GetStartTheta (  )  [virtual]

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

virtual void vtkSphereSource::SetEndTheta ( double   )  [virtual]

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

virtual double vtkSphereSource::GetEndTheta (  )  [virtual]

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

virtual void vtkSphereSource::SetStartPhi ( double   )  [virtual]

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

virtual double vtkSphereSource::GetStartPhi (  )  [virtual]

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

virtual void vtkSphereSource::SetEndPhi ( double   )  [virtual]

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

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

int vtkSphereSource::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkPolyDataAlgorithm.

Reimplemented in vtkPSphereSource.

int vtkSphereSource::RequestInformation ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
) [protected, virtual]

Reimplemented from vtkPolyDataAlgorithm.


Member Data Documentation

double vtkSphereSource::Radius [protected]

Definition at line 125 of file vtkSphereSource.h.

double vtkSphereSource::Center[3] [protected]

Definition at line 126 of file vtkSphereSource.h.

Definition at line 127 of file vtkSphereSource.h.

Definition at line 128 of file vtkSphereSource.h.

double vtkSphereSource::StartTheta [protected]

Definition at line 129 of file vtkSphereSource.h.

double vtkSphereSource::EndTheta [protected]

Definition at line 130 of file vtkSphereSource.h.

double vtkSphereSource::StartPhi [protected]

Definition at line 131 of file vtkSphereSource.h.

double vtkSphereSource::EndPhi [protected]

Definition at line 132 of file vtkSphereSource.h.

Definition at line 133 of file vtkSphereSource.h.


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

Generated on Wed Aug 24 12:07:36 2011 for VTK by  doxygen 1.5.6