#include <BinaryTransform.h>
Definition at line 39 of file BinaryTransform.h.
Public Member Functions | |
virtual void | adjustValues (AxisModelBase &model, hippodraw::Axes::Type axes, const Range &limit)=0 |
Sets the range of given axis to be a new "nice" within the limits given. | |
virtual double | aspectRatio () const |
Returns the aspect ratio. | |
virtual Rect | calcRectangle (const Range &x, const Range &y)=0 |
Returns a rectangle enclosing the transformed data space. | |
virtual BinaryTransform * | clone () const =0 |
Creates a new XYTransform object by copying an existing one. | |
virtual bool | inverseTransform (double &x, double &y) const =0 |
Transform the transformed coordinates on X and Y axis back to the original true data space. | |
void | inverseTransformZ (double &z) const |
Inverse transforms the z coordinate. | |
virtual bool | isLinearInXY () const =0 |
Returns true if the transform would be one to one on both the X and Y axes. | |
virtual bool | isLinearInZ () const |
Returns true if the transform would be one to one on Z axes. | |
bool | isPeriodic () const |
Sets whether this transform is periodic. | |
virtual const Range & | limitX () const =0 |
Returns the Range limits of the first coordinate. | |
virtual const Range & | limitY () const =0 |
Returns the Range limits of the second coordinate. | |
const Range & | limitZ () const |
Returns the Range limits on the third coordinate. | |
const std::string & | name () const |
Returns the name of the Transform. | |
bool | needsGrid () const |
Returns whether this transform needs grid. | |
bool | needsXTicks () const |
Returns whether this transform needs x ticks. | |
bool | needsYTicks () const |
Returns whether this transform needs y ticks. | |
void | setNeedsGrid (bool needs_grid) |
Sets whether this transform needs grid. | |
void | setNeedsXTicks (bool needs_x_ticks) |
Sets whether this transform needs x ticks. | |
void | setNeedsYTicks (bool needs_y_ticks) |
Sets whether this transform needs y yicks. | |
virtual const std::vector < AxisTick > & | setTicks (AxisModelBase &axis_model, hippodraw::Axes::Type axis)=0 |
Sets and return the axis ticks on specified axis. | |
void | setZTransform (TransformBase *transform) |
Sets the transform function on the Z axis. | |
virtual void | transform (std::vector< double > &x, std::vector< double > &y) const =0 |
A transform on two axes. | |
virtual void | transform (double &x, double &y) const =0 |
Transform the coordinates on the X and Y axes. | |
void | transformZ (double &z) const |
Transforms the z coordinate. | |
virtual void | validate (Range &x, Range &y) const =0 |
Validates the Ranges. | |
TransformBase * | zTransform () const |
Returns the transform function on the Z axis. | |
virtual | ~BinaryTransform () |
The virtual destructor. | |
Protected Member Functions | |
BinaryTransform (const BinaryTransform &) | |
The copy constructor. | |
BinaryTransform (UnaryTransform *, bool=false, bool=false, bool=true, bool=true) | |
The constructor that take the z transform as argument also it takes and argument which states if it is a periodic transformation (default false), next optional argument says if this transform needs a grid or not (default is false), and if it needs x and y ticks or not (Default is true). | |
BinaryTransform () | |
The default constructor. | |
Protected Attributes | |
bool | m_is_periodic |
Is this transform periodic. | |
std::string | m_name |
Name of the Transform. | |
bool | m_needs_grid |
Does this binary transform needs grid? | |
bool | m_needs_x_ticks |
Does this binary transform x ticks? | |
bool | m_needs_y_ticks |
Does this binary transform y ticks? | |
UnaryTransform * | m_z |
The transform on the Z axis. |
BinaryTransform | ( | ) | [protected] |
The default constructor.
Should never be called.
. Sets the function name to "nil". Should be overriden by derived class. If function name is "nil", then that indicated error condition that default constructor was called directly.
Definition at line 24 of file BinaryTransform.cxx.
References BinaryTransform::m_is_periodic, TransformBase::m_name, BinaryTransform::m_needs_grid, BinaryTransform::m_needs_x_ticks, BinaryTransform::m_needs_y_ticks, and BinaryTransform::m_z.
BinaryTransform | ( | UnaryTransform * | z, | |
bool | is_periodic = false , |
|||
bool | needs_grid = false , |
|||
bool | needs_x_ticks = true , |
|||
bool | needs_y_ticks = true | |||
) | [protected] |
The constructor that take the z transform as argument also it takes and argument which states if it is a periodic transformation (default false), next optional argument says if this transform needs a grid or not (default is false), and if it needs x and y ticks or not (Default is true).
Definition at line 36 of file BinaryTransform.cxx.
References BinaryTransform::m_is_periodic, TransformBase::m_name, BinaryTransform::m_needs_grid, BinaryTransform::m_needs_x_ticks, BinaryTransform::m_needs_y_ticks, BinaryTransform::m_z, and TransformBase::name().
BinaryTransform | ( | const BinaryTransform & | t | ) | [protected] |
The copy constructor.
Definition at line 52 of file BinaryTransform.cxx.
References UnaryTransform::clone(), BinaryTransform::isPeriodic(), BinaryTransform::m_is_periodic, BinaryTransform::m_needs_grid, BinaryTransform::m_needs_x_ticks, BinaryTransform::m_needs_y_ticks, BinaryTransform::m_z, BinaryTransform::needsGrid(), BinaryTransform::needsXTicks(), and BinaryTransform::needsYTicks().
~BinaryTransform | ( | ) | [virtual] |
The virtual destructor.
Definition at line 76 of file BinaryTransform.cxx.
References BinaryTransform::m_z.
virtual void adjustValues | ( | AxisModelBase & | model, | |
hippodraw::Axes::Type | axes, | |||
const Range & | limit | |||
) | [pure virtual] |
Sets the range of given axis to be a new "nice" within the limits given.
Implemented in PeriodicBinaryTransform, and XYTransform.
Referenced by CompositePlotter::autoScale().
double aspectRatio | ( | ) | const [virtual] |
Returns the aspect ratio.
Some transforms require a specific ration of the width to the height of the display. Returning a value of 2.0, for example, means that the width should be twice the height. Returning a value of 0.0 means any aspect ratio may be used.
Reimplemented from TransformBase.
Reimplemented in AIR, AIR2, ARC, ARC2, Cartesian, Cartesian2, GlobalSinusoidal, GlobalSinusoidal2, HammerAito, HammerAito2, Lambert, Lambert2, Mercator, Mercator2, SIN, SIN2, STG, STG2, TAN, TAN2, and XYTransform.
Definition at line 81 of file BinaryTransform.cxx.
Referenced by XyPlotter::getShape().
Returns a rectangle enclosing the transformed data space.
Implemented in PeriodicBinaryTransform, and XYTransform.
virtual BinaryTransform* clone | ( | ) | const [pure virtual] |
Creates a new XYTransform object by copying an existing one.
Implements TransformBase.
Implemented in AIR, AIR2, ARC, ARC2, Cartesian, Cartesian2, GlobalSinusoidal, GlobalSinusoidal2, HammerAito, HammerAito2, Lambert, Lambert2, Mercator, Mercator2, SIN, SIN2, STG, STG2, TAN, TAN2, and XYTransform.
virtual bool inverseTransform | ( | double & | x, | |
double & | y | |||
) | const [pure virtual] |
Transform the transformed coordinates on X and Y axis back to the original true data space.
Return true if success, else return false.
Implemented in PeriodicBinaryTransform, and XYTransform.
Referenced by ProjectorBase::getZAfterTransform().
void inverseTransformZ | ( | double & | z | ) | const |
Inverse transforms the z coordinate.
Definition at line 106 of file BinaryTransform.cxx.
References UnaryTransform::inverseTransform(), and BinaryTransform::m_z.
virtual bool isLinearInXY | ( | ) | const [pure virtual] |
Returns true
if the transform would be one to one on both the X and Y axes.
Clients can use this function to avoid calling the transform in for loops.
Implemented in PeriodicBinaryTransform, and XYTransform.
bool isLinearInZ | ( | ) | const [virtual] |
Returns true
if the transform would be one to one on Z axes.
Clients can use this function to avoid calling the transform in for loops.
Definition at line 153 of file BinaryTransform.cxx.
References UnaryTransform::isLinear(), and BinaryTransform::m_z.
Referenced by ContourPointRep::getContour().
bool isPeriodic | ( | ) | const |
Sets whether this transform is periodic.
Definition at line 148 of file BinaryTransform.cxx.
References BinaryTransform::m_is_periodic.
Referenced by BinaryTransform::BinaryTransform(), AxisRepBase::drawCrossHairs(), ContourPointRep::drawProjectedValues(), CompositePlotter::fillPickedPoint(), XyPlotter::getZValues(), Inspector::setHighRange(), and Inspector::updateTransformTab().
virtual const Range& limitX | ( | ) | const [pure virtual] |
Returns the Range limits of the first coordinate.
Implemented in PeriodicBinaryTransform, and XYTransform.
Referenced by CompositePlotter::autoScale(), and CompositePlotter::setRangePrivate().
virtual const Range& limitY | ( | ) | const [pure virtual] |
Returns the Range limits of the second coordinate.
Implemented in PeriodicBinaryTransform, and XYTransform.
Referenced by CompositePlotter::autoScale(), and CompositePlotter::setRangePrivate().
const Range & limitZ | ( | ) | const |
Returns the Range limits on the third coordinate.
Definition at line 112 of file BinaryTransform.cxx.
References UnaryTransform::limits(), and BinaryTransform::m_z.
Referenced by CompositePlotter::autoScaleZ(), and CompositePlotter::setRangePrivate().
const string & name | ( | ) | const [inherited] |
Returns the name of the Transform.
Definition at line 45 of file TransformBase.cxx.
References TransformBase::m_name.
Referenced by BinaryTransform::BinaryTransform(), TransformXML::createElement(), DisplayController::getLog(), DisplayController::setLog(), Inspector::updateTransformTab(), and XYTransform::XYTransform().
bool needsGrid | ( | ) | const |
Returns whether this transform needs grid.
Definition at line 118 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_grid.
Referenced by BinaryTransform::BinaryTransform().
bool needsXTicks | ( | ) | const |
Returns whether this transform needs x ticks.
Definition at line 128 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_x_ticks.
Referenced by BinaryTransform::BinaryTransform(), and CompositePlotter::drawAxisRep().
bool needsYTicks | ( | ) | const |
Returns whether this transform needs y ticks.
Definition at line 138 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_y_ticks.
Referenced by BinaryTransform::BinaryTransform(), and CompositePlotter::drawAxisRep().
void setNeedsGrid | ( | bool | needs_grid | ) |
Sets whether this transform needs grid.
Definition at line 123 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_grid.
void setNeedsXTicks | ( | bool | needs_x_ticks | ) |
Sets whether this transform needs x ticks.
Definition at line 133 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_x_ticks.
void setNeedsYTicks | ( | bool | needs_y_ticks | ) |
Sets whether this transform needs y yicks.
Definition at line 143 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_y_ticks.
virtual const std::vector< AxisTick >& setTicks | ( | AxisModelBase & | axis_model, | |
hippodraw::Axes::Type | axis | |||
) | [pure virtual] |
Sets and return the axis ticks on specified axis.
Implemented in PeriodicBinaryTransform, and XYTransform.
void setZTransform | ( | TransformBase * | transform | ) |
Sets the transform function on the Z axis.
The transform object must be derived class of UnaryTransform, otherwise the transform object pointer is set to null.
Definition at line 93 of file BinaryTransform.cxx.
References BinaryTransform::m_z.
virtual void transform | ( | std::vector< double > & | x, | |
std::vector< double > & | y | |||
) | const [pure virtual] |
virtual void transform | ( | double & | x, | |
double & | y | |||
) | const [pure virtual] |
Transform the coordinates on the X and Y axes.
Implemented in PeriodicBinaryTransform, and XYTransform.
Referenced by PyCanvas::addTextAtAbs(), AxisRepBase::drawAxesLines(), AxisRepBase::drawCrossHairs(), AxisRepBase::drawGridLines(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), CutRangeRep::drawNormalRange(), ContourPointRep::drawValues(), ContourPointRep::drawValuesWithStyle(), ErrorBarRep::drawXError(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawXTickLines(), ErrorBarRep::drawYError(), AxisRepBase::drawYTickLabels(), AxisRepBase::drawYTickLines(), and SymbolPointRep::transformPoints().
void transformZ | ( | double & | z | ) | const |
Transforms the z coordinate.
Definition at line 100 of file BinaryTransform.cxx.
References BinaryTransform::m_z, and UnaryTransform::transform().
Referenced by ContourPointRep::drawContourTicks(), AxisRepColor::drawZTickLabels(), AxisRepColor::drawZTickLines(), and CompositePlotter::prepareToDraw().
Validates the Ranges.
Adjusts Ranges to be restricted to that which is valid for the transform.
Implemented in PeriodicBinaryTransform, and XYTransform.
Referenced by AxisRepBase::drawGridLines(), and CompositePlotter::prepareToDraw().
TransformBase * zTransform | ( | ) | const |
Returns the transform function on the Z axis.
Definition at line 86 of file BinaryTransform.cxx.
References BinaryTransform::m_z.
Referenced by DisplayController::getLog(), and DisplayController::setLog().
bool m_is_periodic [protected] |
Is this transform periodic.
Definition at line 57 of file BinaryTransform.h.
Referenced by BinaryTransform::BinaryTransform(), and BinaryTransform::isPeriodic().
std::string m_name [protected, inherited] |
Name of the Transform.
Definition at line 42 of file TransformBase.h.
Referenced by AIR::AIR(), AIR2::AIR2(), ARC::ARC(), ARC2::ARC2(), BinaryTransform::BinaryTransform(), Cartesian::Cartesian(), Cartesian2::Cartesian2(), GlobalSinusoidal::GlobalSinusoidal(), GlobalSinusoidal2::GlobalSinusoidal2(), HammerAito::HammerAito(), HammerAito2::HammerAito2(), Lambert::Lambert(), Lambert2::Lambert2(), LinearTransform::LinearTransform(), LogTransform::LogTransform(), Mercator::Mercator(), Mercator2::Mercator2(), TransformBase::name(), SIN::SIN(), SIN2::SIN2(), STG::STG(), STG2::STG2(), TAN::TAN(), TAN2::TAN2(), TransformBase::TransformBase(), XYTransform::XYTransform(), XYZTransform::XYZTransform(), and XYZTransformBase::XYZTransformBase().
bool m_needs_grid [protected] |
Does this binary transform needs grid?
Definition at line 48 of file BinaryTransform.h.
Referenced by BinaryTransform::BinaryTransform(), BinaryTransform::needsGrid(), and BinaryTransform::setNeedsGrid().
bool m_needs_x_ticks [protected] |
Does this binary transform x ticks?
Definition at line 51 of file BinaryTransform.h.
Referenced by BinaryTransform::BinaryTransform(), BinaryTransform::needsXTicks(), and BinaryTransform::setNeedsXTicks().
bool m_needs_y_ticks [protected] |
Does this binary transform y ticks?
Definition at line 54 of file BinaryTransform.h.
Referenced by BinaryTransform::BinaryTransform(), BinaryTransform::needsYTicks(), and BinaryTransform::setNeedsYTicks().
UnaryTransform* m_z [protected] |
The transform on the Z axis.
Definition at line 45 of file BinaryTransform.h.
Referenced by XYTransform::adjustValues(), BinaryTransform::BinaryTransform(), BinaryTransform::inverseTransformZ(), BinaryTransform::isLinearInZ(), BinaryTransform::limitZ(), XYTransform::setTicks(), PeriodicBinaryTransform::setTicks(), BinaryTransform::setZTransform(), BinaryTransform::transformZ(), BinaryTransform::zTransform(), and BinaryTransform::~BinaryTransform().