Man Page for vtkPlaneSource
Table of Contents

NAME

vtkPlaneSource - create an array of quadrilaterals located in a plane

SYNOPSIS


#include "/opt/vtk-c++/graphics/vtkPlaneSource.h"

class VTK_EXPORT vtkPlaneSource : public vtkPolyDataSource

vtkPlaneSource();
void PrintSelf(ostream& os, vtkIndent indent);
static vtkPlaneSource *New() {return new vtkPlaneSource;};
const char *GetClassName() {return "vtkPlaneSource";};
void SetXResolution(int);
int GetXResolution();
void SetYResolution(int);
int GetYResolution();
void SetResolution(const int xR, const int yR);
void GetResolution(int& xR,int& yR) {xR=this->XResolution; yR=this->YResolution;};
void SetOrigin(float, float, float);
void SetOrigin(float *);
float *GetOrigin();
void GetOrigin(float data[3]);
void SetPoint1(float x, float y, float z);
void SetPoint1(float pnt[3]);
float *GetPoint1();
void GetPoint1(float data[3]);
void SetPoint2(float x, float y, float z);
void SetPoint2(float pnt[3]);
float *GetPoint2();
void GetPoint2(float data[3]);
void SetCenter(float x, float y, float z);
void SetCenter(float center[3]);
float *GetCenter();
void GetCenter(float data[3]);
void SetNormal(float nx, float ny, float nz);
void SetNormal(float n[3]);
float *GetNormal();
void GetNormal(float data[3]);
void Push(float distance);

DESCRIPTION

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

CAVEATS

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.

SUMMARY

void SetXResolution(int)
Specify the resolution of the plane along the first axes.

void SetYResolution(int)
Specify the resolution of the plane along the second axes.

void SetOrigin(float, float, float)
void SetOrigin(float *)
Specify a point defining the origin of the plane.

float *GetPoint1()
void GetPoint1(float data[3])
Specify a point defining the first axis of the plane.

float *GetPoint2()
void GetPoint2(float data[3])
Specify a point defining the second axis of the plane.

float *GetCenter()
void GetCenter(float data[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.

float *GetNormal()
void GetNormal(float data[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.

vtkPlaneSource()
Construct plane perpendicular to z-axis, resolution 1x1, width and height 1.0, and centered at the origin.

void SetResolution(const int xR, const int yR)
Set the number of x-y subdivisions in the plane.

void SetNormal(float N[3])
Set the normal to the plane. Will modify the Origin, Point1, and Point2 instance variables as necessary (i.e., rotate the plane around its center).

void SetNormal(float nx, float ny, float nz)
Set the normal to the plane. Will modify the Origin, Point1, and Point2 instance variables as necessary (i.e., rotate the plane around its center).

void SetCenter(float center[3])
Set the center of the plane. Will modify the Origin, Point1, and Point2 instance variables as necessary (i.e., translate the plane).

void SetCenter(float x, float y, float z)
Set the center of the plane. Will modify the Origin, Point1, and Point2 instance variables as necessary (i.e., translate the plane).

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


Table of Contents