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

vtkButtonSource Class Reference

#include <vtkButtonSource.h>

Inheritance diagram for vtkButtonSource:

Inheritance graph
[legend]
Collaboration diagram for vtkButtonSource:

Collaboration graph
[legend]
List of all members.

Detailed Description

create a ellipsoidal-shaped button

vtkButtonSource creates a ellipsoidal 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 the major and minor axes lengths of an ellipsoid (expressed as width (x), height (y) and depth (z)). The button has a rectangular mesh region in the center with texture coordinates that range smoothly from (0,1). (This flat region is called the texture region.) The outer, curved portion of the button (called the shoulder) has texture coordinates set to a user specified value (by default (0,0). (This results in coloring the button curve the same color as the (s,t) location of the texture map.) The resolution in the radial direction, the texture region, and the shoulder region must also be set. The button can be moved by specifying an origin.

Tests:
vtkButtonSource (Tests)

Definition at line 51 of file vtkButtonSource.h.

Public Types

typedef vtkPolyDataSource 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 SetRadialRatio (double)
virtual double GetRadialRatio ()
virtual void SetCircumferentialResolution (int)
virtual int GetCircumferentialResolution ()
virtual void SetTextureResolution (int)
virtual int GetTextureResolution ()
virtual void SetShoulderResolution (int)
virtual int GetShoulderResolution ()
virtual void SetOrigin (double, double, double)
virtual void SetOrigin (double[3])
virtual double * GetOrigin ()
virtual void GetOrigin (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

int IsTypeOf (const char *type)
vtkButtonSourceSafeDownCast (vtkObject *o)
vtkButtonSourceNew ()

Protected Member Functions

 vtkButtonSource ()
 ~vtkButtonSource ()
void Execute ()

Protected Attributes

double Width
double Height
double Depth
int CircumferentialResolution
int TextureResolution
int ShoulderResolution
double Origin [3]
double ShoulderTextureCoordinate [2]
double RadialRatio
int TextureStyle
int TextureDimensions [2]
int TwoSided


Member Typedef Documentation

typedef vtkPolyDataSource vtkButtonSource::Superclass
 

Reimplemented from vtkPolyDataSource.

Definition at line 55 of file vtkButtonSource.h.


Constructor & Destructor Documentation

vtkButtonSource::vtkButtonSource  )  [protected]
 

vtkButtonSource::~vtkButtonSource  )  [inline, protected]
 

Definition at line 158 of file vtkButtonSource.h.


Member Function Documentation

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

virtual const char* vtkButtonSource::GetClassName  )  [virtual]
 

Reimplemented from vtkPolyDataSource.

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

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

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

Reimplemented from vtkPolyDataSource.

vtkButtonSource* vtkButtonSource::New  )  [static]
 

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

Reimplemented from vtkObject.

virtual void vtkButtonSource::SetWidth double   )  [virtual]
 

Set/Get the width of the button (the x-ellipsoid axis length * 2).

virtual double vtkButtonSource::GetWidth  )  [virtual]
 

Set/Get the width of the button (the x-ellipsoid axis length * 2).

virtual void vtkButtonSource::SetHeight double   )  [virtual]
 

Set/Get the height of the button (the y-ellipsoid axis length * 2).

virtual double vtkButtonSource::GetHeight  )  [virtual]
 

Set/Get the height of the button (the y-ellipsoid axis length * 2).

virtual void vtkButtonSource::SetDepth double   )  [virtual]
 

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

virtual double vtkButtonSource::GetDepth  )  [virtual]
 

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

virtual void vtkButtonSource::SetRadialRatio double   )  [virtual]
 

Set/Get the radial ratio. This is the measure of the radius of the outer ellipsoid to the inner ellipsoid of the button. The outer ellipsoid is the boundary of the button defined by the height and width. The inner ellipsoid circumscribes the texture region. Larger RadialRatio's cause the button to be more rounded (and the texture region to be smaller); smaller ratios produce sharply curved shoulders with a larger texture region.

