vtkAxesActor Class Reference
#include <vtkAxesActor.h>
Inheritance diagram for vtkAxesActor:
[legend]Collaboration diagram for vtkAxesActor:
[legend]List of all members.
Detailed Description
a 3D axes representation
vtkAxesActor is a hybrid 2D/3D actor used to represent 3D axes in a scene. The user can define the geometry to use for the shaft or the tip, and the user can set the text for the three axes. The text will appear to follow the camera since it is implemented by means of vtkCaptionActor2D. All of the functionality of the underlying vtkCaptionActor2D objects are accessable so that, for instance, the font attributes of the axes text can be manipulated through vtkTextProperty. Since this class inherits from vtkProp3D, one can apply a user transform to the underlying geometry and the positioning of the labels. For example, a rotation transform could be used to generate a left-handed axes representation.
- Thanks:
- Thanks to Goodwin Lawlor for posting a tcl script which featured the use of vtkCaptionActor2D to implement the text labels. This class is based on Paraview's vtkPVAxesActor.
- Warning:
- vtkAxesActor is primarily intended for use with vtkOrientationMarkerWidget. The bounds of this actor are calculated as though the geometry of the axes were symmetric: that is, although only positive axes are visible, bounds are calculated as though negative axes are present too. This is done intentionally to implement functionality of the camera update mechanism in vtkOrientationMarkerWidget.
- See also:
- vtkAnnotatedCubeActor vtkOrientationMarkerWidget vtkCaptionActor2D vtkTextProperty
- Created by:
-
- CVS contributions (if > 5%):
-
- CVS logs (CVSweb):
.cxx (/Hybrid/vtkAxesActor
.cxx)
.h (/Hybrid/vtkAxesActor
.h)
- Examples:
- vtkAxesActor (Examples)
- Tests:
- vtkAxesActor (Tests)
Definition at line 79 of file vtkAxesActor.h.
|
Public Types |
typedef vtkProp3D | Superclass |
enum | { CYLINDER_SHAFT,
LINE_SHAFT,
USER_DEFINED_SHAFT
} |
enum | { CONE_TIP,
SPHERE_TIP,
USER_DEFINED_TIP
} |
Public Member Functions |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | GetActors (vtkPropCollection *) |
void | ShallowCopy (vtkProp *prop) |
void | ReleaseGraphicsResources (vtkWindow *) |
unsigned long int | GetMTime () |
virtual unsigned long | GetRedrawMTime () |
|
virtual int | RenderOpaqueGeometry (vtkViewport *viewport) |
virtual int | RenderTranslucentGeometry (vtkViewport *viewport) |
virtual int | RenderOverlay (vtkViewport *viewport) |
|
void | GetBounds (double bounds[6]) |
double * | GetBounds () |
|
void | SetTotalLength (double v[3]) |
void | SetTotalLength (double x, double y, double z) |
virtual double * | GetTotalLength () |
virtual void | GetTotalLength (double data[3]) |
|
void | SetNormalizedShaftLength (double v[3]) |
void | SetNormalizedShaftLength (double x, double y, double z) |
virtual double * | GetNormalizedShaftLength () |
virtual void | GetNormalizedShaftLength (double data[3]) |
|
void | SetNormalizedTipLength (double v[3]) |
void | SetNormalizedTipLength (double x, double y, double z) |
virtual double * | GetNormalizedTipLength () |
virtual void | GetNormalizedTipLength (double data[3]) |
|
void | SetNormalizedLabelPosition (double v[3]) |
void | SetNormalizedLabelPosition (double x, double y, double z) |
virtual double * | GetNormalizedLabelPosition () |
virtual void | GetNormalizedLabelPosition (double data[3]) |
|
virtual void | SetConeResolution (int) |
virtual int | GetConeResolution () |
virtual void | SetSphereResolution (int) |
virtual int | GetSphereResolution () |
virtual void | SetCylinderResolution (int) |
virtual int | GetCylinderResolution () |
|
virtual void | SetConeRadius (double) |
virtual double | GetConeRadius () |
virtual void | SetSphereRadius (double) |
virtual double | GetSphereRadius () |
virtual void | SetCylinderRadius (double) |
virtual double | GetCylinderRadius () |
|
void | SetShaftType (int type) |
void | SetShaftTypeToCylinder () |
void | SetShaftTypeToLine () |
void | SetShaftTypeToUserDefined () |
virtual int | GetShaftType () |
|
void | SetTipType (int type) |
void | SetTipTypeToCone () |
void | SetTipTypeToSphere () |
void | SetTipTypeToUserDefined () |
virtual int | GetTipType () |
|
void | SetUserDefinedTip (vtkPolyData *) |
virtual vtkPolyData * | GetUserDefinedTip () |
|
void | SetUserDefinedShaft (vtkPolyData *) |
virtual vtkPolyData * | GetUserDefinedShaft () |
|
vtkProperty * | GetXAxisTipProperty () |
vtkProperty * | GetYAxisTipProperty () |
vtkProperty * | GetZAxisTipProperty () |
|
vtkProperty * | GetXAxisShaftProperty () |
vtkProperty * | GetYAxisShaftProperty () |
vtkProperty * | GetZAxisShaftProperty () |
|
vtkCaptionActor2D * | GetXAxisCaptionActor2D () |
vtkCaptionActor2D * | GetYAxisCaptionActor2D () |
vtkCaptionActor2D * | GetZAxisCaptionActor2D () |
|
virtual void | SetXAxisLabelText (const char *) |
virtual char * | GetXAxisLabelText () |
virtual void | SetYAxisLabelText (const char *) |
virtual char * | GetYAxisLabelText () |
virtual void | SetZAxisLabelText (const char *) |
virtual char * | GetZAxisLabelText () |
|
virtual void | SetAxisLabels (int) |
virtual int | GetAxisLabels () |
virtual void | AxisLabelsOn () |
virtual void | AxisLabelsOff () |
Static Public Member Functions |
vtkAxesActor * | New () |
int | IsTypeOf (const char *type) |
vtkAxesActor * | SafeDownCast (vtkObject *o) |
Protected Member Functions |
| vtkAxesActor () |
| ~vtkAxesActor () |
void | UpdateProps () |
Protected Attributes |
vtkCylinderSource * | CylinderSource |
vtkLineSource * | LineSource |
vtkConeSource * | ConeSource |
vtkSphereSource * | SphereSource |
vtkActor * | XAxisShaft |
vtkActor * | YAxisShaft |
vtkActor * | ZAxisShaft |
vtkActor * | XAxisTip |
vtkActor * | YAxisTip |
vtkActor * | ZAxisTip |
double | TotalLength [3] |
double | NormalizedShaftLength [3] |
double | NormalizedTipLength [3] |
double | NormalizedLabelPosition [3] |
int | ShaftType |
int | TipType |
vtkPolyData * | UserDefinedTip |
vtkPolyData * | UserDefinedShaft |
char * | XAxisLabelText |
char * | YAxisLabelText |
char * | ZAxisLabelText |
vtkCaptionActor2D * | XAxisLabel |
vtkCaptionActor2D * | YAxisLabel |
vtkCaptionActor2D * | ZAxisLabel |
int | AxisLabels |
int | ConeResolution |
int | SphereResolution |
int | CylinderResolution |
double | ConeRadius |
double | SphereRadius |
double | CylinderRadius |
Member Typedef Documentation
Member Enumeration Documentation
|
- Enumeration values:
-
CYLINDER_SHAFT |
|
LINE_SHAFT |
|
USER_DEFINED_SHAFT |
|
Definition at line 257 of file vtkAxesActor.h. |
|
- Enumeration values:
-
CONE_TIP |
|
SPHERE_TIP |
|
USER_DEFINED_TIP |
|
Definition at line 264 of file vtkAxesActor.h. |
Constructor & Destructor Documentation
vtkAxesActor::vtkAxesActor |
( |
|
) |
[protected] |
|
Member Function Documentation
|
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject. |
virtual const char* vtkAxesActor::GetClassName |
( |
|
) |
[virtual] |
|
int vtkAxesActor::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 vtkProp3D. |
virtual int vtkAxesActor::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 vtkProp3D. |
void vtkAxesActor::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 vtkProp3D. |
|
For some exporters and other other operations we must be able to collect all the actors or volumes. These methods are used in that process.
Reimplemented from vtkProp. |
virtual int vtkAxesActor::RenderOpaqueGeometry |
( |
vtkViewport * |
viewport |
) |
[virtual] |
|
|
Support the standard render methods.
Reimplemented from vtkProp. |
virtual int vtkAxesActor::RenderTranslucentGeometry |
( |
vtkViewport * |
viewport |
) |
[virtual] |
|
|
Support the standard render methods.
Reimplemented from vtkProp. |
virtual int vtkAxesActor::RenderOverlay |
( |
vtkViewport * |
viewport |
) |
[virtual] |
|
|
Support the standard render methods.
Reimplemented from vtkProp. |
void vtkAxesActor::ShallowCopy |
( |
vtkProp * |
prop |
) |
[virtual] |
|
|
Shallow copy of an axes actor. Overloads the virtual vtkProp method.
Reimplemented from vtkProp3D. |
void vtkAxesActor::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 vtkProp. |
void vtkAxesActor::GetBounds |
( |
double |
bounds[6] |
) |
|
|
|
Get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax). (The method GetBounds(double bounds[6]) is available from the superclass.)
Reimplemented from vtkProp3D. |
double* vtkAxesActor::GetBounds |
( |
|
) |
[virtual] |
|
|
Get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax). (The method GetBounds(double bounds[6]) is available from the superclass.)
Implements vtkProp3D. |
unsigned long int vtkAxesActor::GetMTime |
( |
|
) |
[virtual] |
|
|
Get the actors mtime plus consider its properties and texture if set.
Reimplemented from vtkProp3D. |
virtual unsigned long vtkAxesActor::GetRedrawMTime |
( |
|
) |
[virtual] |
|
|
Return the mtime of anything that would cause the rendered image to appear differently. Usually this involves checking the mtime of the prop plus anything else it depends on such as properties, textures etc.
Reimplemented from vtkProp. |
void vtkAxesActor::SetTotalLength |
( |
double |
v[3] |
) |
[inline] |
|
|
Set the total length of the axes in 3 dimensions.
Definition at line 125 of file vtkAxesActor.h. |
void vtkAxesActor::SetTotalLength |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
|
|
|
Set the total length of the axes in 3 dimensions. |
virtual double* vtkAxesActor::GetTotalLength |
( |
|
) |
[virtual] |
|
|
Set the total length of the axes in 3 dimensions. |
virtual void vtkAxesActor::GetTotalLength |
( |
double |
data[3] |
) |
[virtual] |
|
|
Set the total length of the axes in 3 dimensions. |
void vtkAxesActor::SetNormalizedShaftLength |
( |
double |
v[3] |
) |
[inline] |
|
|
Set the normalized (0-1) length of the shaft.
Definition at line 133 of file vtkAxesActor.h. |
void vtkAxesActor::SetNormalizedShaftLength |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
|
|
|
Set the normalized (0-1) length of the shaft. |
virtual double* vtkAxesActor::GetNormalizedShaftLength |
( |
|
) |
[virtual] |
|
|
Set the normalized (0-1) length of the shaft. |
virtual void vtkAxesActor::GetNormalizedShaftLength |
( |
double |
data[3] |
) |
[virtual] |
|
|
Set the normalized (0-1) length of the shaft. |
void vtkAxesActor::SetNormalizedTipLength |
( |
double |
v[3] |
) |
[inline] |
|
|
Set the normalized (0-1) length of the tip. Normally, this would be 1 - the normalized length of the shaft.
Definition at line 142 of file vtkAxesActor.h. |
void vtkAxesActor::SetNormalizedTipLength |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
|
|
|
Set the normalized (0-1) length of the tip. Normally, this would be 1 - the normalized length of the shaft. |
virtual double* vtkAxesActor::GetNormalizedTipLength |
( |
|
) |
[virtual] |
|
|
Set the normalized (0-1) length of the tip. Normally, this would be 1 - the normalized length of the shaft. |
virtual void vtkAxesActor::GetNormalizedTipLength |
( |
double |
data[3] |
) |
[virtual] |
|
|
Set the normalized (0-1) length of the tip. Normally, this would be 1 - the normalized length of the shaft. |
void vtkAxesActor::SetNormalizedLabelPosition |
( |
double |
v[3] |
) |
[inline] |
|
|
Set the normalized (0-1) position of the label along the length of the shaft. A value > 1 is permissible.
Definition at line 151 of file vtkAxesActor.h. |
void vtkAxesActor::SetNormalizedLabelPosition |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
|
|
|
Set the normalized (0-1) position of the label along the length of the shaft. A value > 1 is permissible. |
virtual double* vtkAxesActor::GetNormalizedLabelPosition |
( |
|
) |
[virtual] |
|
|
Set the normalized (0-1) position of the label along the length of the shaft. A value > 1 is permissible. |
virtual void vtkAxesActor::GetNormalizedLabelPosition |
( |
double |
data[3] |
) |
[virtual] |
|
|
Set the normalized (0-1) position of the label along the length of the shaft. A value > 1 is permissible. |
virtual void vtkAxesActor::SetConeResolution |
( |
int |
|
) |
[virtual] |
|
|
Set/get the resolution of the pieces of the axes actor. |
virtual int vtkAxesActor::GetConeResolution |
( |
|
) |
[virtual] |
|
|
Set/get the resolution of the pieces of the axes actor. |
virtual void vtkAxesActor::SetSphereResolution |
( |
int |
|
) |
[virtual] |
|
|
Set/get the resolution of the pieces of the axes actor. |
virtual int vtkAxesActor::GetSphereResolution |
( |
|
) |
[virtual] |
|
|
Set/get the resolution of the pieces of the axes actor. |
virtual void vtkAxesActor::SetCylinderResolution |
( |
int |
|
) |
[virtual] |
|
|
Set/get the resolution of the pieces of the axes actor. |
virtual int vtkAxesActor::GetCylinderResolution |
( |
|
) |
[virtual] |
|
|
Set/get the resolution of the pieces of the axes actor. |
virtual void vtkAxesActor::SetConeRadius |
( |
double |
|
) |
[virtual] |
|
|
Set/get the radius of the pieces of the axes actor. |
virtual double vtkAxesActor::GetConeRadius |
( |
|
) |
[virtual] |
|
|
Set/get the radius of the pieces of the axes actor. |
virtual void vtkAxesActor::SetSphereRadius |
( |
double |
|
) |
[virtual] |
|
|
Set/get the radius of the pieces of the axes actor. |
virtual double vtkAxesActor::GetSphereRadius |
( |
|
) |
[virtual] |
|
|
Set/get the radius of the pieces of the axes actor. |
virtual void vtkAxesActor::SetCylinderRadius |
( |
double |
|
) |
[virtual] |
|
|
Set/get the radius of the pieces of the axes actor. |
virtual double vtkAxesActor::GetCylinderRadius |
( |
|
) |
[virtual] |
|
|
Set/get the radius of the pieces of the axes actor. |
void vtkAxesActor::SetShaftType |
( |
int |
type |
) |
|
|
|
Set the type of the shaft to a cylinder, line, or user defined geometry. |
void vtkAxesActor::SetShaftTypeToCylinder |
( |
|
) |
[inline] |
|
void vtkAxesActor::SetShaftTypeToLine |
( |
|
) |
[inline] |
|
|
Set the type of the shaft to a cylinder, line, or user defined geometry.
Definition at line 183 of file vtkAxesActor.h.
References LINE_SHAFT. |
void vtkAxesActor::SetShaftTypeToUserDefined |
( |
|
) |
[inline] |
|
virtual int vtkAxesActor::GetShaftType |
( |
|
) |
[virtual] |
|
|
Set the type of the shaft to a cylinder, line, or user defined geometry. |
void vtkAxesActor::SetTipType |
( |
int |
type |
) |
|
|
|
Set the type of the tip to a cone, sphere, or user defined geometry. |
void vtkAxesActor::SetTipTypeToCone |
( |
|
) |
[inline] |
|
|
Set the type of the tip to a cone, sphere, or user defined geometry.
Definition at line 193 of file vtkAxesActor.h.
References CONE_TIP. |
void vtkAxesActor::SetTipTypeToSphere |
( |
|
) |
[inline] |
|
|
Set the type of the tip to a cone, sphere, or user defined geometry.
Definition at line 195 of file vtkAxesActor.h.
References SPHERE_TIP. |
void vtkAxesActor::SetTipTypeToUserDefined |
( |
|
) |
[inline] |
|
virtual int vtkAxesActor::GetTipType |
( |
|
) |
[virtual] |
|
|
Set the type of the tip to a cone, sphere, or user defined geometry. |
|
Set the user defined tip polydata. |
virtual vtkPolyData* vtkAxesActor::GetUserDefinedTip |
( |
|
) |
[virtual] |
|
|
Set the user defined tip polydata. |
void vtkAxesActor::SetUserDefinedShaft |
( |
vtkPolyData * |
|
) |
|
|
|
Set the user defined shaft polydata. |
virtual vtkPolyData* vtkAxesActor::GetUserDefinedShaft |
( |
|
) |
[virtual] |
|
|
Set the user defined shaft polydata. |
|
Get the shaft properties. |
|
Get the shaft properties. |
|
Get the shaft properties. |
|
Retrieve handles to the X, Y and Z axis (so that you can set their text properties for example)
Definition at line 231 of file vtkAxesActor.h. |
|
Retrieve handles to the X, Y and Z axis (so that you can set their text properties for example)
Definition at line 233 of file vtkAxesActor.h. |
|
Retrieve handles to the X, Y and Z axis (so that you can set their text properties for example)
Definition at line 235 of file vtkAxesActor.h. |
virtual void vtkAxesActor::SetXAxisLabelText |
( |
const char * |
|
) |
[virtual] |
|
virtual char* vtkAxesActor::GetXAxisLabelText |
( |
|
) |
[virtual] |
|
virtual void vtkAxesActor::SetYAxisLabelText |
( |
const char * |
|
) |
[virtual] |
|
virtual char* vtkAxesActor::GetYAxisLabelText |
( |
|
) |
[virtual] |
|
virtual void vtkAxesActor::SetZAxisLabelText |
( |
const char * |
|
) |
[virtual] |
|
virtual char* vtkAxesActor::GetZAxisLabelText |
( |
|
) |
[virtual] |
|
virtual void vtkAxesActor::SetAxisLabels |
( |
int |
|
) |
[virtual] |
|
|
Enable/disable drawing the axis labels. |
virtual int vtkAxesActor::GetAxisLabels |
( |
|
) |
[virtual] |
|
|
Enable/disable drawing the axis labels. |
virtual void vtkAxesActor::AxisLabelsOn |
( |
|
) |
[virtual] |
|
|
Enable/disable drawing the axis labels. |
virtual void vtkAxesActor::AxisLabelsOff |
( |
|
) |
[virtual] |
|
|
Enable/disable drawing the axis labels. |
void vtkAxesActor::UpdateProps |
( |
|
) |
[protected] |
|
Member Data Documentation
The documentation for this class was generated from the following file: