vtkAxisActor Class Reference

#include <vtkAxisActor.h>

Inheritance diagram for vtkAxisActor:

Inheritance graph
[legend]
Collaboration diagram for vtkAxisActor:

Collaboration graph
[legend]

List of all members.


Detailed Description

Create an axis with tick marks and labels.

$Date$ $Revision$

vtkAxisActor creates an axis with tick marks, labels, and/or a title, depending on the particular instance variable settings. It is assumed that the axes is part of a bounding box and is orthoganal to one of the coordinate axes. To use this class, you typically specify two points defining the start and end points of the line (xyz definition using vtkCoordinate class), the axis type (X, Y or Z), the axis location in relation to the bounding box, the bounding box, the number of labels, and the data range (min,max). You can also control what parts of the axis are visible including the line, the tick marks, the labels, and the title. It is also possible to control gridlines, and specifiy on which 'side' the tickmarks are drawn (again with respect to the underlying assumed bounding box). You can also specify the label format (a printf style format).

This class decides how to locate the labels, and how to create reasonable tick marks and labels.

Labels follow the camera so as to be legible from any viewpoint.

The instance variables Point1 and Point2 are instances of vtkCoordinate. All calculations and references are in World Coordinates.

Attention:
This class was adapted from a 2D version created by Hank Childs called vtkHankAxisActor2D.
See also:
vtkActor vtkVectorText vtkPolyDataMapper vtkAxisActor2D vtkCoordinate

Definition at line 87 of file vtkAxisActor.h.


Public Types

typedef vtkActor Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetTickLocationToInside (void)
void SetTickLocationToOutside (void)
void SetTickLocationToBoth (void)
void SetAxisPositionToMinMin (void)
void SetAxisPositionToMinMax (void)
void SetAxisPositionToMaxMax (void)
void SetAxisPositionToMaxMin (void)
void ReleaseGraphicsResources (vtkWindow *)
void ShallowCopy (vtkProp *prop)
double ComputeMaxLabelLength (const double[3])
double ComputeTitleLength (const double[3])
void SetLabelScale (const double)
void SetTitleScale (const double)
void SetLabels (vtkStringArray *labels)
void BuildAxis (vtkViewport *viewport, bool)
virtual vtkCoordinateGetPoint1Coordinate ()
virtual void SetPoint1 (double x[3])
virtual void SetPoint1 (double x, double y, double z)
virtual double * GetPoint1 ()
virtual vtkCoordinateGetPoint2Coordinate ()
virtual void SetPoint2 (double x[3])
virtual void SetPoint2 (double x, double y, double z)
virtual double * GetPoint2 ()
virtual void SetRange (double, double)
void SetRange (double[2])
virtual double * GetRange ()
virtual void GetRange (double data[2])
void SetBounds (double bounds[6])
double * GetBounds (void)
void GetBounds (double bounds[6])
virtual void SetLabelFormat (const char *)
virtual char * GetLabelFormat ()
virtual void SetMinorTicksVisible (int)
virtual int GetMinorTicksVisible ()
virtual void MinorTicksVisibleOn ()
virtual void MinorTicksVisibleOff ()
void SetTitle (const char *t)
virtual char * GetTitle ()
virtual void SetMajorTickSize (double)
virtual double GetMajorTickSize ()
virtual void SetMinorTickSize (double)
virtual double GetMinorTickSize ()
virtual void SetTickLocation (int)
virtual int GetTickLocation ()
virtual void SetAxisVisibility (int)
virtual int GetAxisVisibility ()
virtual void AxisVisibilityOn ()
virtual void AxisVisibilityOff ()
virtual void SetTickVisibility (int)
virtual int GetTickVisibility ()
virtual void TickVisibilityOn ()
virtual void TickVisibilityOff ()
virtual void SetLabelVisibility (int)
virtual int GetLabelVisibility ()
virtual void LabelVisibilityOn ()
virtual void LabelVisibilityOff ()
virtual void SetTitleVisibility (int)
virtual int GetTitleVisibility ()
virtual void TitleVisibilityOn ()
virtual void TitleVisibilityOff ()
virtual void SetDrawGridlines (int)
virtual int GetDrawGridlines ()
virtual void DrawGridlinesOn ()
virtual void DrawGridlinesOff ()
virtual void SetGridlineXLength (double)
virtual double GetGridlineXLength ()
virtual void SetGridlineYLength (double)
virtual double GetGridlineYLength ()
virtual void SetGridlineZLength (double)
virtual double GetGridlineZLength ()
virtual void SetAxisType (int)
virtual int GetAxisType ()
void SetAxisTypeToX (void)
void SetAxisTypeToY (void)
void SetAxisTypeToZ (void)
virtual void SetAxisPosition (int)
virtual int GetAxisPosition ()
virtual void SetCamera (vtkCamera *)
virtual vtkCameraGetCamera ()
virtual int RenderOpaqueGeometry (vtkViewport *viewport)
virtual int RenderTranslucentGeometry (vtkViewport *)
virtual void SetMinorStart (double)
virtual double GetMinorStart ()
virtual void SetMajorStart (double)
virtual double GetMajorStart ()
virtual void SetDeltaMinor (double)
virtual double GetDeltaMinor ()
virtual void SetDeltaMajor (double)
virtual double GetDeltaMajor ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkAxisActorSafeDownCast (vtkObject *o)
static vtkAxisActorNew ()