virtual double vtkButtonSource::GetRadialRatio  )  [virtual]
 

Set/Get the radial ratio. This is the measure of the radius of the outer ellipsoid to the inner ellipsoid of the button. The outer ellipsoid is the boundary of the button defined by the height and width. The inner ellipsoid circumscribes the texture region. Larger RadialRatio's cause the button to be more rounded (and the texture region to be smaller); smaller ratios produce sharply curved shoulders with a larger texture region.

virtual void vtkButtonSource::SetCircumferentialResolution int   )  [virtual]
 

Specify the resolution of the button in the circumferential direction.

virtual int vtkButtonSource::GetCircumferentialResolution  )  [virtual]
 

Specify the resolution of the button in the circumferential direction.

virtual void vtkButtonSource::SetTextureResolution int   )  [virtual]
 

Specify the resolution of the texture in the radial direction in the texture region.

virtual int vtkButtonSource::GetTextureResolution  )  [virtual]
 

Specify the resolution of the texture in the radial direction in the texture region.

virtual void vtkButtonSource::SetShoulderResolution int   )  [virtual]
 

Specify the resolution of the texture in the radial direction in the shoulder region.

virtual int vtkButtonSource::GetShoulderResolution  )  [virtual]
 

Specify the resolution of the texture in the radial direction in the shoulder region.

virtual void vtkButtonSource::SetOrigin double  ,
double  ,
double 
[virtual]
 

Specify a point defining the origin of the button.

virtual void vtkButtonSource::SetOrigin double  [3]  )  [virtual]
 

Specify a point defining the origin of the button.

virtual double* vtkButtonSource::GetOrigin  )  [virtual]
 

Specify a point defining the origin of the button.

virtual void vtkButtonSource::GetOrigin double  data[3]  )  [virtual]
 

Specify a point defining the origin of the button.

virtual void vtkButtonSource::SetTextureStyle int   )  [virtual]
 

Set/Get the style of the texture region: whether to size it according to the x-y dimensions of the texture, or whether to make the texture region proportional to the width/height of the button. When using the texture dimensions, the texture region is adjusted to be circumscribed by the elliptical, inner shape of the button. (The inner elliptical radius is controled by the RadiusRatio.)

virtual int vtkButtonSource::GetTextureStyle  )  [virtual]
 

Set/Get the style of the texture region: whether to size it according to the x-y dimensions of the texture, or whether to make the texture region proportional to the width/height of the button. When using the texture dimensions, the texture region is adjusted to be circumscribed by the elliptical, inner shape of the button. (The inner elliptical radius is controled by the RadiusRatio.)

void vtkButtonSource::SetTextureStyleToFitImage  )  [inline]
 

Set/Get the style of the texture region: whether to size it according to the x-y dimensions of the texture, or whether to make the texture region proportional to the width/height of the button. When using the texture dimensions, the texture region is adjusted to be circumscribed by the elliptical, inner shape of the button. (The inner elliptical radius is controled by the RadiusRatio.)

Definition at line 127 of file vtkButtonSource.h.

References VTK_TEXTURE_STYLE_FIT_IMAGE.

void vtkButtonSource::SetTextureStyleToProportional  )  [inline]
 

Set/Get the style of the texture region: whether to size it according to the x-y dimensions of the texture, or whether to make the texture region proportional to the width/height of the button. When using the texture dimensions, the texture region is adjusted to be circumscribed by the elliptical, inner shape of the button. (The inner elliptical radius is controled by the RadiusRatio.)

Definition at line 129 of file vtkButtonSource.h.

References VTK_TEXTURE_STYLE_PROPORTIONAL.

virtual void vtkButtonSource::SetTextureDimensions int  ,
int 
[virtual]
 

Set/get the texture dimension. This needs to be set if the texture style is set to fit the image.

void vtkButtonSource::SetTextureDimensions int  [2]  ) 
 

Set/get the texture dimension. This needs to be set if the texture style is set to fit the image.

