VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkRectangularButtonSource Class Reference

create a rectangular button More...

#include <vtkRectangularButtonSource.h>

Inheritance diagram for vtkRectangularButtonSource:
[legend]
Collaboration diagram for vtkRectangularButtonSource:
[legend]

Public Types

typedef vtkButtonSource Superclass
 
- Public Types inherited from vtkButtonSource
typedef vtkPolyDataAlgorithm Superclass
 

Public Member Functions

void PrintSelf (ostream &os, vtkIndent indent)
 
virtual int IsA (const char *type)
 
vtkRectangularButtonSourceNewInstance () const
 
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 ()
 
- Public Member Functions inherited from vtkButtonSource
void PrintSelf (ostream &os, vtkIndent indent)
 
vtkButtonSourceNewInstance () const
 
virtual void SetCenter (double, double, double)
 
virtual void SetCenter (double[3])
 
virtual double * GetCenter ()
 
virtual void GetCenter (double data[3])
 
virtual void SetTextureStyle (int)
 
virtual int GetTextureStyle ()
 
void SetTextureStyleToFitImage ()
 
void SetTextureStyleToProportional ()
 
virtual void SetTextureDimensions (int, int)
 
void SetTextureDimensions (int[2])
 
virtual int * GetTextureDimensions ()
 
virtual void GetTextureDimensions (int &, int &)
 
virtual void GetTextureDimensions (int[2])
 
virtual void SetShoulderTextureCoordinate (double, double)
 
void SetShoulderTextureCoordinate (double[2])
 
virtual double * GetShoulderTextureCoordinate ()
 
virtual void GetShoulderTextureCoordinate (double &, double &)
 
virtual void GetShoulderTextureCoordinate (double[2])
 
virtual void SetTwoSided (int)
 
virtual int GetTwoSided ()
 
virtual void TwoSidedOn ()
 
virtual void TwoSidedOff ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkRectangularButtonSourceSafeDownCast (vtkObjectBase *o)
 
static vtkRectangularButtonSourceNew ()
 
- Static Public Member Functions inherited from vtkButtonSource
static int IsTypeOf (const char *type)
 
static vtkButtonSourceSafeDownCast (vtkObjectBase *o)
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 vtkRectangularButtonSource ()
 
 ~vtkRectangularButtonSource ()
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
- Protected Member Functions inherited from vtkButtonSource
 vtkButtonSource ()
 
 ~vtkButtonSource ()
 

Protected Attributes

double Width
 
double Height
 
double Depth
 
double BoxRatio
 
double TextureRatio
 
double TextureHeightRatio
 
- Protected Attributes inherited from vtkButtonSource
double Center [3]
 
double ShoulderTextureCoordinate [2]
 
int TextureStyle
 
int TextureDimensions [2]
 
int TwoSided
 

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 56 of file vtkRectangularButtonSource.h.

Member Typedef Documentation

Definition at line 60 of file vtkRectangularButtonSource.h.

Constructor & Destructor Documentation

vtkRectangularButtonSource::vtkRectangularButtonSource ( )
protected
vtkRectangularButtonSource::~vtkRectangularButtonSource ( )
inlineprotected

Definition at line 113 of file vtkRectangularButtonSource.h.

Member Function Documentation

void vtkRectangularButtonSource::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
static int vtkRectangularButtonSource::IsTypeOf ( const char *  type)
static
virtual int vtkRectangularButtonSource::IsA ( const char *  type)
virtual

Reimplemented from vtkButtonSource.

static vtkRectangularButtonSource* vtkRectangularButtonSource::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkRectangularButtonSource::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkButtonSource.

vtkRectangularButtonSource* vtkRectangularButtonSource::NewInstance ( ) const
static vtkRectangularButtonSource* vtkRectangularButtonSource::New ( )
static

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

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 *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protected

Member Data Documentation

double vtkRectangularButtonSource::Width
protected

Definition at line 117 of file vtkRectangularButtonSource.h.

double vtkRectangularButtonSource::Height
protected

Definition at line 118 of file vtkRectangularButtonSource.h.

double vtkRectangularButtonSource::Depth
protected

Definition at line 119 of file vtkRectangularButtonSource.h.

double vtkRectangularButtonSource::BoxRatio
protected

Definition at line 121 of file vtkRectangularButtonSource.h.

double vtkRectangularButtonSource::TextureRatio
protected

Definition at line 122 of file vtkRectangularButtonSource.h.

double vtkRectangularButtonSource::TextureHeightRatio
protected

Definition at line 123 of file vtkRectangularButtonSource.h.


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