Protected Member Functions

 vtkAxisActor ()
 ~vtkAxisActor ()

Protected Attributes

char * Title
double Range [2]
double LastRange [2]
char * LabelFormat
int NumberOfLabelsBuilt
int MinorTicksVisible
int LastMinorTicksVisible
int TickLocation
int DrawGridlines
int LastDrawGridlines
double GridlineXLength
double GridlineYLength
double GridlineZLength
int AxisVisibility
int TickVisibility
int LastTickVisibility
int LabelVisibility
int TitleVisibility
int AxisType
int AxisPosition
double Bounds [6]

Member Typedef Documentation

Reimplemented from vtkActor.

Definition at line 90 of file vtkAxisActor.h.


Constructor & Destructor Documentation

vtkAxisActor::vtkAxisActor (  )  [protected]

vtkAxisActor::~vtkAxisActor (  )  [protected]


Member Function Documentation

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

Reimplemented from vtkActor.

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

Reimplemented from vtkActor.

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

Reimplemented from vtkActor.

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

Reimplemented from vtkActor.

void vtkAxisActor::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 vtkActor.

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

Instantiate object.

Reimplemented from vtkActor.

virtual vtkCoordinate* vtkAxisActor::GetPoint1Coordinate (  )  [virtual]

Specify the position of the first point defining the axis.

virtual void vtkAxisActor::SetPoint1 ( double  x[3]  )  [inline, virtual]

Specify the position of the first point defining the axis.

Definition at line 99 of file vtkAxisActor.h.

virtual void vtkAxisActor::SetPoint1 ( double  x,
double  y,
double  z 
) [virtual]

Specify the position of the first point defining the axis.

virtual double* vtkAxisActor::GetPoint1 (  )  [virtual]

Specify the position of the first point defining the axis.

virtual vtkCoordinate* vtkAxisActor::GetPoint2Coordinate (  )  [virtual]

Specify the position of the second point defining the axis.

virtual void vtkAxisActor::SetPoint2 ( double  x[3]  )  [inline, virtual]

Specify the position of the second point defining the axis.

Definition at line 108 of file vtkAxisActor.h.

virtual void vtkAxisActor::SetPoint2 ( double  x,
double  y,
double  z 
) [virtual]

Specify the position of the second point defining the axis.

virtual double* vtkAxisActor::GetPoint2 (  )  [virtual]

Specify the position of the second point defining the axis.

virtual void vtkAxisActor::SetRange ( double  ,
double   
) [virtual]

Specify the (min,max) axis range. This will be used in the generation of labels, if labels are visible.

void vtkAxisActor::SetRange ( double  [2]  ) 

Specify the (min,max) axis range. This will be used in the generation of labels, if labels are visible.

virtual double* vtkAxisActor::GetRange (  )  [virtual]

Specify the (min,max) axis range. This will be used in the generation of labels, if labels are visible.

virtual void vtkAxisActor::GetRange ( double  data[2]  )  [virtual]

Specify the (min,max) axis range. This will be used in the generation of labels, if labels are visible.

