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

# vtkPlaneSource Class Reference

`#include <vtkPlaneSource.h>`

Inheritance diagram for vtkPlaneSource:

[legend]
Collaboration diagram for vtkPlaneSource:

[legend]
List of all members.

## Detailed Description

create an array of quadrilaterals located in a plane

Date:
  2002/06/26 17:06:44

Revision:
  1.51

vtkPlaneSource creates an m x n array of quadrilaterals arranged as a regular tiling in a plane. The plane is defined by specifying an origin point, and then two other points that, together with the origin, define two axes for the plane. These axes do not have to be orthogonal - so you can create a parallelogram. (The axes must not be parallel.) By default, the plane is centered at the origin and perpendicular to the z-axis, with width and height of length 1. The resolution of the plane (i.e., number of subdivisions) is controlled by the ivars XResolution and YResolution.

There are three convenience methods that allow you to easily move the plane. The first, SetNormal(), allows you to specify the plane normal. The effect of this method is to rotate the plane around the center of the plane, aligning the plane normal with the specified normal. The rotation is about the axis defined by the cross product of the current normal with the new normal. The second, SetCenter(), translates the center of the plane to the specified center point. The third method, Push(), allows you to translate the plane along the plane normal by the distance specified. (Negative Push values translate the plane in the negative normal direction.) Note that the SetNormal(), SetCenter() and Push() methods modify the Origin, Point1, and/or Point2 instance variables.

Warning:
  The normal to the plane will point in the direction of the cross product of the first axis (Origin->Point1) with the second (Origin->Point2). This also affects the normals to the generated polygons.

Created by:
  - Martin, Ken

CVS contributions (if > 5%):
  - Schroeder, Will (66%)
  - Martin, Ken (21%)

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

Examples:
  vtkPlaneSource (Examples)

Tests:
  vtkPlaneSource (Tests)

Definition at line 72 of file vtkPlaneSource.h.

## Public Types

typedef vtkPolyDataSource | Superclass

## Public Methods

void | PrintSelf (ostream &os, vtkIndent indent)
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | Push (float distance)
virtual void | SetXResolution (int)
virtual int | GetXResolution ()
virtual void | SetYResolution (int)
virtual int | GetYResolution ()
void | SetResolution (const int xR, const int yR)
void | GetResolution (int &xR, int &yR)
virtual void | SetOrigin (float, float, float)
virtual void | SetOrigin (float[3])
virtual float * | GetOrigin ()
virtual void | GetOrigin (float data[3])
void | SetPoint1 (float x, float y, float z)
void | SetPoint1 (float pnt[3])
virtual float * | GetPoint1 ()
virtual void | GetPoint1 (float data[3])
void | SetPoint2 (float x, float y, float z)
void | SetPoint2 (float pnt[3])
virtual float * | GetPoint2 ()
virtual void | GetPoint2 (float data[3])
void | SetCenter (float x, float y, float z)
void | SetCenter (float center[3])
virtual float * | GetCenter ()
virtual void | GetCenter (float data[3])
void | SetNormal (float nx, float ny, float nz)
void | SetNormal (float n[3])
virtual float * | GetNormal ()
virtual void | GetNormal (float data[3])

## Static Public Methods

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

## Protected Methods

| vtkPlaneSource ()
| ~vtkPlaneSource ()
void | Execute ()
int | UpdatePlane (float v1[3], float v2[3])

## Protected Attributes

int | XResolution
int | YResolution
float | Origin [3]
float | Point1 [3]
float | Point2 [3]
float | Normal [3]
float | Center [3]

## Member Typedef Documentation

typedef vtkPolyDataSource vtkPlaneSource::Superclass

| Reimplemented from vtkPolyDataSource. Definition at line 76 of file vtkPlaneSource.h.

## Constructor & Destructor Documentation

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

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

| Definition at line 145 of file vtkPlaneSource.h.

## Member Function Documentation

void vtkPlaneSource::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.

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

| Reimplemented from vtkPolyDataSource.

int vtkPlaneSource::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.

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

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

| Reimplemented from vtkPolyDataSource.

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

| Construct plane perpendicular to z-axis, resolution 1x1, width and height 1.0, and centered at the origin. Reimplemented from vtkObject.

virtual void vtkPlaneSource::SetXResolution | ( | int |  | ) | `[virtual]`

| Specify the resolution of the plane along the first axes.

virtual int vtkPlaneSource::GetXResolution | ( |  | ) | `[virtual]`

| Specify the resolution of the plane along the first axes.

virtual void vtkPlaneSource::SetYResolution | ( | int |  | ) | `[virtual]`

| Specify the resolution of the plane along the second axes.

virtual int vtkPlaneSource::GetYResolution | ( |  | ) | `[virtual]`

| Specify the resolution of the plane along the second axes.

void vtkPlaneSource::SetResolution | ( | const int | xR,
|  | const int | yR
| ) |

| Set the number of x-y subdivisions in the plane.

void vtkPlaneSource::GetResolution | ( | int & | xR,
|  | int & | yR
| ) | `[inline]`

| Set the number of x-y subdivisions in the plane. Definition at line 97 of file vtkPlaneSource.h.

virtual void vtkPlaneSource::SetOrigin | ( | float | ,
|  | float | ,
|  | float |
| ) | `[virtual]`

| Specify a point defining the origin of the plane.

virtual void vtkPlaneSource::SetOrigin | ( | float | [3] | ) | `[virtual]`

| Specify a point defining the origin of the plane.

virtual float* vtkPlaneSource::GetOrigin | ( |  | ) | `[virtual]`

| Specify a point defining the origin of the plane.

virtual void vtkPlaneSource::GetOrigin | ( | float | data[3] | ) | `[virtual]`

| Specify a point defining the origin of the plane.

void vtkPlaneSource::SetPoint1 | ( | float | x,
|  | float | y,
|  | float | z
| ) |

| Specify a point defining the first axis of the plane.

void vtkPlaneSource::SetPoint1 | ( | float | pnt[3] | ) |

| Specify a point defining the first axis of the plane.

virtual float* vtkPlaneSource::GetPoint1 | ( |  | ) | `[virtual]`

| Specify a point defining the first axis of the plane.

virtual void vtkPlaneSource::GetPoint1 | ( | float | data[3] | ) | `[virtual]`

| Specify a point defining the first axis of the plane.

void vtkPlaneSource::SetPoint2 | ( | float | x,
|  | float | y,
|  | float | z
| ) |

| Specify a point defining the second axis of the plane.

void vtkPlaneSource::SetPoint2 | ( | float | pnt[3] | ) |

| Specify a point defining the second axis of the plane.

virtual float* vtkPlaneSource::GetPoint2 | ( |  | ) | `[virtual]`

| Specify a point defining the second axis of the plane.

virtual void vtkPlaneSource::GetPoint2 | ( | float | data[3] | ) | `[virtual]`

| Specify a point defining the second axis of the plane.

void vtkPlaneSource::SetCenter | ( | float | x,
|  | float | y,
|  | float | z
| ) |

| Set/Get the center of the plane. Works in conjunction with the plane normal to position the plane. Don't use this method to define the plane. Instead, use it to move the plane to a new center point.

void vtkPlaneSource::SetCenter | ( | float | center[3] | ) |

| Set/Get the center of the plane. Works in conjunction with the plane normal to position the plane. Don't use this method to define the plane. Instead, use it to move the plane to a new center point.

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

| Set/Get the center of the plane. Works in conjunction with the plane normal to position the plane. Don't use this method to define the plane. Instead, use it to move the plane to a new center point.

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

| Set/Get the center of the plane. Works in conjunction with the plane normal to position the plane. Don't use this method to define the plane. Instead, use it to move the plane to a new center point.

void vtkPlaneSource::SetNormal | ( | float | nx,
|  | float | ny,
|  | float | nz
| ) |

| Set/Get the plane normal. Works in conjunction with the plane center to orient the plane. Don't use this method to define the plane. Instead, use it to rotate the plane around the current center point.

void vtkPlaneSource::SetNormal | ( | float | n[3] | ) |

| Set/Get the plane normal. Works in conjunction with the plane center to orient the plane. Don't use this method to define the plane. Instead, use it to rotate the plane around the current center point.

virtual float* vtkPlaneSource::GetNormal | ( |  | ) | `[virtual]`

| Set/Get the plane normal. Works in conjunction with the plane center to orient the plane. Don't use this method to define the plane. Instead, use it to rotate the plane around the current center point.

virtual void vtkPlaneSource::GetNormal | ( | float | data[3] | ) | `[virtual]`

| Set/Get the plane normal. Works in conjunction with the plane center to orient the plane. Don't use this method to define the plane. Instead, use it to rotate the plane around the current center point.

void vtkPlaneSource::Push | ( | float | distance | ) |

| Translate the plane in the direction of the normal by the distance specified. Negative values move the plane in the opposite direction.

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

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

int vtkPlaneSource::UpdatePlane | ( | float | v1[3],
|  | float | v2[3]
| ) | `[protected]`

## Member Data Documentation

int vtkPlaneSource::XResolution`[protected]`

| Definition at line 149 of file vtkPlaneSource.h.

int vtkPlaneSource::YResolution`[protected]`

| Definition at line 150 of file vtkPlaneSource.h.

float vtkPlaneSource::Origin[3]`[protected]`

| Definition at line 151 of file vtkPlaneSource.h.

float vtkPlaneSource::Point1[3]`[protected]`

| Definition at line 152 of file vtkPlaneSource.h.

float vtkPlaneSource::Point2[3]`[protected]`

| Definition at line 153 of file vtkPlaneSource.h.

float vtkPlaneSource::Normal[3]`[protected]`

| Definition at line 154 of file vtkPlaneSource.h.

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

| Definition at line 155 of file vtkPlaneSource.h.

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

- Graphics/vtkPlaneSource.h