VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkChartXYZ Class Reference

Factory class for drawing 3D XYZ charts. More...

#include <vtkChartXYZ.h>

Inheritance diagram for vtkChartXYZ:
[legend]
Collaboration diagram for vtkChartXYZ:
[legend]

Public Types

typedef vtkContextItem Superclass
 
- Public Types inherited from vtkContextItem
typedef vtkAbstractContextItem Superclass
 
- Public Types inherited from vtkAbstractContextItem
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkChartXYZNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
void SetGeometry (const vtkRectf &bounds)
 Set the geometry in pixel coordinates (origin and width/height). More...
 
void SetAngle (double angle)
 Set the rotation angle for the chart (AutoRotate mode only). More...
 
void SetAroundX (bool isX)
 Set whether or not we're rotating about the X axis. More...
 
virtual void SetAnnotationLink (vtkAnnotationLink *link)
 Set the vtkAnnotationLink for the chart. More...
 
vtkAxisGetAxis (int axis)
 Get the x (0), y (1) or z (2) axis. More...
 
virtual void SetAxis (int axisIndex, vtkAxis *axis)
 Set the x (0), y (1) or z (2) axis. More...
 
void SetAutoRotate (bool b)
 Set whether or not we're using this chart to rotate on a timer. More...
 
void SetDecorateAxes (bool b)
 Set whether or not axes labels & tick marks should be drawn. More...
 
void SetFitToScene (bool b)
 Set whether or not the chart should automatically resize itself to fill the scene. More...
 
void Update () override
 Perform any updates to the item that may be necessary before rendering. More...
 
bool Paint (vtkContext2D *painter) override
 Paint event for the chart, called whenever the chart needs to be drawn. More...
 
virtual vtkIdType AddPlot (vtkPlot3D *plot)
 Adds a plot to the chart. More...
 
void ClearPlots ()
 Remove all the plots from this chart. More...
 
void RecalculateBounds ()
 Determine the XYZ bounds of the plots within this chart. More...
 
void RecalculateTransform ()
 Use this chart's Geometry to set the endpoints of its axes. More...
 
bool Hit (const vtkContextMouseEvent &mouse) override
 Returns true if the transform is interactive, false otherwise. More...
 
bool MouseButtonPressEvent (const vtkContextMouseEvent &mouse) override
 Mouse press event. More...
 
bool MouseMoveEvent (const vtkContextMouseEvent &mouse) override
 Mouse move event. More...
 
bool MouseWheelEvent (const vtkContextMouseEvent &mouse, int delta) override
 Mouse wheel event. More...
 
bool KeyPressEvent (const vtkContextKeyEvent &key) override
 Key press event. More...
 
void SetAxisColor (const vtkColor4ub &color)
 Set the color for the axes. More...
 
vtkColor4ub GetAxisColor ()
 Set the color for the axes. More...
 
- Public Member Functions inherited from vtkContextItem
vtkContextItemNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual double GetOpacity ()
 Get the opacity of the item. More...
 
virtual void SetOpacity (double)
 Set the opacity of the item. More...
 
- Public Member Functions inherited from vtkAbstractContextItem
vtkAbstractContextItemNewInstance () const
 
virtual bool PaintChildren (vtkContext2D *painter)
 Paint the children of the item, should be called whenever the children need to be rendered. More...
 
virtual void ReleaseGraphicsResources ()
 Release graphics resources hold by the item. More...
 
vtkIdType AddItem (vtkAbstractContextItem *item)
 Add child items to this item. More...
 
bool RemoveItem (vtkAbstractContextItem *item)
 Remove child item from this item. More...
 
bool RemoveItem (vtkIdType index)
 Remove child item from this item. More...
 
vtkAbstractContextItemGetItem (vtkIdType index)
 Get the item at the specified index. More...
 
vtkIdType GetItemIndex (vtkAbstractContextItem *item)
 Get the index of the specified item in itemIndex. More...
 
vtkIdType GetNumberOfItems ()
 Get the number of child items. More...
 
void ClearItems ()
 Remove all child items from this item. More...
 
vtkIdType Raise (vtkIdType index)
 Raises the child to the top of the item's stack. More...
 
