29#include "vtkChartsCoreModule.h"
335 std::vector< vtkSmartPointer<vtkAxis> >
Axes;
463 float AxesBoundaryPoints[14][3];
469 float TickLabelOffset[3][2];
493 int DirectionToData[3];
498 double DataBounds[4];
502 void operator=(
const vtkChartXYZ &) VTK_DELETE_FUNCTION;
An algorithm for linking annotations among objects.
takes care of drawing 2D axes
Factory class for drawing 3D XYZ charts.
std::vector< vtkPlot3D * > Plots
The plots that are drawn within this chart.
bool AutoRotate
This boolean indicates whether or not we're using this chart to rotate on a timer.
vtkNew< vtkTransform > FutureBoxScale
This transform keeps track of the Scale of the FutureBox transform.
vtkNew< vtkTransform > FutureBox
This transform is initialized as a copy of Box.
std::string XAxisLabel
The label for the X Axis.
void ScaleDownAxes()
Scale down the axes when the scene gets smaller.
bool FitToScene
This boolean indicates whether or not we should automatically resize the chart so that it snugly fill...
void RescaleAxes()
Scale the axes up or down in response to a scene resize.
vtkNew< vtkTransform > Box
This is the transform that is applied when rendering data from the plots.
void SetAxisColor(const vtkColor4ub &color)
Set the color for the axes.
void LookUpX()
Adjust the rotation of the chart so that we are looking up the X axis.
vtkNew< vtkPen > Pen
This is the pen that is used to draw data from the plots.
int SceneHeight
The height of the scene, as of the most recent call to Paint().
vtkAxis * GetAxis(int axis)
Get the x (0), y (1) or z (2) axis.
void DrawAxesLabels(vtkContext2D *painter)
Label the axes.
void DrawTickMarks(vtkContext2D *painter)
Draw tick marks and tick mark labels along the axes.
static vtkChartXYZ * New()
vtkRectf Geometry
The size and position of this chart.
bool Zoom(const vtkContextMouseEvent &mouse)
Zoom in or out on the data in response to a mouse movement.
std::string YAxisLabel
The label for the Y Axis.
void SetAutoRotate(bool b)
Set whether or not we're using this chart to rotate on a timer.
bool Rotate(const vtkContextMouseEvent &mouse)
Rotate the chart in response to a mouse movement.
double CalculateNiceMinMax(double &min, double &max, int axis)
Calculate the next "nicest" numbers above and below the current minimum.
vtkNew< vtkTransform > Scale
This transform keeps track of how the data points have been scaled (zoomed in or zoomed out) within t...
bool Spin(const vtkContextMouseEvent &mouse)
Spin the chart in response to a mouse movement.
void GetClippingPlaneEquation(int i, double *planeEquation)
Get the equation for the ith face of our bounding cube.
vtkNew< vtkPlaneCollection > BoundingCube
The six planes that define the bounding cube of our 3D axes.
virtual void CalculateTransforms()
Calculate the transformation matrices used to draw data points and axes in the scene.
vtkNew< vtkTransform > Rotation
This transform keeps track of how the chart has been rotated.
void DrawAxes(vtkContext3D *context)
Draw the cube axes of this chart.
vtkNew< vtkPen > AxisPen
This is the pen that is used to draw the axes.
virtual bool Paint(vtkContext2D *painter)
Paint event for the chart, called whenever the chart needs to be drawn.
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 wou...
vtkNew< vtkTransform > BoxScale
This transform keeps track of how the axes have been scaled (zoomed in or zoomed out).
std::string ZAxisLabel
The label for the Z Axis.
void LookUpZ()
Adjust the rotation of the chart so that we are looking up the Z axis.
void GetOffsetForAxisLabel(int axis, float *bounds, float *offset)
Compute how some text should be offset from an axis.
void ClearPlots()
Remove all the plots from this chart.
virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta)
Mouse wheel event.
void DetermineWhichAxesToLabel()
For each of the XYZ dimensions, find the axis line that is furthest from the rendered data.
vtkNew< vtkTransform > ContextTransform
This is the transform that is applied when rendering data from the plots.
void LookDownX()
Adjust the rotation of the chart so that we are looking down the X axis.
bool DrawAxesDecoration
This boolean indicates whether or not we should draw tick marks and axes labels.
vtkSmartPointer< vtkAnnotationLink > Link
This link is used to share selected points with other classes.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event.
std::vector< vtkSmartPointer< vtkAxis > > Axes
The 3 axes of this chart.
void SetAroundX(bool isX)
Set whether or not we're rotating about the X axis.
void ZoomAxes(int delta)
Change the scaling of the axes by a specified amount.
void LookUpY()
Adjust the rotation of the chart so that we are looking up the Y axis.
virtual bool Hit(const vtkContextMouseEvent &mouse)
Returns true if the transform is interactive, false otherwise.
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
Mouse press event.
virtual bool KeyPressEvent(const vtkContextKeyEvent &key)
Key press event.
void SetDecorateAxes(bool b)
Set whether or not axes labels & tick marks should be drawn.
vtkNew< vtkTransform > Translation
This transform keeps track of how the data points have been panned within the chart.
void InitializeFutureBox()
Initialize the "future box" transform.
vtkNew< vtkTransform > PlotTransform
This transform translates and scales the plots' data points so that they appear within the axes of th...
bool CheckForSceneResize()
Check to see if the scene changed size since the last render.
void InitializeAxesBoundaryPoints()
Initialize a list of "test points".
vtkColor4ub GetAxisColor()
void ScaleUpAxes()
Scale up the axes when the scene gets larger.
double Angle
When we're in AutoRotate mode, this value tells the chart how much it should be rotated.
void SetGeometry(const vtkRectf &bounds)
Set the geometry in pixel coordinates (origin and width/height).
void ComputeDataBounds()
Compute a bounding box for the data that is rendered within the axes.
void LookDownZ()
Adjust the rotation of the chart so that we are looking down the Z axis.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void RecalculateBounds()
Determine the XYZ bounds of the plots within this chart.
void SetFitToScene(bool b)
Set whether or not the chart should automatically resize itself to fill the scene.
void LookDownY()
Adjust the rotation of the chart so that we are looking down the Y axis.
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
virtual void SetAnnotationLink(vtkAnnotationLink *link)
Set the vtkAnnotationLink for the chart.
void RecalculateTransform()
Use this chart's Geometry to set the endpoints of its axes.
int SceneWidth
The weight of the scene, as of the most recent call to Paint().
virtual vtkIdType AddPlot(vtkPlot3D *plot)
Adds a plot to the chart.
bool Pan(const vtkContextMouseEvent &mouse)
Pan the data within the chart in response to a mouse movement.
bool IsX
When we're in AutoRotate mode, this boolean tells us if we should rotate about the X axis or the Y ax...
void SetAngle(double angle)
Set the rotation angle for the chart (AutoRotate mode only).
Class for drawing 2D primitives to a graphical context.
Class for drawing 3D primitives to a graphical context.
base class for items that are part of a vtkContextScene.
data structure to represent key events.
data structure to represent mouse events.
a simple class to control print indentation
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
maintain a list of planes
Abstract class for 3D plots.
A table, which contains similar-typed columns of data.
dynamic, self-adjusting array of unsigned char