vtkCubeAxesActor2D Class Reference
#include <vtkCubeAxesActor2D.h>
Inheritance diagram for vtkCubeAxesActor2D:
[legend]Collaboration diagram for vtkCubeAxesActor2D:
[legend]List of all members.
Detailed Description
create a 2D plot of a bounding box edges - used for navigation
vtkCubeAxesActor2D is a composite actor that draws three axes of the bounding box of an input dataset. The axes include labels and titles for the x-y-z axes. The algorithm selects the axes that are on the "exterior" of the bounding box, exterior as determined from examining outer edges of the bounding box in projection (display) space. Alternatively, the edges closest to the viewer (i.e., camera position) can be drawn.
To use this object you must define a bounding box and the camera used to render the vtkCubeAxesActor2D. The camera is used to control the scaling and position of the vtkCubeAxesActor2D so that it fits in the viewport and always remains visible.)
The font property of the axes titles and labels can be modified through the AxisTitleTextProperty and AxisLabelTextProperty attributes. You may also use the GetXAxisActor2D, GetYAxisActor2D or GetZAxisActor2D methods to access each individual axis actor to modify their font properties.
The bounding box to use is defined in one of three ways. First, if the Input ivar is defined, then the input dataset's bounds is used. If the Input is not defined, and the Prop (superclass of all actors) is defined, then the Prop's bounds is used. If neither the Input or Prop is defined, then the Bounds instance variable (an array of six doubles) is used.
- See also:
- vtkActor2D vtkAxis2DActor vtkXYPlotActor vtkTextProperty
- Examples:
- vtkCubeAxesActor2D (Examples)
- Tests:
- vtkCubeAxesActor2D (Tests)
Definition at line 64 of file vtkCubeAxesActor2D.h.
|
Public Types |
typedef vtkActor2D | Superclass |
Public Member Functions |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
int | RenderOverlay (vtkViewport *) |
int | RenderOpaqueGeometry (vtkViewport *) |
int | RenderTranslucentGeometry (vtkViewport *) |
virtual void | SetInput (vtkDataSet *) |
virtual vtkDataSet * | GetInput () |
virtual void | SetProp (vtkProp *) |
virtual vtkProp * | GetProp () |
virtual void | SetBounds (double, double, double, double, double, double) |
virtual void | SetBounds (double[6]) |
double * | GetBounds () |
void | GetBounds (double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) |
void | GetBounds (double bounds[6]) |
virtual void | SetRanges (double, double, double, double, double, double) |
virtual void | SetRanges (double[6]) |
double * | GetRanges () |
void | GetRanges (double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) |
void | GetRanges (double ranges[6]) |
virtual void | SetUseRanges (int) |
virtual int | GetUseRanges () |
virtual void | UseRangesOn () |
virtual void | UseRangesOff () |
virtual void | SetCamera (vtkCamera *) |
virtual vtkCamera * | GetCamera () |
virtual void | SetFlyMode (int) |
virtual int | GetFlyMode () |
void | SetFlyModeToOuterEdges () |
void | SetFlyModeToClosestTriad () |
virtual void | SetScaling (int) |
virtual int | GetScaling () |
virtual void | ScalingOn () |
virtual void | ScalingOff () |
virtual void | SetNumberOfLabels (int) |
virtual int | GetNumberOfLabels () |
virtual void | SetXLabel (const char *) |
virtual char * | GetXLabel () |
virtual void | SetYLabel (const char *) |
virtual char * | GetYLabel () |
virtual void | SetZLabel (const char *) |
virtual char * | GetZLabel () |
vtkAxisActor2D * | GetXAxisActor2D () |
vtkAxisActor2D * | GetYAxisActor2D () |
vtkAxisActor2D * | GetZAxisActor2D () |
virtual void | SetAxisTitleTextProperty (vtkTextProperty *p) |
virtual vtkTextProperty * | GetAxisTitleTextProperty () |
virtual void | SetAxisLabelTextProperty (vtkTextProperty *p) |
virtual vtkTextProperty * | GetAxisLabelTextProperty () |
virtual void | SetLabelFormat (const char *) |
virtual char * | GetLabelFormat () |
virtual void | SetFontFactor (double) |
virtual double | GetFontFactor () |
virtual void | SetInertia (int) |
virtual double | GetInertia () |
virtual void | SetCornerOffset (double) |
virtual double | GetCornerOffset () |
void | ReleaseGraphicsResources (vtkWindow *) |
virtual void | SetXAxisVisibility (int) |
virtual int | GetXAxisVisibility () |
virtual void | XAxisVisibilityOn () |
virtual void | XAxisVisibilityOff () |
virtual void | SetYAxisVisibility (int) |
virtual int | GetYAxisVisibility () |
virtual void | YAxisVisibilityOn () |
virtual void | YAxisVisibilityOff () |
virtual void | SetZAxisVisibility (int) |
virtual int | GetZAxisVisibility () |
virtual void | ZAxisVisibilityOn () |
virtual void | ZAxisVisibilityOff () |
void | ShallowCopy (vtkCubeAxesActor2D *actor) |
Static Public Member Functions |
static int | IsTypeOf (const char *type) |
static vtkCubeAxesActor2D * | SafeDownCast (vtkObject *o) |
static vtkCubeAxesActor2D * | New () |
Protected Member Functions |
| vtkCubeAxesActor2D () |
| ~vtkCubeAxesActor2D () |
void | TransformBounds (vtkViewport *viewport, double bounds[6], double pts[8][3]) |
int | ClipBounds (vtkViewport *viewport, double pts[8][3], double bounds[6]) |
double | EvaluatePoint (double planes[24], double x[3]) |
double | EvaluateBounds (double planes[24], double bounds[6]) |
void | AdjustAxes (double pts[8][3], double bounds[6], int idx, int xIdx, int yIdx, int zIdx, int zIdx2, int xAxes, int yAxes, int zAxes, double xCoords[4], double yCoords[4], double zCoords[4], double xRange[2], double yRange[2], double zRange[2]) |
Protected Attributes |
vtkDataSet * | Input |
vtkProp * | Prop |
double | Bounds [6] |
double | Ranges [6] |
int | UseRanges |
vtkCamera * | Camera |
int | FlyMode |
int | Scaling |
vtkAxisActor2D * | XAxis |
vtkAxisActor2D * | YAxis |
vtkAxisActor2D * | ZAxis |
vtkTextProperty * | AxisTitleTextProperty |
vtkTextProperty * | AxisLabelTextProperty |
vtkTimeStamp | BuildTime |
int | NumberOfLabels |
char * | XLabel |
char * | YLabel |
char * | ZLabel |
char * | Labels [3] |
int | XAxisVisibility |
int | YAxisVisibility |
int | ZAxisVisibility |
char * | LabelFormat |
double | FontFactor |
double | CornerOffset |
int | Inertia |
int | RenderCount |
int | InertiaAxes [8] |
int | RenderSomething |
Member Typedef Documentation
Constructor & Destructor Documentation
vtkCubeAxesActor2D::vtkCubeAxesActor2D |
( |
|
) |
[protected] |
|
vtkCubeAxesActor2D::~vtkCubeAxesActor2D |
( |
|
) |
[protected] |
|
Member Function Documentation
virtual const char* vtkCubeAxesActor2D::GetClassName |
( |
|
) |
[virtual] |
|
static int vtkCubeAxesActor2D::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 vtkActor2D. |
virtual int vtkCubeAxesActor2D::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 vtkActor2D. |
void vtkCubeAxesActor2D::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 vtkActor2D. |
|
Instantiate object with bold, italic, and shadow enabled; font family set to Arial; and label format "6.3g". The number of labels per axis is set to 3.
Reimplemented from vtkActor2D. |
int vtkCubeAxesActor2D::RenderOverlay |
( |
vtkViewport * |
|
) |
[virtual] |
|
int vtkCubeAxesActor2D::RenderOpaqueGeometry |
( |
vtkViewport * |
|
) |
[virtual] |
|
|
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDERING PROCESS All concrete subclasses must be able to render themselves. There are three key render methods in vtk and they correspond to three different points in the rendering cycle. Any given prop may implement one or more of these methods. The first method is intended for rendering all opaque geometry. The second method is intended for rendering all translucent geometry. Most volume rendering mappers draw their results during this second method. The last method is to render any 2D annotation or overlays. Each of these methods return an integer value indicating whether or not this render method was applied to this data.
Reimplemented from vtkActor2D. |
int vtkCubeAxesActor2D::RenderTranslucentGeometry |
( |
vtkViewport * |
|
) |
[inline, virtual] |
|
virtual void vtkCubeAxesActor2D::SetInput |
( |
vtkDataSet * |
|
) |
[virtual] |
|
|
Use the bounding box of this input dataset to draw the cube axes. If this is not specified, then the class will attempt to determine the bounds from the defined Prop or Bounds. |
virtual vtkDataSet* vtkCubeAxesActor2D::GetInput |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetProp |
( |
vtkProp * |
|
) |
[virtual] |
|
|
Use the bounding box of this prop to draw the cube axes. The Prop is used to determine the bounds only if the Input is not defined. |
virtual vtkProp* vtkCubeAxesActor2D::GetProp |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetBounds |
( |
double |
, |
|
|
double |
, |
|
|
double |
, |
|
|
double |
, |
|
|
double |
, |
|
|
double |
|
|
) |
[virtual] |
|
|
Explicitly specify the region in space around which to draw the bounds. The bounds is used only when no Input or Prop is specified. The bounds are specified according to (xmin,xmax, ymin,ymax, zmin,zmax), making sure that the min's are less than the max's. |
virtual void vtkCubeAxesActor2D::SetBounds |
( |
double |
[6] |
) |
[virtual] |
|
double* vtkCubeAxesActor2D::GetBounds |
( |
|
) |
[virtual] |
|
|
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax). in world coordinates. NULL means that the bounds are not defined.
Reimplemented from vtkProp. |
void vtkCubeAxesActor2D::GetBounds |
( |
double & |
xmin, |
|
|
double & |
xmax, |
|
|
double & |
ymin, |
|
|
double & |
ymax, |
|
|
double & |
zmin, |
|
|
double & |
zmax |
|
) |
|
|
void vtkCubeAxesActor2D::GetBounds |
( |
double |
bounds[6] |
) |
|
|
virtual void vtkCubeAxesActor2D::SetRanges |
( |
double |
, |
|
|
double |
, |
|
|
double |
, |
|
|
double |
, |
|
|
double |
, |
|
|
double |
|
|
) |
[virtual] |
|
|
Explicitly specify the range of values used on the bounds. The ranges are specified according to (xmin,xmax, ymin,ymax, zmin,zmax), making sure that the min's are less than the max's. |
virtual void vtkCubeAxesActor2D::SetRanges |
( |
double |
[6] |
) |
[virtual] |
|
double* vtkCubeAxesActor2D::GetRanges |
( |
|
) |
|
|
void vtkCubeAxesActor2D::GetRanges |
( |
double & |
xmin, |
|
|
double & |
xmax, |
|
|
double & |
ymin, |
|
|
double & |
ymax, |
|
|
double & |
zmin, |
|
|
double & |
zmax |
|
) |
|
|
void vtkCubeAxesActor2D::GetRanges |
( |
double |
ranges[6] |
) |
|
|
virtual void vtkCubeAxesActor2D::SetUseRanges |
( |
int |
|
) |
[virtual] |
|
|
Set/Get a flag that controls whether the axes use the data ranges or the ranges set by SetRanges. By default the axes use the data ranges. |
virtual int vtkCubeAxesActor2D::GetUseRanges |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::UseRangesOn |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::UseRangesOff |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetCamera |
( |
vtkCamera * |
|
) |
[virtual] |
|
|
Set/Get the camera to perform scaling and translation of the vtkCubeAxesActor2D. |
virtual vtkCamera* vtkCubeAxesActor2D::GetCamera |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetFlyMode |
( |
int |
|
) |
[virtual] |
|
|
Specify a mode to control how the axes are drawn: either outer edges or closest triad to the camera position. |
virtual int vtkCubeAxesActor2D::GetFlyMode |
( |
|
) |
[virtual] |
|
void vtkCubeAxesActor2D::SetFlyModeToOuterEdges |
( |
|
) |
[inline] |
|
void vtkCubeAxesActor2D::SetFlyModeToClosestTriad |
( |
|
) |
[inline] |
|
virtual void vtkCubeAxesActor2D::SetScaling |
( |
int |
|
) |
[virtual] |
|
|
Set/Get a flag that controls whether the axes are scaled to fit in the viewport. If off, the axes size remains constant (i.e., stay the size of the bounding box). By default scaling is on so the axes are scaled to fit inside the viewport. |
virtual int vtkCubeAxesActor2D::GetScaling |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::ScalingOn |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::ScalingOff |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetNumberOfLabels |
( |
int |
|
) |
[virtual] |
|
|
Set/Get the number of annotation labels to show along the x, y, and z axes. This values is a suggestion: the number of labels may vary depending on the particulars of the data. |
virtual int vtkCubeAxesActor2D::GetNumberOfLabels |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetXLabel |
( |
const char * |
|
) |
[virtual] |
|
|
Set/Get the labels for the x, y, and z axes. By default, use "X", "Y" and "Z". |
virtual char* vtkCubeAxesActor2D::GetXLabel |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetYLabel |
( |
const char * |
|
) |
[virtual] |
|
virtual char* vtkCubeAxesActor2D::GetYLabel |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetZLabel |
( |
const char * |
|
) |
[virtual] |
|
virtual char* vtkCubeAxesActor2D::GetZLabel |
( |
|
) |
[virtual] |
|
|
Retrieve handles to the X, Y and Z axis (so that you can set their text properties for example)
Definition at line 178 of file vtkCubeAxesActor2D.h. |
virtual void vtkCubeAxesActor2D::SetAxisTitleTextProperty |
( |
vtkTextProperty * |
p |
) |
[virtual] |
|
|
Set/Get the title text property of all axes. Note that each axis can be controlled individually through the GetX/Y/ZAxisActor2D() methods. |
virtual vtkTextProperty* vtkCubeAxesActor2D::GetAxisTitleTextProperty |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetAxisLabelTextProperty |
( |
vtkTextProperty * |
p |
) |
[virtual] |
|
|
Set/Get the labels text property of all axes. Note that each axis can be controlled individually through the GetX/Y/ZAxisActor2D() methods. |
virtual vtkTextProperty* vtkCubeAxesActor2D::GetAxisLabelTextProperty |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetLabelFormat |
( |
const char * |
|
) |
[virtual] |
|
|
Set/Get the format with which to print the labels on each of the x-y-z axes. |
virtual char* vtkCubeAxesActor2D::GetLabelFormat |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetFontFactor |
( |
double |
|
) |
[virtual] |
|
|
Set/Get the factor that controls the overall size of the fonts used to label and title the axes. |
virtual double vtkCubeAxesActor2D::GetFontFactor |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetInertia |
( |
int |
|
) |
[virtual] |
|
|
Set/Get the inertial factor that controls how often (i.e, how many renders) the axes can switch position (jump from one axes to another). |
virtual double vtkCubeAxesActor2D::GetInertia |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetCornerOffset |
( |
double |
|
) |
[virtual] |
|
|
Specify an offset value to "pull back" the axes from the corner at which they are joined to avoid overlap of axes labels. The "CornerOffset" is the fraction of the axis length to pull back. |
virtual double vtkCubeAxesActor2D::GetCornerOffset |
( |
|
) |
[virtual] |
|
void vtkCubeAxesActor2D::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 vtkActor2D. |
virtual void vtkCubeAxesActor2D::SetXAxisVisibility |
( |
int |
|
) |
[virtual] |
|
|
Turn on and off the visibility of each axis. |
virtual int vtkCubeAxesActor2D::GetXAxisVisibility |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::XAxisVisibilityOn |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::XAxisVisibilityOff |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetYAxisVisibility |
( |
int |
|
) |
[virtual] |
|
virtual int vtkCubeAxesActor2D::GetYAxisVisibility |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::YAxisVisibilityOn |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::YAxisVisibilityOff |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::SetZAxisVisibility |
( |
int |
|
) |
[virtual] |
|
virtual int vtkCubeAxesActor2D::GetZAxisVisibility |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::ZAxisVisibilityOn |
( |
|
) |
[virtual] |
|
virtual void vtkCubeAxesActor2D::ZAxisVisibilityOff |
( |
|
) |
[virtual] |
|
|
Shallow copy of a CubeAxesActor2D. |
void vtkCubeAxesActor2D::TransformBounds |
( |
vtkViewport * |
viewport, |
|
|
double |
bounds[6], |
|
|
double |
pts[8][3] |
|
) |
[protected] |
|
int vtkCubeAxesActor2D::ClipBounds |
( |
vtkViewport * |
viewport, |
|
|
double |
pts[8][3], |
|
|
double |
bounds[6] |
|
) |
[protected] |
|
double vtkCubeAxesActor2D::EvaluatePoint |
( |
double |
planes[24], |
|
|
double |
x[3] |
|
) |
[protected] |
|
double vtkCubeAxesActor2D::EvaluateBounds |
( |
double |
planes[24], |
|
|
double |
bounds[6] |
|
) |
[protected] |
|
void vtkCubeAxesActor2D::AdjustAxes |
( |
double |
pts[8][3], |
|
|
double |
bounds[6], |
|
|
int |
idx, |
|
|
int |
xIdx, |
|
|
int |
yIdx, |
|
|
int |
zIdx, |
|
|
int |
zIdx2, |
|
|
int |
xAxes, |
|
|
int |
yAxes, |
|
|
int |
zAxes, |
|
|
double |
xCoords[4], |
|
|
double |
yCoords[4], |
|
|
double |
zCoords[4], |
|
|
double |
xRange[2], |
|
|
double |
yRange[2], |
|
|
double |
zRange[2] |
|
) |
[protected] |
|
Member Data Documentation
The documentation for this class was generated from the following file: