FreeMat

- Main Page
- Related Pages

vtkRectangularButtonSource

Section: Visualization Toolkit Graphics Classes

# Usage

vtkRectangularButtonSource creates a rectangular shaped button with texture coordinates suitable for application of a texture map. This provides a way to make nice looking 3D buttons. The buttons are represented as vtkPolyData that includes texture coordinates and normals. The button lies in the x-y plane.

To use this class you must define its width, height and length. These measurements are all taken with respect to the shoulder of the button. The shoulder is defined as follows. Imagine a box sitting on the floor. The distance from the floor to the top of the box is the depth; the other directions are the length (x-direction) and height (y-direction). In this particular widget the box can have a smaller bottom than top. The ratio in size between bottom and top is called the box ratio (by default=1.0). The ratio of the texture region to the shoulder region is the texture ratio. And finally the texture region may be out of plane compared to the shoulder. The texture height ratio controls this.

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

      obj = vtkRectangularButtonSource

# Methods

The class vtkRectangularButtonSource 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 vtkRectangularButtonSource class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkRectangularButtonSource = obj.NewInstance ()`
- `vtkRectangularButtonSource = obj.SafeDownCast (vtkObject o)`
- `obj.SetWidth (double )` - Set/Get the width of the button.
- `double = obj.GetWidthMinValue ()` - Set/Get the width of the button.
- `double = obj.GetWidthMaxValue ()` - Set/Get the width of the button.
- `double = obj.GetWidth ()` - Set/Get the width of the button.
- `obj.SetHeight (double )` - Set/Get the height of the button.
- `double = obj.GetHeightMinValue ()` - Set/Get the height of the button.
- `double = obj.GetHeightMaxValue ()` - Set/Get the height of the button.
- `double = obj.GetHeight ()` - Set/Get the height of the button.
- `obj.SetDepth (double )` - Set/Get the depth of the button (the z-eliipsoid axis length).
- `double = obj.GetDepthMinValue ()` - Set/Get the depth of the button (the z-eliipsoid axis length).
- `double = obj.GetDepthMaxValue ()` - Set/Get the depth of the button (the z-eliipsoid axis length).
- `double = obj.GetDepth ()` - Set/Get the depth of the button (the z-eliipsoid axis length).
- `obj.SetBoxRatio (double )` - Set/Get the ratio of the bottom of the button with the shoulder region. Numbers greater than one produce buttons with a wider bottom than shoulder; ratios less than one produce buttons that have a wider shoulder than bottom.
- `double = obj.GetBoxRatioMinValue ()` - Set/Get the ratio of the bottom of the button with the shoulder region. Numbers greater than one produce buttons with a wider bottom than shoulder; ratios less than one produce buttons that have a wider shoulder than bottom.
- `double = obj.GetBoxRatioMaxValue ()` - Set/Get the ratio of the bottom of the button with the shoulder region. Numbers greater than one produce buttons with a wider bottom than shoulder; ratios less than one produce buttons that have a wider shoulder than bottom.
- `double = obj.GetBoxRatio ()` - Set/Get the ratio of the bottom of the button with the shoulder region. Numbers greater than one produce buttons with a wider bottom than shoulder; ratios less than one produce buttons that have a wider shoulder than bottom.
- `obj.SetTextureRatio (double )` - Set/Get the ratio of the texture region to the shoulder region. This number must be 0<=tr<=1. If the texture style is to fit the image, then satisfying the texture ratio may only be possible in one of the two directions (length or width) depending on the dimensions of the texture.
- `double = obj.GetTextureRatioMinValue ()` - Set/Get the ratio of the texture region to the shoulder region. This number must be 0<=tr<=1. If the texture style is to fit the image, then satisfying the texture ratio may only be possible in one of the two directions (length or width) depending on the dimensions of the texture.
- `double = obj.GetTextureRatioMaxValue ()` - Set/Get the ratio of the texture region to the shoulder region. This number must be 0<=tr<=1. If the texture style is to fit the image, then satisfying the texture ratio may only be possible in one of the two directions (length or width) depending on the dimensions of the texture.
- `double = obj.GetTextureRatio ()` - Set/Get the ratio of the texture region to the shoulder region. This number must be 0<=tr<=1. If the texture style is to fit the image, then satisfying the texture ratio may only be possible in one of the two directions (length or width) depending on the dimensions of the texture.
- `obj.SetTextureHeightRatio (double )` - Set/Get the ratio of the height of the texture region to the shoulder height. Values greater than 1.0 yield convex buttons with the texture region raised above the shoulder. Values less than 1.0 yield concave buttons with the texture region below the shoulder.
- `double = obj.GetTextureHeightRatioMinValue ()` - Set/Get the ratio of the height of the texture region to the shoulder height. Values greater than 1.0 yield convex buttons with the texture region raised above the shoulder. Values less than 1.0 yield concave buttons with the texture region below the shoulder.
- `double = obj.GetTextureHeightRatioMaxValue ()` - Set/Get the ratio of the height of the texture region to the shoulder height. Values greater than 1.0 yield convex buttons with the texture region raised above the shoulder. Values less than 1.0 yield concave buttons with the texture region below the shoulder.
- `double = obj.GetTextureHeightRatio ()` - Set/Get the ratio of the height of the texture region to the shoulder height. Values greater than 1.0 yield convex buttons with the texture region raised above the shoulder. Values less than 1.0 yield concave buttons with the texture region below the shoulder.