FreeMat
vtkPlaneSource

Section: Visualization Toolkit Graphics Classes

Usage

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.) The resolution of the plane (i.e., number of subdivisions) is controlled by the ivars XResolution and YResolution.

By default, the plane is centered at the origin and perpendicular to the z-axis, with width and height of length 1 and resolutions set to 1.

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.

To create an instance of class vtkPlaneSource, simply invoke its constructor as follows

  obj = vtkPlaneSource

Methods

The class vtkPlaneSource has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkPlaneSource class.

  • string = obj.GetClassName ()
  • int = obj.IsA (string name)
  • vtkPlaneSource = obj.NewInstance ()
  • vtkPlaneSource = obj.SafeDownCast (vtkObject o)
  • obj.SetXResolution (int ) - Specify the resolution of the plane along the first axes.
  • int = obj.GetXResolution () - Specify the resolution of the plane along the first axes.
  • obj.SetYResolution (int ) - Specify the resolution of the plane along the second axes.
  • int = obj.GetYResolution () - Specify the resolution of the plane along the second axes.
  • obj.SetResolution (int xR, int yR) - Set the number of x-y subdivisions in the plane.
  • obj.SetOrigin (double , double , double ) - Specify a point defining the origin of the plane.
  • obj.SetOrigin (double a[3]) - Specify a point defining the origin of the plane.
  • double = obj. GetOrigin () - Specify a point defining the origin of the plane.
  • obj.SetPoint1 (double x, double y, double z) - Specify a point defining the first axis of the plane.
  • obj.SetPoint1 (double pnt[3]) - Specify a point defining the first axis of the plane.
  • double = obj. GetPoint1 () - Specify a point defining the first axis of the plane.
  • obj.SetPoint2 (double x, double y, double z) - Specify a point defining the second axis of the plane.
  • obj.SetPoint2 (double pnt[3]) - Specify a point defining the second axis of the plane.
  • double = obj. GetPoint2 () - Specify a point defining the second axis of the plane.
  • obj.SetCenter (double x, double y, double 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.
  • obj.SetCenter (double 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.
  • double = obj. GetCenter () - 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.
  • obj.SetNormal (double nx, double ny, double 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.
  • obj.SetNormal (double 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.
  • double = obj. GetNormal () - 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.
  • obj.Push (double distance) - Translate the plane in the direction of the normal by the distance specified. Negative values move the plane in the opposite direction.