virtual vtkIdType StackAbove (vtkIdType index, vtkIdType under)
 Raises the child above the under sibling. More...
 
vtkIdType Lower (vtkIdType index)
 Lowers the child to the bottom of the item's stack. More...
 
virtual vtkIdType StackUnder (vtkIdType child, vtkIdType above)
 Lowers the child under the above sibling. More...
 
virtual vtkAbstractContextItemGetPickedItem (const vtkContextMouseEvent &mouse)
 Return the item under the mouse. More...
 
virtual bool MouseEnterEvent (const vtkContextMouseEvent &mouse)
 Mouse enter event. More...
 
virtual bool MouseLeaveEvent (const vtkContextMouseEvent &mouse)
 Mouse leave event. More...
 
virtual bool MouseButtonReleaseEvent (const vtkContextMouseEvent &mouse)
 Mouse button release event. More...
 
virtual bool MouseDoubleClickEvent (const vtkContextMouseEvent &mouse)
 Mouse button double click event. More...
 
virtual bool KeyReleaseEvent (const vtkContextKeyEvent &key)
 Key release event. More...
 
virtual void SetScene (vtkContextScene *scene)
 Set the vtkContextScene for the item, always set for an item in a scene. More...
 
vtkContextSceneGetScene ()
 Get the vtkContextScene for the item, always set for an item in a scene. More...
 
virtual void SetParent (vtkAbstractContextItem *parent)
 Set the parent item. More...
 
vtkAbstractContextItemGetParent ()
 Get the parent item. More...
 
virtual vtkVector2f MapToParent (const vtkVector2f &point)
 Maps the point to the parent coordinate system. More...
 
virtual vtkVector2f MapFromParent (const vtkVector2f &point)
 Maps the point from the parent coordinate system. More...
 
virtual vtkVector2f MapToScene (const vtkVector2f &point)
 Maps the point to the scene coordinate system. More...
 
virtual vtkVector2f MapFromScene (const vtkVector2f &point)
 Maps the point from the scene coordinate system. More...
 
virtual bool GetVisible ()
 Get the visibility of the item (should it be drawn). More...
 
virtual void SetVisible (bool)
 Set the visibility of the item (should it be drawn). More...
 
virtual bool GetInteractive ()
 Get if the item is interactive (should respond to mouse events). More...
 
virtual void SetInteractive (bool)
 Set if the item is interactive (should respond to mouse events). More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time. More...
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
int InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
void PrintRevisions (ostream &)
 Legacy. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 

Static Public Member Functions

static vtkTypeBool IsTypeOf (const char *type)
 
static vtkChartXYZSafeDownCast (vtkObjectBase *o)
 
static vtkChartXYZNew ()
 
- Static Public Member Functions inherited from vtkContextItem
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkContextItemSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractContextItem
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkAbstractContextItemSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkChartXYZ ()
 
 ~vtkChartXYZ () override
 
virtual void CalculateTransforms ()
 Calculate the transformation matrices used to draw data points and axes in the scene. More...
 
bool CalculatePlotTransform (vtkAxis *x, vtkAxis *y, vtkAxis *z, vtkTransform *transform)
 Given the x, y and z vtkAxis, and a transform, calculate the transform that the points in a chart would need to be drawn within the axes. More...
 
bool Rotate (const vtkContextMouseEvent &mouse)
 Rotate the chart in response to a mouse movement. More...
 
bool Pan (const vtkContextMouseEvent &mouse)
 Pan the data within the chart in response to a mouse movement. More...
 
bool Zoom (const vtkContextMouseEvent &mouse)
 Zoom in or out on the data in response to a mouse movement. More...
 
bool Spin (const vtkContextMouseEvent &mouse)
 Spin the chart in response to a mouse movement. More...
 
void LookDownX ()
 Adjust the rotation of the chart so that we are looking down the X axis. More...
 
void LookDownY ()
 Adjust the rotation of the chart so that we are looking down the Y axis. More...
 
void LookDownZ ()
 Adjust the rotation of the chart so that we are looking down the Z axis. More...
 
void LookUpX ()
 Adjust the rotation of the chart so that we are looking up the X axis. More...
 
void LookUpY ()
 Adjust the rotation of the chart so that we are looking up the Y axis. More...
 
void LookUpZ ()
 Adjust the rotation of the chart so that we are looking up the Z axis. More...
 
bool CheckForSceneResize ()
 Check to see if the scene changed size since the last render. More...
 
void RescaleAxes ()
 Scale the axes up or down in response to a scene resize. More...
 
void ScaleUpAxes ()
 Scale up the axes when the scene gets larger. More...
 
void ScaleDownAxes ()
 Scale down the axes when the scene gets smaller. More...
 
void ZoomAxes (int delta)
 Change the scaling of the axes by a specified amount. More...
 
void InitializeAxesBoundaryPoints ()
 Initialize a list of "test points". More...
 
void InitializeFutureBox ()
 Initialize the "future box" transform. More...
 
void ComputeDataBounds ()
 Compute a bounding box for the data that is rendered within the axes. More...
 
void DrawAxes (vtkContext3D *context)
 Draw the cube axes of this chart. More...
 
void DetermineWhichAxesToLabel ()
 For each of the XYZ dimensions, find the axis line that is furthest from the rendered data. More...
 
void DrawTickMarks (vtkContext2D *painter)
 Draw tick marks and tick mark labels along the axes. More...
 
void DrawAxesLabels (vtkContext2D *painter)
 Label the axes. More...
 
void GetOffsetForAxisLabel (int axis, float *bounds, float *offset)
 Compute how some text should be offset from an axis. More...
 
double CalculateNiceMinMax (double &min, double &max, int axis)
 Calculate the next "nicest" numbers above and below the current minimum. More...
 
void GetClippingPlaneEquation (int i, double *planeEquation)
 Get the equation for the ith face of our bounding cube. More...
 
- Protected Member Functions inherited from vtkContextItem
 vtkContextItem ()
 
 ~vtkContextItem () override
 
- Protected Member Functions inherited from vtkAbstractContextItem
 vtkAbstractContextItem ()
 
 ~vtkAbstractContextItem () override
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkRectf Geometry
 The size and position of this chart. More...
 
std::vector< vtkSmartPointer< vtkAxis > > Axes
 The 3 axes of this chart. More...
 
bool AutoRotate
 This boolean indicates whether or not we're using this chart to rotate on a timer. More...
 
bool IsX
 When we're in AutoRotate mode, this boolean tells us if we should rotate about the X axis or the Y axis. More...
 
double Angle
 When we're in AutoRotate mode, this value tells the chart how much it should be rotated. More...
 
bool DrawAxesDecoration
 This boolean indicates whether or not we should draw tick marks and axes labels. More...
 
bool FitToScene
 This boolean indicates whether or not we should automatically resize the chart so that it snugly fills up the scene. More...
 
vtkNew< vtkTransformContextTransform
 This is the transform that is applied when rendering data from the plots. More...
 
vtkNew< vtkTransformPlotTransform
 This transform translates and scales the plots' data points so that they appear within the axes of this chart. More...
 
vtkNew< vtkTransformBox
 This is the transform that is applied when rendering data from the plots. More...
 
vtkNew< vtkTransformRotation
 This transform keeps track of how the chart has been rotated. More...
 
vtkNew< vtkTransformTranslation
 This transform keeps track of how the data points have been panned within the chart. More...
 
vtkNew< vtkTransformScale
 This transform keeps track of how the data points have been scaled (zoomed in or zoomed out) within the chart. More...
 
vtkNew< vtkTransformBoxScale
 This transform keeps track of how the axes have been scaled (zoomed in or zoomed out). More...
 
vtkNew< vtkTransformFutureBox
 This transform is initialized as a copy of Box. More...
 
vtkNew< vtkTransformFutureBoxScale
 This transform keeps track of the Scale of the FutureBox transform. More...
 
vtkNew< vtkPenPen
 This is the pen that is used to draw data from the plots. More...
 
vtkNew< vtkPenAxisPen
 This is the pen that is used to draw the axes. More...
 
vtkSmartPointer< vtkAnnotationLinkLink
 This link is used to share selected points with other classes. More...
 
std::vector< vtkPlot3D * > Plots
 The plots that are drawn within this chart. More...
 
std::string XAxisLabel
 The label for the X Axis. More...
 
std::string YAxisLabel
 The label for the Y Axis. More...
 
std::string ZAxisLabel
 The label for the Z Axis. More...
 
vtkNew< vtkPlaneCollectionBoundingCube
 The six planes that define the bounding cube of our 3D axes. More...
 
float AxesBoundaryPoints [14][3]
 Points used to determine whether the axes will fit within the scene as currently sized, regardless of rotation. More...
 
float TickLabelOffset [3][2]
 This member variable stores the size of the tick labels for each axis. More...
 
int SceneHeight
 The height of the scene, as of the most recent call to Paint(). More...
 
int SceneWidth
 The weight of the scene, as of the most recent call to Paint(). More...
 
int DirectionToData [3]
 What direction the data is from each labeled axis line. More...
 
double DataBounds [4]
 A bounding box surrounding the currently rendered data points. More...
 
int XAxisToLabel [3]
 Which line to label. More...
 
int YAxisToLabel [3]
 Which line to label. More...
 
int ZAxisToLabel [3]
 Which line to label. More...
 
- Protected Attributes inherited from vtkContextItem
double Opacity
 
- Protected Attributes inherited from vtkAbstractContextItem
vtkContextSceneScene
 Point to the scene the item is on - can be null. More...
 
vtkAbstractContextItemParent
 Point to the parent item - can be null. More...
 
vtkContextScenePrivateChildren
 This structure provides a list of children, along with convenience functions to paint the children etc. More...
 
bool Visible
 Store the visibility of the item (default is true). More...
 
bool Interactive
 Store whether the item should respond to interactions (default is true). More...
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

Factory class for drawing 3D XYZ charts.

Tests:
vtkChartXYZ (Tests)

Definition at line 48 of file vtkChartXYZ.h.

Member Typedef Documentation

Definition at line 51 of file vtkChartXYZ.h.

Constructor & Destructor Documentation

vtkChartXYZ::vtkChartXYZ ( )
protected
vtkChartXYZ::~vtkChartXYZ ( )
overrideprotected

Member Function Documentation

static vtkTypeBool vtkChartXYZ::IsTypeOf ( const char *  type)
static
virtual vtkTypeBool vtkChartXYZ::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 vtkContextItem.

static vtkChartXYZ* vtkChartXYZ::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkChartXYZ::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkContextItem.

vtkChartXYZ* vtkChartXYZ::NewInstance ( ) const
void vtkChartXYZ::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

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

static vtkChartXYZ* vtkChartXYZ::New ( )
static
void vtkChartXYZ::SetGeometry ( const vtkRectf bounds)

Set the geometry in pixel coordinates (origin and width/height).

This method also sets up the end points of the axes of the chart. For this reason, if you call SetAroundX(), you should call SetGeometry() afterwards.

void vtkChartXYZ::SetAngle ( double  angle)

Set the rotation angle for the chart (AutoRotate mode only).

void vtkChartXYZ::SetAroundX ( bool  isX)

Set whether or not we're rotating about the X axis.

virtual void vtkChartXYZ::SetAnnotationLink ( vtkAnnotationLink link)
virtual

Set the vtkAnnotationLink for the chart.

vtkAxis* vtkChartXYZ::GetAxis ( int  axis)

Get the x (0), y (1) or z (2) axis.

virtual void vtkChartXYZ::SetAxis ( int  axisIndex,
vtkAxis axis 
)
virtual

Set the x (0), y (1) or z (2) axis.

void vtkChartXYZ::SetAxisColor ( const vtkColor4ub color)

Set the color for the axes.

vtkColor4ub vtkChartXYZ::GetAxisColor ( )

Set the color for the axes.

void vtkChartXYZ::SetAutoRotate ( bool  b)

Set whether or not we're using this chart to rotate on a timer.

Default value is false.

void vtkChartXYZ::SetDecorateAxes ( bool  b)

Set whether or not axes labels & tick marks should be drawn.

Default value is true.

void vtkChartXYZ::SetFitToScene ( bool  b)

Set whether or not the chart should automatically resize itself to fill the scene.

Default value is true.

void vtkChartXYZ::Update ( )
overridevirtual

Perform any updates to the item that may be necessary before rendering.