void vtkAxisActor::SetBounds ( double  bounds[6]  ) 

Set or get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

double* vtkAxisActor::GetBounds ( void   )  [virtual]

Set or get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

Reimplemented from vtkActor.

void vtkAxisActor::GetBounds ( double  bounds[6]  ) 

Set or get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

Reimplemented from vtkActor.

virtual void vtkAxisActor::SetLabelFormat ( const char *   )  [virtual]

Set/Get the format with which to print the labels on the axis.

virtual char* vtkAxisActor::GetLabelFormat (  )  [virtual]

Set/Get the format with which to print the labels on the axis.

virtual void vtkAxisActor::SetMinorTicksVisible ( int   )  [virtual]

Set/Get the flag that controls whether the minor ticks are visible.

virtual int vtkAxisActor::GetMinorTicksVisible (  )  [virtual]

Set/Get the flag that controls whether the minor ticks are visible.

virtual void vtkAxisActor::MinorTicksVisibleOn (  )  [virtual]

Set/Get the flag that controls whether the minor ticks are visible.

virtual void vtkAxisActor::MinorTicksVisibleOff (  )  [virtual]

Set/Get the flag that controls whether the minor ticks are visible.

void vtkAxisActor::SetTitle ( const char *  t  ) 

Set/Get the title of the axis actor,

virtual char* vtkAxisActor::GetTitle (  )  [virtual]

Set/Get the title of the axis actor,

virtual void vtkAxisActor::SetMajorTickSize ( double   )  [virtual]

Set/Get the size of the major tick marks

virtual double vtkAxisActor::GetMajorTickSize (  )  [virtual]

Set/Get the size of the major tick marks

virtual void vtkAxisActor::SetMinorTickSize ( double   )  [virtual]

Set/Get the size of the major tick marks

virtual double vtkAxisActor::GetMinorTickSize (  )  [virtual]

Set/Get the size of the major tick marks

virtual void vtkAxisActor::SetTickLocation ( int   )  [virtual]

Set/Get the location of the ticks.

virtual int vtkAxisActor::GetTickLocation (  )  [virtual]

Set/Get the location of the ticks.

void vtkAxisActor::SetTickLocationToInside ( void   )  [inline]

Definition at line 167 of file vtkAxisActor.h.

void vtkAxisActor::SetTickLocationToOutside ( void   )  [inline]

Definition at line 169 of file vtkAxisActor.h.

void vtkAxisActor::SetTickLocationToBoth ( void   )  [inline]

Definition at line 171 of file vtkAxisActor.h.

virtual void vtkAxisActor::SetAxisVisibility ( int   )  [virtual]

Set/Get visibility of the axis line.

virtual int vtkAxisActor::GetAxisVisibility (  )  [virtual]

Set/Get visibility of the axis line.

virtual void vtkAxisActor::AxisVisibilityOn (  )  [virtual]

Set/Get visibility of the axis line.

virtual void vtkAxisActor::AxisVisibilityOff (  )  [virtual]

Set/Get visibility of the axis line.

virtual void vtkAxisActor::SetTickVisibility ( int   )  [virtual]

Set/Get visibility of the axis tick marks.

virtual int vtkAxisActor::GetTickVisibility (  )  [virtual]

Set/Get visibility of the axis tick marks.

virtual void vtkAxisActor::TickVisibilityOn (  )  [virtual]

Set/Get visibility of the axis tick marks.

virtual void vtkAxisActor::TickVisibilityOff (  )  [virtual]

Set/Get visibility of the axis tick marks.

virtual void vtkAxisActor::SetLabelVisibility ( int   )  [virtual]

Set/Get visibility of the axis labels.

virtual int vtkAxisActor::GetLabelVisibility (  )  [virtual]

Set/Get visibility of the axis labels.

virtual void vtkAxisActor::LabelVisibilityOn (  )  [virtual]

Set/Get visibility of the axis labels.

virtual void vtkAxisActor::LabelVisibilityOff (  )  [virtual]

Set/Get visibility of the axis labels.

virtual void vtkAxisActor::SetTitleVisibility ( int   )  [virtual]

Set/Get visibility of the axis title.

virtual int vtkAxisActor::GetTitleVisibility (  )  [virtual]

