Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

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 vtkRectangularButtonSource
Warning:
The button is defined in the x-y plane. Use vtkTransformPolyDataFilter or vtkGlyph3D to orient the button in a different direction.
Created by:
  • Schroeder, Will
CVS contributions (if > 5%):
  • Schroeder, Will (100%)
CVS logs (CVSweb):
  • .cxx (/Graphics/vtkRectangularButtonSource.cxx)
  • .h (/Graphics/vtkRectangularButtonSource.h)
Tests:
vtkRectangularButtonSource (Tests)

Definition at line 65 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

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

Protected Member Functions

 vtkRectangularButtonSource ()
 ~vtkRectangularButtonSource ()
void Execute ()

Protected Attributes

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


Member Typedef Documentation

typedef vtkButtonSource vtkRectangularButtonSource::Superclass
 

Reimplemented from vtkButtonSource.

Definition at line 69 of file vtkRectangularButtonSource.h.


Constructor & Destructor Documentation

vtkRectangularButtonSource::vtkRectangularButtonSource  )  [protected]
 

vtkRectangularButtonSource::~vtkRectangularButtonSource  )  [inline, protected]
 

Definition at line 122 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.

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

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

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

Reimplemented from vtkButtonSource.

vtkRectangularButtonSource* vtkRectangularButtonSource::New  )  [static]
 

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

Reimplemented from vtkAlgorithm.

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.

void vtkRectangularButtonSource::Execute  )  [protected, virtual]
 

This method is the old style execute method

Reimplemented from vtkSource.


Member Data Documentation

double vtkRectangularButtonSource::Width [protected]
 

Definition at line 126 of file vtkRectangularButtonSource.h.

double vtkRectangularButtonSource::Height [protected]
 

Definition at line 127 of file vtkRectangularButtonSource.h.

double vtkRectangularButtonSource::Depth [protected]
 

Definition at line 128 of file vtkRectangularButtonSource.h.

double vtkRectangularButtonSource::BoxRatio [protected]
 

Definition at line 130 of file vtkRectangularButtonSource.h.

double vtkRectangularButtonSource::TextureRatio [protected]
 

Definition at line 131 of file vtkRectangularButtonSource.h.

double vtkRectangularButtonSource::TextureHeightRatio [protected]
 

Definition at line 132 of file vtkRectangularButtonSource.h.


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