Reimplemented from vtkAbstractContextItem.

bool vtkChartXYZ::Paint ( vtkContext2D painter)
overridevirtual

Paint event for the chart, called whenever the chart needs to be drawn.

Reimplemented from vtkAbstractContextItem.

virtual vtkIdType vtkChartXYZ::AddPlot ( vtkPlot3D plot)
virtual

Adds a plot to the chart.

void vtkChartXYZ::ClearPlots ( )

Remove all the plots from this chart.

void vtkChartXYZ::RecalculateBounds ( )

Determine the XYZ bounds of the plots within this chart.

This information is then used to set the range of the axes.

void vtkChartXYZ::RecalculateTransform ( )

Use this chart's Geometry to set the endpoints of its axes.

This method also sets up a transformation that is used to properly render the data within the chart.

bool vtkChartXYZ::Hit ( const vtkContextMouseEvent mouse)
overridevirtual

Returns true if the transform is interactive, false otherwise.

Reimplemented from vtkAbstractContextItem.

bool vtkChartXYZ::MouseButtonPressEvent ( const vtkContextMouseEvent mouse)
overridevirtual

Mouse press event.

Keep track of zoom anchor position.

Reimplemented from vtkAbstractContextItem.

bool vtkChartXYZ::MouseMoveEvent ( const vtkContextMouseEvent mouse)
overridevirtual

Mouse move event.

Perform pan or zoom as specified by the mouse bindings.

Reimplemented from vtkAbstractContextItem.

bool vtkChartXYZ::MouseWheelEvent ( const vtkContextMouseEvent mouse,
int  delta 
)
overridevirtual

Mouse wheel event.

Zooms in or out.

Reimplemented from vtkAbstractContextItem.

bool vtkChartXYZ::KeyPressEvent ( const vtkContextKeyEvent key)
overridevirtual

Key press event.

This allows the user to snap the chart to one of three different 2D views. "x" changes the view so we're looking down the X axis. Similar behavior occurs for "y" or "z".

Reimplemented from vtkAbstractContextItem.

virtual void vtkChartXYZ::CalculateTransforms ( )
protectedvirtual

Calculate the transformation matrices used to draw data points and axes in the scene.

This function also sets up clipping planes that determine whether or not a data point is within range.

bool vtkChartXYZ::CalculatePlotTransform ( vtkAxis x,
vtkAxis y,
vtkAxis z,
vtkTransform transform 
)
protected

Given the x, y and z vtkAxis, and a transform, calculate the transform that the points in a chart would need to be drawn within the axes.

This assumes that the axes have the correct start and end positions, and that they are perpendicular.

bool vtkChartXYZ::Rotate ( const vtkContextMouseEvent mouse)
protected

Rotate the chart in response to a mouse movement.

bool vtkChartXYZ::Pan ( const vtkContextMouseEvent mouse)
protected

Pan the data within the chart in response to a mouse movement.

bool vtkChartXYZ::Zoom ( const vtkContextMouseEvent mouse)
protected

Zoom in or out on the data in response to a mouse movement.

bool vtkChartXYZ::Spin ( const vtkContextMouseEvent mouse)
protected

Spin the chart in response to a mouse movement.

void vtkChartXYZ::LookDownX ( )
protected

Adjust the rotation of the chart so that we are looking down the X axis.

void vtkChartXYZ::LookDownY ( )
protected

Adjust the rotation of the chart so that we are looking down the Y axis.

void vtkChartXYZ::LookDownZ ( )
protected

Adjust the rotation of the chart so that we are looking down the Z axis.

void vtkChartXYZ::LookUpX ( )
protected

Adjust the rotation of the chart so that we are looking up the X axis.

void vtkChartXYZ::LookUpY ( )
protected

Adjust the rotation of the chart so that we are looking up the Y axis.

void vtkChartXYZ::LookUpZ ( )
protected

Adjust the rotation of the chart so that we are looking up the Z axis.

bool vtkChartXYZ::CheckForSceneResize ( )
protected

Check to see if the scene changed size since the last render.

void vtkChartXYZ::RescaleAxes ( )
protected

Scale the axes up or down in response to a scene resize.

void vtkChartXYZ::ScaleUpAxes ( )
protected