Set/Get visibility of the axis title.

virtual void vtkAxisActor::TitleVisibilityOn (  )  [virtual]

Set/Get visibility of the axis title.

virtual void vtkAxisActor::TitleVisibilityOff (  )  [virtual]

Set/Get visibility of the axis title.

virtual void vtkAxisActor::SetDrawGridlines ( int   )  [virtual]

Set/Get whether gridlines should be drawn.

virtual int vtkAxisActor::GetDrawGridlines (  )  [virtual]

Set/Get whether gridlines should be drawn.

virtual void vtkAxisActor::DrawGridlinesOn (  )  [virtual]

Set/Get whether gridlines should be drawn.

virtual void vtkAxisActor::DrawGridlinesOff (  )  [virtual]

Set/Get whether gridlines should be drawn.

virtual void vtkAxisActor::SetGridlineXLength ( double   )  [virtual]

Set/Get the length to use when drawing gridlines.

virtual double vtkAxisActor::GetGridlineXLength (  )  [virtual]

Set/Get the length to use when drawing gridlines.

virtual void vtkAxisActor::SetGridlineYLength ( double   )  [virtual]

Set/Get the length to use when drawing gridlines.

virtual double vtkAxisActor::GetGridlineYLength (  )  [virtual]

Set/Get the length to use when drawing gridlines.

virtual void vtkAxisActor::SetGridlineZLength ( double   )  [virtual]

Set/Get the length to use when drawing gridlines.

virtual double vtkAxisActor::GetGridlineZLength (  )  [virtual]

Set/Get the length to use when drawing gridlines.

virtual void vtkAxisActor::SetAxisType ( int   )  [virtual]

Set/Get the type of this axis.

virtual int vtkAxisActor::GetAxisType (  )  [virtual]

Set/Get the type of this axis.

void vtkAxisActor::SetAxisTypeToX ( void   )  [inline]

Set/Get the type of this axis.

Definition at line 223 of file vtkAxisActor.h.

void vtkAxisActor::SetAxisTypeToY ( void   )  [inline]

Set/Get the type of this axis.

Definition at line 224 of file vtkAxisActor.h.

void vtkAxisActor::SetAxisTypeToZ ( void   )  [inline]

Set/Get the type of this axis.

Definition at line 225 of file vtkAxisActor.h.

virtual void vtkAxisActor::SetAxisPosition ( int   )  [virtual]

Set/Get the position of this axis (in relation to an an assumed bounding box). For an x-type axis, MINMIN corresponds to the x-edge in the bounding box where Y values are minimum and Z values are minimum. For a y-type axis, MAXMIN corresponds to the y-edge where X values are maximum and Z values are minimum.

virtual int vtkAxisActor::GetAxisPosition (  )  [virtual]

Set/Get the position of this axis (in relation to an an assumed bounding box). For an x-type axis, MINMIN corresponds to the x-edge in the bounding box where Y values are minimum and Z values are minimum. For a y-type axis, MAXMIN corresponds to the y-edge where X values are maximum and Z values are minimum.

void vtkAxisActor::SetAxisPositionToMinMin ( void   )  [inline]

Definition at line 238 of file vtkAxisActor.h.

void vtkAxisActor::SetAxisPositionToMinMax ( void   )  [inline]

Definition at line 240 of file vtkAxisActor.h.

void vtkAxisActor::SetAxisPositionToMaxMax ( void   )  [inline]

Definition at line 242 of file vtkAxisActor.h.

void vtkAxisActor::SetAxisPositionToMaxMin ( void   )  [inline]

Definition at line 244 of file vtkAxisActor.h.

virtual void vtkAxisActor::SetCamera ( vtkCamera  )  [virtual]

Set/Get the camera for this axis. The camera is used by the labels to 'follow' the camera and be legible from any viewpoint.

virtual vtkCamera* vtkAxisActor::GetCamera (  )  [virtual]

Set/Get the camera for this axis. The camera is used by the labels to 'follow' the camera and be legible from any viewpoint.

virtual int vtkAxisActor::RenderOpaqueGeometry ( vtkViewport viewport  )  [virtual]

Draw the axis.

Reimplemented from vtkActor.

