Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BinaryTransform Class Reference

#include <BinaryTransform.h>

Inheritance diagram for BinaryTransform:

Inheritance graph
[legend]
Collaboration diagram for BinaryTransform:

Collaboration graph
[legend]
List of all members.

Detailed Description

A transform that transforms cordinates from one 2D coordinate system to another.

Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 37 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 HippoRectangle calcRectangle (const Range &x, const Range &y)=0
 Returns a HippoRectangle enclosing the transformed data space.
virtual BinaryTransformclone () const =0
 Creates a new XYTransform object by copying an existing one.
virtual void 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.
bool isPeriodic () const
 Sets wether this transform is periodic.
virtual const RangelimitX () const =0
 Returns the Range limits of the first corrdinate.
virtual const RangelimitY () const =0
 Returns the Range limits of the second corrdinate.
const RangelimitZ () const
 Returns the Range limits on the third corrdinate.
const std::stringname () const
 Returns the name of the Transform.
bool needsGrid () const
 Returns wether this transform needs grid.
bool needsXTicks () const
 Returns wether this transform needs x ticks.
bool needsYTicks () const
 Returns wether this transform needs y ticks.
void setNeedsGrid (bool needs_grid)
 Sets wether this transform needs grid.
void setNeedsXTicks (bool needs_x_ticks)
 Sets wether this transform needs x ticks.
void setNeedsYTicks (bool needs_y_ticks)
 Sets wether 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.
TransformBasezTransform () 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 tranform needs grid?
bool m_needs_x_ticks
 Does this binary tranform x ticks?
bool m_needs_y_ticks
 Does this binary tranform y ticks?
UnaryTransformm_z
 The transform on the Z axis.


Constructor & Destructor Documentation

BinaryTransform::BinaryTransform  )  [protected]
 

The default constructor.

. 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 22 of file BinaryTransform.cxx.

References m_is_periodic, TransformBase::m_name, m_needs_grid, m_needs_x_ticks, m_needs_y_ticks, and m_z.

BinaryTransform::BinaryTransform UnaryTransform ,
bool  = false,
bool  = false,
bool  = true,
bool  = 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 34 of file BinaryTransform.cxx.

References m_is_periodic, TransformBase::m_name, m_needs_grid, m_needs_x_ticks, m_needs_y_ticks, m_z, and TransformBase::name().

BinaryTransform::BinaryTransform const BinaryTransform  )  [protected]
 

The copy constructor.

Definition at line 50 of file BinaryTransform.cxx.

References UnaryTransform::clone(), isPeriodic(), m_is_periodic, m_needs_grid, m_needs_x_ticks, m_needs_y_ticks, m_z, needsGrid(), needsXTicks(), and needsYTicks().

BinaryTransform::~BinaryTransform  )  [virtual]
 

The virtual destructor.

Definition at line 74 of file BinaryTransform.cxx.

References m_z.


Member Function Documentation

virtual void BinaryTransform::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 HammerAito, Lambert, and XYTransform.

Referenced by CompositePlotter::autoScale().

double BinaryTransform::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 HammerAito, Lambert, and XYTransform.

Definition at line 79 of file BinaryTransform.cxx.

virtual HippoRectangle BinaryTransform::calcRectangle const Range x,
const Range y
[pure virtual]
 

Returns a HippoRectangle enclosing the transformed data space.

Implemented in HammerAito, Lambert, and XYTransform.

virtual BinaryTransform* BinaryTransform::clone  )  const [pure virtual]
 

Creates a new XYTransform object by copying an existing one.

Implements TransformBase.

Implemented in HammerAito, Lambert, and XYTransform.

virtual void BinaryTransform::inverseTransform double &  x,
double &  y
const [pure virtual]
 

Transform the transformed coordinates on X and Y axis back to the original true data space.

Implemented in HammerAito, Lambert, and XYTransform.

void BinaryTransform::inverseTransformZ double &  z  )  const
 

Inverse transforms the z coordinate.

Definition at line 104 of file BinaryTransform.cxx.

References UnaryTransform::inverseTransform(), and m_z.

virtual bool BinaryTransform::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 HammerAito, Lambert, and XYTransform.

bool BinaryTransform::isPeriodic  )  const
 

Sets wether this transform is periodic.

Definition at line 146 of file BinaryTransform.cxx.

References m_is_periodic.

Referenced by BinaryTransform(), AxisRepBase::drawCrossHairs(), CompositePlotter::fillPickedPoint(), and Inspector::setHighRange().

virtual const Range& BinaryTransform::limitX  )  const [pure virtual]
 

Returns the Range limits of the first corrdinate.

Implemented in PeriodicBinaryTransform, and XYTransform.

Referenced by CompositePlotter::autoScale(), and CompositePlotter::setRangePrivate().

virtual const Range& BinaryTransform::limitY  )  const [pure virtual]
 

Returns the Range limits of the second corrdinate.

Implemented in PeriodicBinaryTransform, and XYTransform.

Referenced by CompositePlotter::autoScale(), and CompositePlotter::setRangePrivate().

const Range & BinaryTransform::limitZ  )  const
 

Returns the Range limits on the third corrdinate.

Definition at line 110 of file BinaryTransform.cxx.

References UnaryTransform::limits(), and m_z.

Referenced by CompositePlotter::autoScaleZ(), and CompositePlotter::setRangePrivate().

const string & TransformBase::name  )  const [inherited]
 

Returns the name of the Transform.

Definition at line 43 of file TransformBase.cxx.

References TransformBase::m_name.

Referenced by BinaryTransform(), TransformXML::createElement(), DisplayController::getLog(), DisplayController::setLog(), and XYTransform::XYTransform().

bool BinaryTransform::needsGrid  )  const
 

Returns wether this transform needs grid.

Definition at line 116 of file BinaryTransform.cxx.

References m_needs_grid.

Referenced by BinaryTransform(), and CompositePlotter::drawAxisRep().

bool BinaryTransform::needsXTicks  )  const
 

Returns wether this transform needs x ticks.

Definition at line 126 of file BinaryTransform.cxx.

References m_needs_x_ticks.

Referenced by BinaryTransform(), and CompositePlotter::drawAxisRep().

bool BinaryTransform::needsYTicks  )  const
 

Returns wether this transform needs y ticks.

Definition at line 136 of file BinaryTransform.cxx.

References m_needs_y_ticks.

Referenced by BinaryTransform(), and CompositePlotter::drawAxisRep().

void BinaryTransform::setNeedsGrid bool  needs_grid  ) 
 

Sets wether this transform needs grid.

Definition at line 121 of file BinaryTransform.cxx.

References m_needs_grid.

void BinaryTransform::setNeedsXTicks bool  needs_x_ticks  ) 
 

Sets wether this transform needs x ticks.

Definition at line 131 of file BinaryTransform.cxx.

References m_needs_x_ticks.

void BinaryTransform::setNeedsYTicks bool  needs_y_ticks  ) 
 

Sets wether this transform needs y yicks.

Definition at line 141 of file BinaryTransform.cxx.

References m_needs_y_ticks.

virtual const std::vector< AxisTick >& BinaryTransform::setTicks AxisModelBase axis_model,
hippodraw::Axes::Type  axis
[pure virtual]
 

Sets and return the axis ticks on specified axis.

Implemented in HammerAito, Lambert, and XYTransform.

void BinaryTransform::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 91 of file BinaryTransform.cxx.

References m_z.

virtual void BinaryTransform::transform std::vector< double > &  x,
std::vector< double > &  y
const [pure virtual]
 

A transform on two axes.

Implemented in HammerAito, Lambert, and XYTransform.

virtual void BinaryTransform::transform double &  x,
double &  y
const [pure virtual]
 

Transform the coordinates on the X and Y axes.

Attention:
The arguments are passed by reference so the values may changed.

Implemented in HammerAito, Lambert, and XYTransform.

Referenced by AxisRepBase::drawAxesLines(), AxisRepBase::drawCrossHairs(), AxisRepBase::drawGridLines(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), CutRangeRep::drawNormalRange(), ErrorBarRep::drawXError(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawXTickLines(), ErrorBarRep::drawYError(), AxisRepBase::drawYTickLabels(), AxisRepBase::drawYTickLines(), ContourPointRep::endPlot(), and SymbolPointRep::transformPoints().

void BinaryTransform::transformZ double &  z  )  const
 

Transforms the z coordinate.

Definition at line 98 of file BinaryTransform.cxx.

References m_z, and UnaryTransform::transform().

Referenced by ContourPointRep::drawContourTicks(), AxisRepColor::drawZTickLabels(), AxisRepColor::drawZTickLines(), and CompositePlotter::prepareToDraw().

virtual void BinaryTransform::validate Range x,
Range y
const [pure virtual]
 

Validates the Ranges.

Adjusts Ranges to be restricted to that which is valid for the transform.

Implemented in HammerAito, Lambert, and XYTransform.

Referenced by AxisRepBase::drawGridLines(), and CompositePlotter::prepareToDraw().

TransformBase * BinaryTransform::zTransform  )  const
 

Returns the transform function on the Z axis.

Definition at line 84 of file BinaryTransform.cxx.

References m_z.

Referenced by DisplayController::getLog(), and DisplayController::setLog().


Member Data Documentation

bool BinaryTransform::m_is_periodic [protected]
 

Is this transform periodic.

Definition at line 55 of file BinaryTransform.h.

Referenced by BinaryTransform(), and isPeriodic().

std::string TransformBase::m_name [protected, inherited]
 

Name of the Transform.

Definition at line 39 of file TransformBase.h.

Referenced by BinaryTransform(), HammerAito::HammerAito(), Lambert::Lambert(), LinearTransform::LinearTransform(), LogTransform::LogTransform(), TransformBase::name(), TransformBase::TransformBase(), XYTransform::XYTransform(), XYZTransform::XYZTransform(), and XYZTransformBase::XYZTransformBase().

bool BinaryTransform::m_needs_grid [protected]
 

Does this binary tranform needs grid?

Definition at line 46 of file BinaryTransform.h.

Referenced by BinaryTransform(), needsGrid(), and setNeedsGrid().

bool BinaryTransform::m_needs_x_ticks [protected]
 

Does this binary tranform x ticks?

Definition at line 49 of file BinaryTransform.h.

Referenced by BinaryTransform(), needsXTicks(), and setNeedsXTicks().

bool BinaryTransform::m_needs_y_ticks [protected]
 

Does this binary tranform y ticks?

Definition at line 52 of file BinaryTransform.h.

Referenced by BinaryTransform(), needsYTicks(), and setNeedsYTicks().

UnaryTransform* BinaryTransform::m_z [protected]
 

The transform on the Z axis.

Definition at line 43 of file BinaryTransform.h.

Referenced by XYTransform::adjustValues(), BinaryTransform(), inverseTransformZ(), limitZ(), XYTransform::setTicks(), Lambert::setTicks(), HammerAito::setTicks(), setZTransform(), transformZ(), zTransform(), and ~BinaryTransform().


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3