Scale up the axes when the scene gets larger.

void vtkChartXYZ::ScaleDownAxes ( )
protected

Scale down the axes when the scene gets smaller.

void vtkChartXYZ::ZoomAxes ( int  delta)
protected

Change the scaling of the axes by a specified amount.

void vtkChartXYZ::InitializeAxesBoundaryPoints ( )
protected

Initialize a list of "test points".

These are used to determine whether or not the chart fits completely within the bounds of the current scene.

void vtkChartXYZ::InitializeFutureBox ( )
protected

Initialize the "future box" transform.

This transform is a duplicate of the Box transform, which dictates how the chart's axes should be drawn. In ScaleUpAxes() and ScaleDownAxes(), we incrementally change the scaling of the FutureBox transform to determine how much we need to zoom in or zoom out to fit the chart within the newly resized scene. Using a separate transform for this process allows us to resize the Box in a single step.

void vtkChartXYZ::ComputeDataBounds ( )
protected

Compute a bounding box for the data that is rendered within the axes.

void vtkChartXYZ::DrawAxes ( vtkContext3D context)
protected

Draw the cube axes of this chart.

void vtkChartXYZ::DetermineWhichAxesToLabel ( )
protected

For each of the XYZ dimensions, find the axis line that is furthest from the rendered data.

void vtkChartXYZ::DrawTickMarks ( vtkContext2D painter)
protected

Draw tick marks and tick mark labels along the axes.

void vtkChartXYZ::DrawAxesLabels ( vtkContext2D painter)
protected

Label the axes.

void vtkChartXYZ::GetOffsetForAxisLabel ( int  axis,
float bounds,
float offset 
)
protected

Compute how some text should be offset from an axis.

The parameter bounds contains the bounding box of the text to be rendered. The result is stored in the parameter offset.

double vtkChartXYZ::CalculateNiceMinMax ( double min,
double max,
int  axis 
)
protected

Calculate the next "nicest" numbers above and below the current minimum.

Returns
the "nice" spacing of the numbers. This function was mostly copied from vtkAxis.
void vtkChartXYZ::GetClippingPlaneEquation ( int  i,
double planeEquation 
)
protected

Get the equation for the ith face of our bounding cube.

Member Data Documentation

vtkRectf vtkChartXYZ::Geometry
protected

The size and position of this chart.

Definition at line 337 of file vtkChartXYZ.h.

std::vector< vtkSmartPointer<vtkAxis> > vtkChartXYZ::Axes
protected

The 3 axes of this chart.

Definition at line 342 of file vtkChartXYZ.h.

bool vtkChartXYZ::AutoRotate
protected

This boolean indicates whether or not we're using this chart to rotate on a timer.

Definition at line 348 of file vtkChartXYZ.h.

bool vtkChartXYZ::IsX
protected

When we're in AutoRotate mode, this boolean tells us if we should rotate about the X axis or the Y axis.

Definition at line 354 of file vtkChartXYZ.h.

double vtkChartXYZ::Angle
protected

When we're in AutoRotate mode, this value tells the chart how much it should be rotated.

Definition at line 360 of file vtkChartXYZ.h.

bool vtkChartXYZ::DrawAxesDecoration
protected

This boolean indicates whether or not we should draw tick marks and axes labels.

Definition at line 366 of file vtkChartXYZ.h.

bool vtkChartXYZ::FitToScene
protected

This boolean indicates whether or not we should automatically resize the chart so that it snugly fills up the scene.

Definition at line 372 of file vtkChartXYZ.h.

vtkNew<vtkTransform> vtkChartXYZ::ContextTransform
protected

This is the transform that is applied when rendering data from the plots.

Definition at line 377 of file vtkChartXYZ.h.

vtkNew<vtkTransform> vtkChartXYZ::PlotTransform
protected

This transform translates and scales the plots' data points so that they appear within the axes of this chart.

It is one of the factors that makes up the ContextTransform.

Definition at line 384 of file vtkChartXYZ.h.

vtkNew<vtkTransform> vtkChartXYZ::Box
protected

This is the transform that is applied when rendering data from the plots.

Definition at line 389 of file vtkChartXYZ.h.

vtkNew<vtkTransform> vtkChartXYZ::Rotation
protected

This transform keeps track of how the chart has been rotated.

Definition at line 394 of file vtkChartXYZ.h.

vtkNew<vtkTransform> vtkChartXYZ::Translation
protected

This transform keeps track of how the data points have been panned within the chart.

Definition at line 400 of file vtkChartXYZ.h.

vtkNew<vtkTransform> vtkChartXYZ::Scale
protected

This transform keeps track of how the data points have been scaled (zoomed in or zoomed out) within the chart.

Definition at line 406 of file vtkChartXYZ.h.

vtkNew<vtkTransform> vtkChartXYZ::BoxScale
protected

This transform keeps track of how the axes have been scaled (zoomed in or zoomed out).

Definition at line 412 of file vtkChartXYZ.h.

vtkNew<vtkTransform> vtkChartXYZ::FutureBox
protected

This transform is initialized as a copy of Box.

It is used within ScaleUpAxes() and ScaleDownAxes() to figure out how much we need to zoom in or zoom out to fit our chart within the newly resized scene.

Definition at line 419 of file vtkChartXYZ.h.

vtkNew<vtkTransform> vtkChartXYZ::FutureBoxScale
protected

This transform keeps track of the Scale of the FutureBox transform.

Definition at line 424 of file vtkChartXYZ.h.

vtkNew<vtkPen> vtkChartXYZ::Pen
protected

This is the pen that is used to draw data from the plots.

Definition at line 429 of file vtkChartXYZ.h.

vtkNew<vtkPen> vtkChartXYZ::AxisPen
protected

This is the pen that is used to draw the axes.

Definition at line 434 of file vtkChartXYZ.h.

vtkSmartPointer<vtkAnnotationLink> vtkChartXYZ::Link
protected

This link is used to share selected points with other classes.

Definition at line 439 of file vtkChartXYZ.h.

std::vector<vtkPlot3D *> vtkChartXYZ::Plots
protected

The plots that are drawn within this chart.

Definition at line 444 of file vtkChartXYZ.h.

std::string vtkChartXYZ::XAxisLabel
protected

The label for the X Axis.

Definition at line 449 of file vtkChartXYZ.h.

std::string vtkChartXYZ::YAxisLabel
protected

The label for the Y Axis.

Definition at line 454 of file vtkChartXYZ.h.

std::string vtkChartXYZ::ZAxisLabel
protected

The label for the Z Axis.

Definition at line 459 of file vtkChartXYZ.h.

vtkNew<vtkPlaneCollection> vtkChartXYZ::BoundingCube
protected

The six planes that define the bounding cube of our 3D axes.

Definition at line 464 of file vtkChartXYZ.h.

float vtkChartXYZ::AxesBoundaryPoints[14][3]
protected

Points used to determine whether the axes will fit within the scene as currently sized, regardless of rotation.

Definition at line 470 of file vtkChartXYZ.h.

float vtkChartXYZ::TickLabelOffset[3][2]
protected

This member variable stores the size of the tick labels for each axis.

It is used to determine the position of the axis labels.

Definition at line 476 of file vtkChartXYZ.h.

int vtkChartXYZ::SceneHeight
protected

The height of the scene, as of the most recent call to Paint().

Definition at line 481 of file vtkChartXYZ.h.

int vtkChartXYZ::SceneWidth
protected

The weight of the scene, as of the most recent call to Paint().

Definition at line 486 of file vtkChartXYZ.h.

int vtkChartXYZ::XAxisToLabel[3]
protected

Which line to label.

Definition at line 492 of file vtkChartXYZ.h.

int vtkChartXYZ::YAxisToLabel[3]
protected

Which line to label.

Definition at line 493 of file vtkChartXYZ.h.

int vtkChartXYZ::ZAxisToLabel[3]
protected

Which line to label.

Definition at line 494 of file vtkChartXYZ.h.

int vtkChartXYZ::DirectionToData[3]
protected

What direction the data is from each labeled axis line.

Definition at line 500 of file vtkChartXYZ.h.

double vtkChartXYZ::DataBounds[4]
protected

A bounding box surrounding the currently rendered data points.

Definition at line 505 of file vtkChartXYZ.h.


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