virtual int vtkAxisActor::RenderTranslucentGeometry ( vtkViewport  )  [inline, virtual]

Draw the axis.

Definition at line 257 of file vtkAxisActor.h.

void vtkAxisActor::ReleaseGraphicsResources ( vtkWindow  )  [virtual]

Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.

Reimplemented from vtkActor.

void vtkAxisActor::ShallowCopy ( vtkProp prop  )  [virtual]

Shallow copy of an axis actor. Overloads the virtual vtkProp method.

Reimplemented from vtkActor.

double vtkAxisActor::ComputeMaxLabelLength ( const   double[3]  ) 

double vtkAxisActor::ComputeTitleLength ( const   double[3]  ) 

void vtkAxisActor::SetLabelScale ( const   double  ) 

void vtkAxisActor::SetTitleScale ( const   double  ) 

virtual void vtkAxisActor::SetMinorStart ( double   )  [virtual]

Set/Get the starting position for minor and major tick points, and the delta values that determine their spacing.

virtual double vtkAxisActor::GetMinorStart (  )  [virtual]

Set/Get the starting position for minor and major tick points, and the delta values that determine their spacing.

virtual void vtkAxisActor::SetMajorStart ( double   )  [virtual]

Set/Get the starting position for minor and major tick points, and the delta values that determine their spacing.

virtual double vtkAxisActor::GetMajorStart (  )  [virtual]

Set/Get the starting position for minor and major tick points, and the delta values that determine their spacing.

virtual void vtkAxisActor::SetDeltaMinor ( double   )  [virtual]

Set/Get the starting position for minor and major tick points, and the delta values that determine their spacing.

virtual double vtkAxisActor::GetDeltaMinor (  )  [virtual]

Set/Get the starting position for minor and major tick points, and the delta values that determine their spacing.

virtual void vtkAxisActor::SetDeltaMajor ( double   )  [virtual]

Set/Get the starting position for minor and major tick points, and the delta values that determine their spacing.

virtual double vtkAxisActor::GetDeltaMajor (  )  [virtual]

Set/Get the starting position for minor and major tick points, and the delta values that determine their spacing.

void vtkAxisActor::SetLabels ( vtkStringArray labels  ) 

void vtkAxisActor::BuildAxis ( vtkViewport viewport,
bool   
)


Member Data Documentation

char* vtkAxisActor::Title [protected]

Definition at line 299 of file vtkAxisActor.h.

double vtkAxisActor::Range[2] [protected]

Definition at line 300 of file vtkAxisActor.h.

double vtkAxisActor::LastRange[2] [protected]

Definition at line 301 of file vtkAxisActor.h.

char* vtkAxisActor::LabelFormat [protected]

Definition at line 302 of file vtkAxisActor.h.

Definition at line 303 of file vtkAxisActor.h.

Definition at line 304 of file vtkAxisActor.h.

Definition at line 305 of file vtkAxisActor.h.

int vtkAxisActor::TickLocation [protected]

Definition at line 306 of file vtkAxisActor.h.

int vtkAxisActor::DrawGridlines [protected]

Definition at line 308 of file vtkAxisActor.h.

Definition at line 309 of file vtkAxisActor.h.

double vtkAxisActor::GridlineXLength [protected]

Definition at line 310 of file vtkAxisActor.h.

double vtkAxisActor::GridlineYLength [protected]

Definition at line 311 of file vtkAxisActor.h.

double vtkAxisActor::GridlineZLength [protected]

Definition at line 312 of file vtkAxisActor.h.

Definition at line 314 of file vtkAxisActor.h.

Definition at line 315 of file vtkAxisActor.h.

Definition at line 316 of file vtkAxisActor.h.

Definition at line 317 of file vtkAxisActor.h.

Definition at line 318 of file vtkAxisActor.h.

int vtkAxisActor::AxisType [protected]

Definition at line 320 of file vtkAxisActor.h.

int vtkAxisActor::AxisPosition [protected]

Definition at line 321 of file vtkAxisActor.h.

double vtkAxisActor::Bounds[6] [protected]

Reimplemented from vtkProp3D.

Definition at line 322 of file vtkAxisActor.h.


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

Generated on Mon Sep 27 18:18:14 2010 for VTK by  doxygen 1.5.6