vtkRectangularButtonSource Class Reference

#include <vtkRectangularButtonSource.h>

Inheritance diagram for vtkRectangularButtonSource:

Inheritance graph
[legend]
Collaboration diagram for vtkRectangularButtonSource:

Collaboration graph
[legend]

List of all members.


Detailed Description

create a rectangular button

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.

See also:
vtkButtonSource vtkEllipticalButtonSource
Warning:
The button is defined in the x-y plane. Use vtkTransformPolyDataFilter or vtkGlyph3D to orient the button in a different direction.
Tests:
vtkRectangularButtonSource (Tests)

Definition at line 55 of file vtkRectangularButtonSource.h.


Public Types

typedef vtkButtonSource Superclass

Public Member Functions

void PrintSelf (ostream &os, vtkIndent indent)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
virtual void SetWidth (double)
virtual double GetWidth ()
virtual void SetHeight (double)
virtual double GetHeight ()
virtual void SetDepth (double)
virtual double GetDepth ()
virtual void SetBoxRatio (double)
virtual double GetBoxRatio ()
virtual void SetTextureRatio (double)
virtual double GetTextureRatio ()
virtual void SetTextureHeightRatio (double)
virtual double GetTextureHeightRatio ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkRectangularButtonSourceSafeDownCast (vtkObject *o)
static vtkRectangularButtonSourceNew ()

Protected Member Functions

 vtkRectangularButtonSource ()
 ~vtkRectangularButtonSource ()
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)

Protected Attributes

double Width
double Height
double Depth
double BoxRatio
double TextureRatio
double TextureHeightRatio

Member Typedef Documentation

Reimplemented from vtkButtonSource.

Definition at line 59 of file vtkRectangularButtonSource.h.


Constructor & Destructor Documentation

vtkRectangularButtonSource::vtkRectangularButtonSource (  )  [protected]

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

Definition at line 112 of file vtkRectangularButtonSource.h.


Member Function Documentation

void vtkRectangularButtonSource::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 vtkButtonSource.

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

Reimplemented from vtkButtonSource.

static int vtkRectangularButtonSource::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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkButtonSource.

virtual int vtkRectangularButtonSource::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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkButtonSource.

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

Reimplemented from vtkButtonSource.

static vtkRectangularButtonSource* vtkRectangularButtonSource::New (  )  [static]

Construct a circular button with depth 10% of its height.

Reimplemented from vtkPolyDataAlgorithm.

virtual void vtkRectangularButtonSource::SetWidth ( double   )  [virtual]

Set/Get the width of the button.

virtual double vtkRectangularButtonSource::GetWidth (  )  [virtual]

Set/Get the width of the button.

virtual void vtkRectangularButtonSource::SetHeight ( double   )  [virtual]

Set/Get the height of the button.

virtual double vtkRectangularButtonSource::GetHeight (  )  [virtual]

Set/Get the height of the button.

virtual void vtkRectangularButtonSource::SetDepth ( double   )  [virtual]

Set/Get the depth of the button (the z-eliipsoid axis length).

virtual double vtkRectangularButtonSource::GetDepth (  )  [virtual]

Set/Get the depth of the button (the z-eliipsoid axis length).

virtual void vtkRectangularButtonSource::SetBoxRatio ( double   )  [virtual]

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.

virtual double vtkRectangularButtonSource::GetBoxRatio (  )  [virtual]

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.

virtual void vtkRectangularButtonSource::SetTextureRatio ( double   )  [virtual]

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.

virtual double vtkRectangularButtonSource::GetTextureRatio (  )  [virtual]

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.

virtual void vtkRectangularButtonSource::SetTextureHeightRatio ( double   )  [virtual]

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.

virtual double vtkRectangularButtonSource::GetTextureHeightRatio (  )  [virtual]

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.

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


Member Data Documentation

Definition at line 116 of file vtkRectangularButtonSource.h.

Definition at line 117 of file vtkRectangularButtonSource.h.

Definition at line 118 of file vtkRectangularButtonSource.h.

Definition at line 120 of file vtkRectangularButtonSource.h.

Definition at line 121 of file vtkRectangularButtonSource.h.

Definition at line 122 of file vtkRectangularButtonSource.h.


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

Generated on Sat Dec 27 13:46:39 2008 for VTK by  doxygen 1.5.6