virtual int* vtkButtonSource::GetTextureDimensions  )  [virtual]
 

Set/get the texture dimension. This needs to be set if the texture style is set to fit the image.

virtual void vtkButtonSource::GetTextureDimensions int &  ,
int & 
[virtual]
 

Set/get the texture dimension. This needs to be set if the texture style is set to fit the image.

virtual void vtkButtonSource::GetTextureDimensions int  [2]  )  [virtual]
 

Set/get the texture dimension. This needs to be set if the texture style is set to fit the image.

virtual void vtkButtonSource::SetShoulderTextureCoordinate double  ,
double 
[virtual]
 

Set/Get the default texture coordinate to set the shoulder region to.

void vtkButtonSource::SetShoulderTextureCoordinate double  [2]  ) 
 

Set/Get the default texture coordinate to set the shoulder region to.

virtual double* vtkButtonSource::GetShoulderTextureCoordinate  )  [virtual]
 

Set/Get the default texture coordinate to set the shoulder region to.

virtual void vtkButtonSource::GetShoulderTextureCoordinate double &  ,
double & 
[virtual]
 

Set/Get the default texture coordinate to set the shoulder region to.

virtual void vtkButtonSource::GetShoulderTextureCoordinate double  [2]  )  [virtual]
 

Set/Get the default texture coordinate to set the shoulder region to.

virtual void vtkButtonSource::SetTwoSided int   )  [virtual]
 

Indicate whether the button is single or double sided. A double sided button can be viewed from two sides...it looks sort of like a "pill." A single-sided button is meant to viewed from a single side; it looks like a "clam-shell."

virtual int vtkButtonSource::GetTwoSided  )  [virtual]
 

Indicate whether the button is single or double sided. A double sided button can be viewed from two sides...it looks sort of like a "pill." A single-sided button is meant to viewed from a single side; it looks like a "clam-shell."

virtual void vtkButtonSource::TwoSidedOn  )  [virtual]
 

Indicate whether the button is single or double sided. A double sided button can be viewed from two sides...it looks sort of like a "pill." A single-sided button is meant to viewed from a single side; it looks like a "clam-shell."

virtual void vtkButtonSource::TwoSidedOff  )  [virtual]
 

Indicate whether the button is single or double sided. A double sided button can be viewed from two sides...it looks sort of like a "pill." A single-sided button is meant to viewed from a single side; it looks like a "clam-shell."

void vtkButtonSource::Execute  )  [protected, virtual]
 

This method is the old style execute method

Reimplemented from vtkSource.


Member Data Documentation

double vtkButtonSource::Width [protected]
 

Definition at line 162 of file vtkButtonSource.h.

double vtkButtonSource::Height [protected]
 

Definition at line 163 of file vtkButtonSource.h.

double vtkButtonSource::Depth [protected]
 

Definition at line 164 of file vtkButtonSource.h.

int vtkButtonSource::CircumferentialResolution [protected]
 

Definition at line 166 of file vtkButtonSource.h.

int vtkButtonSource::TextureResolution [protected]
 

Definition at line 167 of file vtkButtonSource.h.

int vtkButtonSource::ShoulderResolution [protected]
 

Definition at line 168 of file vtkButtonSource.h.

double vtkButtonSource::Origin[3] [protected]
 

Definition at line 170 of file vtkButtonSource.h.

double vtkButtonSource::ShoulderTextureCoordinate[2] [protected]
 

Definition at line 171 of file vtkButtonSource.h.

double vtkButtonSource::RadialRatio [protected]
 

Definition at line 173 of file vtkButtonSource.h.

int vtkButtonSource::TextureStyle [protected]
 

Definition at line 174 of file vtkButtonSource.h.

int vtkButtonSource::TextureDimensions[2] [protected]
 

Definition at line 175 of file vtkButtonSource.h.

int vtkButtonSource::TwoSided [protected]
 

Definition at line 176 of file vtkButtonSource.h.


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