Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

vtkCubeAxesActor2D Class Reference

create a 2D plot of a bounding box edges - used for navigation. More...

#include <vtkCubeAxesActor2D.h>

Inheritance diagram for vtkCubeAxesActor2D:

Inheritance graph
[legend]
Collaboration diagram for vtkCubeAxesActor2D:

Collaboration graph
[legend]
List of all members.

Public Methods

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 vtkDataSetGetInput ()
virtual void SetProp (vtkProp *)
virtual vtkPropGetProp ()
virtual void SetBounds (float, float, float, float, float, float)
virtual void SetBounds (float[6])
float * GetBounds ()
void GetBounds (float &xmin, float &xmax, float &ymin, float &ymax, float &zmin, float &zmax)
void GetBounds (float bounds[6])
virtual void SetCamera (vtkCamera *)
virtual vtkCameraGetCamera ()
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 ()
virtual void SetBold (int)
virtual int GetBold ()
virtual void BoldOn ()
virtual void BoldOff ()
virtual void SetItalic (int)
virtual int GetItalic ()
virtual void ItalicOn ()
virtual void ItalicOff ()
virtual void SetShadow (int)
virtual int GetShadow ()
virtual void ShadowOn ()
virtual void ShadowOff ()
virtual void SetFontFamily (int)
virtual int GetFontFamily ()
void SetFontFamilyToArial ()
void SetFontFamilyToCourier ()
void SetFontFamilyToTimes ()
virtual void SetLabelFormat (const char *)
virtual char * GetLabelFormat ()
virtual void SetFontFactor (float)
virtual float GetFontFactor ()
virtual void SetInertia (int)
virtual float GetInertia ()
virtual void SetCornerOffset (float)
virtual float 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 Methods

int IsTypeOf (const char *type)
vtkCubeAxesActor2D * SafeDownCast (vtkObject *o)
vtkCubeAxesActor2D * New ()

Protected Methods

 vtkCubeAxesActor2D ()
 ~vtkCubeAxesActor2D ()
 vtkCubeAxesActor2D (const vtkCubeAxesActor2D &)
void operator= (const vtkCubeAxesActor2D &)
void TransformBounds (vtkViewport *viewport, float bounds[6], float pts[8][3])
int ClipBounds (vtkViewport *viewport, float pts[8][3], float bounds[6])
float EvaluatePoint (float planes[24], float x[3])
float EvaluateBounds (float planes[24], float bounds[6])
void AdjustAxes (float pts[8][3], float bounds[6], int idx, int xIdx, int yIdx, int zIdx, int zIdx2, int xAxes, int yAxes, int zAxes, float xCoords[4], float yCoords[4], float zCoords[4], float xRange[2], float yRange[2], float zRange[2])

Protected Attributes

vtkDataSetInput
vtkPropProp
float Bounds [6]
vtkCameraCamera
int FlyMode
int Scaling
vtkAxisActor2DXAxis
vtkAxisActor2DYAxis
vtkAxisActor2DZAxis
int NumberOfLabels
char * XLabel
char * YLabel
char * ZLabel
char * Labels [3]
int XAxisVisibility
int YAxisVisibility
int ZAxisVisibility
int Bold
int Italic
int Shadow
int FontFamily
char * LabelFormat
float FontFactor
float CornerOffset
int Inertia
int RenderCount
int InertiaAxes [8]
int RenderSomething

Detailed Description

create a 2D plot of a bounding box edges - used for navigation.

Date:
2000/12/10 20:08:22
Revision:
1.22
Thanks:
Thorsten Dowe who modified and improved this class.
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. You may optionally define font family, font size, bolding on/off, italics on/off, and text shadows on/off. (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 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 floats) is used.

See also:
vtkActor2D vtkAxis2DActor vtkXYPlotActor
Examples:
vtkCubeAxesActor2D (examples)


Member Function Documentation

float* 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.

virtual const char* vtkCubeAxesActor2D::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro 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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkActor2D.

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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkActor2D.

vtkCubeAxesActor2D* vtkCubeAxesActor2D::New   [static]
 

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.

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.

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.

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 five key render methods in vtk and they correspond to five different points in the rendering cycle. Any given prop may implement one or more of these methods. The first two methods are designed to render 3D geometry such as polygons lines, triangles. We render the opaque first then the transparent. Ray casting is different from the other methods in that the rendering process is driven not by the mapper but by the ray caster. Two methods are required to support ray casting - one for initialization, and the other to cast a ray (in viewing coordinates.) The next three methods are primarily intended for volume rendering and supports any technique that returns an image to be composited. The RenderIntoImage() method causes the rendering to occur, and the GetRGBAImage() and GetZImage() methods are used to gather results. The last method is to render any 2D annotation or overlays. Except for the ray casting methods, these methods return an integer value indicating whether or not this render method was applied to this data. For the ray cast initialization, the integer indicated whether or not the initialization was successful. For ray casting, the integer return value indicates whether or not the ray intersected something.

Reimplemented from vtkActor2D.

int vtkCubeAxesActor2D::RenderOverlay vtkViewport   [virtual]
 

Draw the axes as per the vtkProp superclass' API.

Reimplemented from vtkActor2D.

vtkCubeAxesActor2D* vtkCubeAxesActor2D::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkActor2D.

virtual void vtkCubeAxesActor2D::SetBold int    [virtual]
 

Enable/Disable bolding annotation text.

virtual void vtkCubeAxesActor2D::SetBounds float   ,
float   ,
float   ,
float   ,
float   ,
float   
[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::SetCamera vtkCamera   [virtual]
 

Set/Get the camera to perform scaling and translation of the vtkCubeAxesActor2D.

virtual void vtkCubeAxesActor2D::SetCornerOffset float    [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 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 void vtkCubeAxesActor2D::SetFontFactor float    [virtual]
 

Set/Get the factor that controls the overall size of the fonts used to label and title the axes.

virtual void vtkCubeAxesActor2D::SetFontFamily int    [virtual]
 

Set/Get the font family for the annotation text. Three font types are available: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES).

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 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 void vtkCubeAxesActor2D::SetItalic int    [virtual]
 

Enable/Disable italicizing annotation text.

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 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 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 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 void vtkCubeAxesActor2D::SetShadow int    [virtual]
 

Enable/Disable creating shadows on the annotation text. Shadows make the text easier to read.

virtual void vtkCubeAxesActor2D::SetXAxisVisibility int    [virtual]
 

Turn on and off the visibility of each axis.

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".

void vtkCubeAxesActor2D::ShallowCopy vtkCubeAxesActor2D *    actor
 

Shallow copy of a CubeAxesActor2D.


The documentation for this class was generated from the following file:
Generated on Tue Mar 19 13:24:26 2002 for VTK by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002