VTK
9.1.0
|
Factory class for drawing 3D XYZ charts. More...
#include <vtkChartXYZ.h>
Public Types | |
typedef vtkContextItem | Superclass |
![]() | |
typedef vtkAbstractContextItem | Superclass |
![]() | |
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... | |
vtkChartXYZ * | NewInstance () 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 | SetMargins (const vtkVector4i &margins) |
Set the margins in pixels ordered top right bottom left The box will be drawn inside those margins, but the labels and textdecorations will still escape. More... | |
virtual void | SetAngle (double) |
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... | |
vtkAxis * | GetAxis (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... | |
vtkTextProperty * | GetAxesTextProperty () |
Get the text property for axes. More... | |
virtual void | SetXAxisLabel (vtkStdString) |
Set the X axis label. More... | |
virtual void | SetYAxisLabel (vtkStdString) |
Set the Y axis label. More... | |
virtual void | SetZAxisLabel (vtkStdString) |
Set the Z axis label. More... | |
virtual void | SetEnsureOuterEdgeAxisLabelling (bool) |
Set to true to ensure that axis labels are always on the outer edges of the chart. More... | |
virtual void | SetAutoRotate (bool) |
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... | |
virtual bool | RemovePlot (vtkPlot3D *plot) |
Removes a plot from 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 | SetClippingPlanesEnabled (bool) |
Hide data outside the box. More... | |
virtual bool | GetClippingPlanesEnabled () |
Check whether data outside the box will be hidden or not. More... | |
virtual void | SetScaleBoxWithPlot (bool) |
When rotating the mousewheel, scale not only the plot but also the box. More... | |
virtual bool | GetScaleBoxWithPlot () |
Check whether scaling the plot will also scale the box. More... | |
void | SetAxisColor (const vtkColor4ub &color) |
Set the color for the axes. More... | |
vtkColor4ub | GetAxisColor () |
Set the color for the axes. More... | |
![]() | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
vtkContextItem * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. More... | |
virtual void | SetTransform (vtkContextTransform *) |
Set the transform of the item. More... | |
virtual double | GetOpacity () |
Get the opacity of the item. More... | |
virtual void | SetOpacity (double) |
Set the opacity of the item. More... | |
![]() | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
vtkAbstractContextItem * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. More... | |
virtual void | Update () |
Perform any updates to the item that may be necessary before rendering. More... | |
virtual bool | Paint (vtkContext2D *painter) |
Paint event for the item, called whenever the item needs to be drawn. More... | |
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... | |
vtkAbstractContextItem * | GetItem (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 bool | Hit (const vtkContextMouseEvent &mouse) |
Return true if the supplied x, y coordinate is inside the item. More... | |
virtual vtkAbstractContextItem * | GetPickedItem (const vtkContextMouseEvent &mouse) |
Return the item under the mouse. More... | |
virtual bool | MouseEnterEvent (const vtkContextMouseEvent &mouse) |
Mouse enter event. More... | |
virtual bool | MouseMoveEvent (const vtkContextMouseEvent &mouse) |
Mouse move event. More... | |
virtual bool | MouseLeaveEvent (const vtkContextMouseEvent &mouse) |
Mouse leave event. More... | |
virtual bool | MouseButtonPressEvent (const vtkContextMouseEvent &mouse) |
Mouse button down event Return true if the item holds the event, false if the event can be propagated to other items. 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 | MouseWheelEvent (const vtkContextMouseEvent &mouse, int delta) |
Mouse wheel event, positive delta indicates forward movement of the wheel. More... | |
virtual bool | KeyPressEvent (const vtkContextKeyEvent &key) |
Key press 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... | |
vtkContextScene * | GetScene () |
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... | |
vtkAbstractContextItem * | GetParent () |
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... | |
![]() | |
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 | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. 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... | |
vtkCommand * | GetCommand (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... | |
![]() | |
const char * | GetClassName () const |
Return the class name as a string. More... | |
virtual vtkTypeBool | IsA (const char *name) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name) |
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). 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... | |
bool | GetIsInMemkind () const |
A local state flag that remembers whether this object lives in the normal or extended memory space. 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 vtkChartXYZ * | SafeDownCast (vtkObjectBase *o) |
static vtkChartXYZ * | New () |
![]() | |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkContextItem * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkAbstractContextItem * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static vtkObject * | New () |
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 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 vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name) |
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More... | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
static void | SetMemkindDirectory (const char *directoryname) |
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. More... | |
static bool | GetUsingMemkind () |
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. More... | |
Protected Types | |
enum | RotateDirection { LEFT , RIGHT , UP , DOWN } |
Rotation directions. More... | |
enum | AxisState { VERTICAL , VERTICAL_2 , HORIZONTAL , HORIZONTAL_2 , DO_NOT_LABEL , STANDARD } |
The state of an axis. More... | |
enum | Direction { NORTH , NORTH_EAST , EAST , SOUTH_EAST , SOUTH , SOUTH_WEST , WEST , NORTH_WEST } |
The direction to data from an axis. More... | |
enum | { USE_MARGINS_AND_SCENE_SIZE , USE_GEOMETRY } |
Specifies how to calculate the size of the chart in function of the size of the scene. More... | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () 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 | Rotate (const RotateDirection rotateDirection) |
Rotate the chart in a specific direction. 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 | NewDetermineWhichAxesToLabel () |
New style axis labelling, ensuring labelling is always at the edges of the chart in the most sensible places. More... | |
void | LegacyDetermineWhichAxesToLabel () |
Old-style axis labelling, for compatibility; labelling may occur in less optimal places e.g. 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... | |
std::size_t | GetMarginLeft () const |
Gets the current margin left in pixels irrespective of the size-strategy used. More... | |
std::size_t | GetMarginBottom () const |
Gets the current margin top in pixels irrespective of the size-strategy used. More... | |
std::size_t | GetPlotWidth () const |
Gets the current width of the plot in pixels irrespective of the size-strategy used. More... | |
std::size_t | GetPlotHeight () const |
Gets the current height of the plot in pixels irrespective of the size-strategy used. More... | |
![]() | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkContextItem ()=default | |
~vtkContextItem () override=default | |
![]() | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkAbstractContextItem () | |
~vtkAbstractContextItem () override | |
![]() | |
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... | |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
enum vtkChartXYZ:: { ... } | SizeStrategy = USE_GEOMETRY |
Specifies how to calculate the size of the chart in function of the size of the scene. More... | |
vtkVector4i | Margins = vtkVector4i(40, 40, 40, 40) |
The margins in pixels for the box ordered top right bottom left Applicable only when SizeStrategy == USE_MARGINS_AND_SCENE_SIZE. More... | |
vtkRectf | Geometry = vtkRectf(40, 40, 120, 120) |
The size and position of this chart. More... | |
std::vector< vtkSmartPointer< vtkAxis > > | Axes |
The 3 axes of this chart. More... | |
bool | AutoRotate = false |
This boolean indicates whether or not we're using this chart to rotate on a timer. More... | |
bool | IsX = false |
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 = 0 |
When we're in AutoRotate mode, this value tells the chart how much it should be rotated. More... | |
bool | DrawAxesDecoration = true |
This boolean indicates whether or not we should draw tick marks and axes labels. More... | |
bool | FitToScene = true |
This boolean indicates whether or not we should automatically resize the chart so that it snugly fills up the scene. More... | |
vtkNew< vtkTransform > | ContextTransform |
This is the transform that is applied when rendering data from the plots. More... | |
vtkNew< vtkTransform > | PlotTransform |
This transform translates and scales the plots' data points so that they appear within the axes of this chart. More... | |
vtkNew< vtkTransform > | Box |
This is the transform that is applied when rendering data from the plots. More... | |
vtkNew< vtkTransform > | Rotation |
This transform keeps track of how the chart has been rotated. More... | |
vtkNew< vtkTransform > | Translation |
This transform keeps track of how the data points have been panned within the chart. More... | |
vtkNew< vtkTransform > | Scale |
This transform keeps track of how the data points have been scaled (zoomed in or zoomed out) within the chart. More... | |
vtkNew< vtkTransform > | BoxScale |
This transform keeps track of how the axes have been scaled (zoomed in or zoomed out). More... | |
vtkNew< vtkTransform > | FutureBox |
This transform is initialized as a copy of Box. More... | |
vtkNew< vtkTransform > | FutureBoxScale |
This transform keeps track of the Scale of the FutureBox transform. More... | |
vtkNew< vtkPen > | Pen |
This is the pen that is used to draw data from the plots. More... | |
vtkNew< vtkPen > | AxisPen |
This is the pen that is used to draw the axes. More... | |
vtkSmartPointer< vtkAnnotationLink > | Link |
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::vector< vtkIdType > | FreePlaces |
These plots got removed (from Plots), try to reuse the free spot. More... | |
vtkNew< vtkTextProperty > | AxesTextProperty |
The text properties of the axes. 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... | |
bool | EnsureOuterEdgeAxisLabelling = false |
If set to true, use the new behaviour of ensuring that axis labels are on the outer edges of the chart. More... | |
vtkNew< vtkPlaneCollection > | BoundingCube |
The six planes that define the bounding cube of our 3D axes. More... | |
float | AxesBoundaryPoints [8][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... | |
bool | ClippingPlanesEnabled = true |
Hide data outside the box. More... | |
bool | ScaleBoxWithPlot = true |
When rotating the mousewheel, scale not only the plot but also the box. 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... | |
![]() | |
double | Opacity = 1.0 |
vtkContextTransform * | Transform = nullptr |
![]() | |
vtkContextScene * | Scene |
Point to the scene the item is on - can be null. More... | |
vtkAbstractContextItem * | Parent |
Point to the parent item - can be null. More... | |
vtkContextScenePrivate * | Children |
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... | |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
std::atomic< int32_t > | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Additional Inherited Members | |
![]() | |
static vtkMallocingFunction | GetCurrentMallocFunction () |
static vtkReallocingFunction | GetCurrentReallocFunction () |
static vtkFreeingFunction | GetCurrentFreeFunction () |
static vtkFreeingFunction | GetAlternateFreeFunction () |
Factory class for drawing 3D XYZ charts.
Definition at line 76 of file vtkChartXYZ.h.
Definition at line 79 of file vtkChartXYZ.h.
|
protected |
|
protected |
The state of an axis.
Enumerator | |
---|---|
VERTICAL | |
VERTICAL_2 | |
HORIZONTAL | |
HORIZONTAL_2 | |
DO_NOT_LABEL | |
STANDARD |
Definition at line 301 of file vtkChartXYZ.h.
|
protected |
The direction to data from an axis.
Enumerator | |
---|---|
NORTH | |
NORTH_EAST | |
EAST | |
SOUTH_EAST | |
SOUTH | |
SOUTH_WEST | |
WEST | |
NORTH_WEST |
Definition at line 314 of file vtkChartXYZ.h.
|
protected |
Specifies how to calculate the size of the chart in function of the size of the scene.
Enumerator | |
---|---|
USE_MARGINS_AND_SCENE_SIZE | |
USE_GEOMETRY |
Definition at line 517 of file vtkChartXYZ.h.
|
protected |
|
overrideprotected |
|
static |
|
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 |
|
protectedvirtual |
Reimplemented from vtkContextItem.
vtkChartXYZ * vtkChartXYZ::NewInstance | ( | ) | const |
|
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 |
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.
This method will result in a plot with a fixed size. If you want it to scale with the scene then use SetMargins.
void vtkChartXYZ::SetMargins | ( | const vtkVector4i & | margins | ) |
Set the margins in pixels ordered top right bottom left The box will be drawn inside those margins, but the labels and textdecorations will still escape.
Note that the width and height automatically adapt to those of the scene.
If you want a fixed size instead then use SetGeometry.
|
virtual |
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 |
Set the vtkAnnotationLink for the chart.
vtkAxis * vtkChartXYZ::GetAxis | ( | int | axis | ) |
Get the x (0), y (1) or z (2) 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.
vtkTextProperty * vtkChartXYZ::GetAxesTextProperty | ( | ) |
Get the text property for axes.
Useful for changing font size, font family, font file.
For example to use a larger font which is capable of displaying unicode values change the property like this:
chart->GetAxesTextProperty()->SetFontFamily(VTK_FONT_FILE); chart->GetAxesTextProperty()->SetFontFile("fonts/DejaVuSans.ttf"); chart->GetAxesTextProperty()->SetFontSize(32);
You'll need a unicode capable font in a suitable location.
Now to get the X axis to display Theta subscript (0) set the label like this using the hex unicode representation:
chart->SetXAxisLabel("\xcf\xb4\xe2\x82\x8d\xe2\x82\x80\xe2\x82\x8e");
|
virtual |
Set the X axis label.
|
virtual |
Set the Y axis label.
|
virtual |
Set the Z axis label.
|
virtual |
Set to true to ensure that axis labels are always on the outer edges of the chart.
Default is false, the legacy behaviour, for backwards compatibility, where axis labelling may occur on inner or back edges.
|
virtual |
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.
|
overridevirtual |
Perform any updates to the item that may be necessary before rendering.
Reimplemented from vtkAbstractContextItem.
|
overridevirtual |
Paint event for the chart, called whenever the chart needs to be drawn.
Reimplemented from vtkAbstractContextItem.
|
virtual |
Removes a plot from 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.
|
overridevirtual |
Returns true if the transform is interactive, false otherwise.
Reimplemented from vtkAbstractContextItem.
|
overridevirtual |
|
overridevirtual |
Mouse move event.
Perform pan or zoom as specified by the mouse bindings.
Reimplemented from vtkAbstractContextItem.
|
overridevirtual |
|
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.
void vtkChartXYZ::SetClippingPlanesEnabled | ( | bool | ) |
Hide data outside the box.
|
virtual |
Check whether data outside the box will be hidden or not.
|
virtual |
When rotating the mousewheel, scale not only the plot but also the box.
|
virtual |
Check whether scaling the plot will also scale the box.
|
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.
|
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.
|
protected |
Rotate the chart in response to a mouse movement.
|
protected |
Rotate the chart in a specific direction.
|
protected |
Pan the data within the chart in response to a mouse movement.
|
protected |
Zoom in or out on the data in response to a mouse movement.
|
protected |
Spin the chart in response to a mouse movement.
|
protected |
Adjust the rotation of the chart so that we are looking down the X axis.
|
protected |
Adjust the rotation of the chart so that we are looking down the Y axis.
|
protected |
Adjust the rotation of the chart so that we are looking down the Z axis.
|
protected |
Adjust the rotation of the chart so that we are looking up the X axis.
|
protected |
Adjust the rotation of the chart so that we are looking up the Y axis.
|
protected |
Adjust the rotation of the chart so that we are looking up the Z axis.
|
protected |
Check to see if the scene changed size since the last render.
|
protected |
Scale the axes up or down in response to a scene resize.
|
protected |
Scale up the axes when the scene gets larger.
|
protected |
Scale down the axes when the scene gets smaller.
|
protected |
Change the scaling of the axes by a specified amount.
|
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.
|
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.
|
protected |
Compute a bounding box for the data that is rendered within the axes.
|
protected |
Draw the cube axes of this chart.
|
protected |
For each of the XYZ dimensions, find the axis line that is furthest from the rendered data.
|
protected |
New style axis labelling, ensuring labelling is always at the edges of the chart in the most sensible places.
|
protected |
Old-style axis labelling, for compatibility; labelling may occur in less optimal places e.g.
on inner or back edges of the chart.
|
protected |
Draw tick marks and tick mark labels along the axes.
|
protected |
Label the axes.
|
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.
|
protected |
Calculate the next "nicest" numbers above and below the current minimum.
|
protected |
Get the equation for the ith face of our bounding cube.
|
protected |
Gets the current margin left in pixels irrespective of the size-strategy used.
|
protected |
Gets the current margin top in pixels irrespective of the size-strategy used.
|
protected |
Gets the current width of the plot in pixels irrespective of the size-strategy used.
|
protected |
Gets the current height of the plot in pixels irrespective of the size-strategy used.
enum { ... } vtkChartXYZ::SizeStrategy |
Specifies how to calculate the size of the chart in function of the size of the scene.
|
protected |
The margins in pixels for the box ordered top right bottom left Applicable only when SizeStrategy == USE_MARGINS_AND_SCENE_SIZE.
Definition at line 527 of file vtkChartXYZ.h.
The size and position of this chart.
Applicable only when SizeStrategy == USE_GEOMETRY
Definition at line 533 of file vtkChartXYZ.h.
|
protected |
The 3 axes of this chart.
Definition at line 538 of file vtkChartXYZ.h.
|
protected |
This boolean indicates whether or not we're using this chart to rotate on a timer.
Definition at line 544 of file vtkChartXYZ.h.
|
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 550 of file vtkChartXYZ.h.
|
protected |
When we're in AutoRotate mode, this value tells the chart how much it should be rotated.
Definition at line 556 of file vtkChartXYZ.h.
|
protected |
This boolean indicates whether or not we should draw tick marks and axes labels.
Definition at line 562 of file vtkChartXYZ.h.
|
protected |
This boolean indicates whether or not we should automatically resize the chart so that it snugly fills up the scene.
Definition at line 568 of file vtkChartXYZ.h.
|
protected |
This is the transform that is applied when rendering data from the plots.
Definition at line 573 of file vtkChartXYZ.h.
|
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 580 of file vtkChartXYZ.h.
|
protected |
This is the transform that is applied when rendering data from the plots.
Definition at line 585 of file vtkChartXYZ.h.
|
protected |
This transform keeps track of how the chart has been rotated.
Definition at line 590 of file vtkChartXYZ.h.
|
protected |
This transform keeps track of how the data points have been panned within the chart.
Definition at line 596 of file vtkChartXYZ.h.
|
protected |
This transform keeps track of how the data points have been scaled (zoomed in or zoomed out) within the chart.
Definition at line 602 of file vtkChartXYZ.h.
|
protected |
This transform keeps track of how the axes have been scaled (zoomed in or zoomed out).
Definition at line 608 of file vtkChartXYZ.h.
|
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 615 of file vtkChartXYZ.h.
|
protected |
This transform keeps track of the Scale of the FutureBox transform.
Definition at line 620 of file vtkChartXYZ.h.
This is the pen that is used to draw data from the plots.
Definition at line 625 of file vtkChartXYZ.h.
This is the pen that is used to draw the axes.
Definition at line 630 of file vtkChartXYZ.h.
|
protected |
This link is used to share selected points with other classes.
Definition at line 635 of file vtkChartXYZ.h.
|
protected |
The plots that are drawn within this chart.
Definition at line 640 of file vtkChartXYZ.h.
|
protected |
These plots got removed (from Plots), try to reuse the free spot.
Definition at line 645 of file vtkChartXYZ.h.
|
protected |
The text properties of the axes.
Definition at line 650 of file vtkChartXYZ.h.
|
protected |
The label for the X Axis.
Definition at line 655 of file vtkChartXYZ.h.
|
protected |
The label for the Y Axis.
Definition at line 660 of file vtkChartXYZ.h.
|
protected |
The label for the Z Axis.
Definition at line 665 of file vtkChartXYZ.h.
|
protected |
If set to true, use the new behaviour of ensuring that axis labels are on the outer edges of the chart.
If false, the legacy behaviour will be used where axis labels can occur on inner or back edges of the chart.
Definition at line 672 of file vtkChartXYZ.h.
|
protected |
The six planes that define the bounding cube of our 3D axes.
Definition at line 676 of file vtkChartXYZ.h.
|
protected |
Points used to determine whether the axes will fit within the scene as currently sized, regardless of rotation.
Definition at line 682 of file vtkChartXYZ.h.
|
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 688 of file vtkChartXYZ.h.
|
protected |
The height of the scene, as of the most recent call to Paint().
Definition at line 693 of file vtkChartXYZ.h.
|
protected |
The weight of the scene, as of the most recent call to Paint().
Definition at line 698 of file vtkChartXYZ.h.
|
protected |
Which line to label.
Definition at line 704 of file vtkChartXYZ.h.
|
protected |
Which line to label.
Definition at line 705 of file vtkChartXYZ.h.
|
protected |
Which line to label.
Definition at line 706 of file vtkChartXYZ.h.
|
protected |
What direction the data is from each labeled axis line.
Definition at line 712 of file vtkChartXYZ.h.
|
protected |
A bounding box surrounding the currently rendered data points.
Definition at line 717 of file vtkChartXYZ.h.
|
protected |
Hide data outside the box.
Definition at line 722 of file vtkChartXYZ.h.
|
protected |
When rotating the mousewheel, scale not only the plot but also the box.
Definition at line 727 of file vtkChartXYZ.h.