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

XYTransform Class Reference

#include <XYTransform.h>

Inheritance diagram for XYTransform:

Inheritance graph
[legend]
Collaboration diagram for XYTransform:

Collaboration graph
[legend]
List of all members.

Detailed Description

A transform that transforms the X and Y coordinates independently.

Author:
Paul_Kunz@slac.stanford.edu

Definition at line 27 of file XYTransform.h.

Public Member Functions

virtual void adjustValues (AxisModelBase &model, hippodraw::Axes::Type axes, const Range &limit)
 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)
 Returns a HippoRectangle enclosing the transformed data space.
virtual XYTransformclone () const
 Creates a new Transform object by copying an existing one.
virtual void inverseTransform (double &x, double &y) const
 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
 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
 Returns a Range whose values are the limits on the X coordinate.
virtual const RangelimitY () const
 Returns a Range whose values are the limits on the Y coordinate.
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)
 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
 A transform on two axes.
virtual void transform (double &x, double &y) const
 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
 Validates the Ranges.
TransformBasexTransform () const
 Returns the transform function on the X axis.
 XYTransform (const XYTransform &)
 The copy constructor.
 XYTransform (UnaryTransform *x, UnaryTransform *y, UnaryTransform *z)
 The following constructor takes three base constructors as arguments.
TransformBaseyTransform () const
 Returns the transform function on the Y axis.
TransformBasezTransform () const
 Returns the transform function on the Z axis.
virtual ~XYTransform ()
 The virtual destructor.

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.

Private Attributes

UnaryTransformm_x
 The transform on the X axis.
UnaryTransformm_y
 The transform on the Y axis.


Constructor & Destructor Documentation

XYTransform::XYTransform UnaryTransform x,
UnaryTransform y,
UnaryTransform z
 

The following constructor takes three base constructors as arguments.

Definition at line 26 of file XYTransform.cxx.

References TransformBase::m_name, m_x, m_y, and TransformBase::name().

XYTransform::XYTransform const XYTransform  ) 
 

The copy constructor.

Definition at line 42 of file XYTransform.cxx.

References UnaryTransform::clone(), m_x, and m_y.

XYTransform::~XYTransform  )  [virtual]
 

The virtual destructor.

Definition at line 36 of file XYTransform.cxx.

References m_x, and m_y.


Member Function Documentation

void XYTransform::adjustValues AxisModelBase model,
hippodraw::Axes::Type  axes,
const Range limit
[virtual]
 

Sets the range of given axis to be a new "nice" within the limits given.

Implements BinaryTransform.

Definition at line 163 of file XYTransform.cxx.

References m_x, m_y, BinaryTransform::m_z, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

double XYTransform::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 BinaryTransform.

Definition at line 97 of file XYTransform.cxx.

HippoRectangle XYTransform::calcRectangle const Range x,
const Range y
[virtual]
 

Returns a HippoRectangle enclosing the transformed data space.

Implements BinaryTransform.

Definition at line 103 of file XYTransform.cxx.

References Range::high(), Range::low(), and transform().

XYTransform * XYTransform::clone  )  const [virtual]
 

Creates a new Transform object by copying an existing one.

Implements BinaryTransform.

Definition at line 57 of file XYTransform.cxx.

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

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

Implements BinaryTransform.

Definition at line 80 of file XYTransform.cxx.

References UnaryTransform::inverseTransform(), m_x, and m_y.

void BinaryTransform::inverseTransformZ double &  z  )  const [inherited]
 

Inverse transforms the z coordinate.

Definition at line 104 of file BinaryTransform.cxx.

References UnaryTransform::inverseTransform(), and BinaryTransform::m_z.

bool XYTransform::isLinearInXY  )  const [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.

Implements BinaryTransform.

Definition at line 65 of file XYTransform.cxx.

References m_x, and m_y.

bool BinaryTransform::isPeriodic  )  const [inherited]
 

Sets wether this transform is periodic.

Definition at line 146 of file BinaryTransform.cxx.

References BinaryTransform::m_is_periodic.

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

const Range & XYTransform::limitX  )  const [virtual]
 

Returns a Range whose values are the limits on the X coordinate.

Implements BinaryTransform.

Definition at line 125 of file XYTransform.cxx.

References UnaryTransform::limits(), and m_x.

const Range & XYTransform::limitY  )  const [virtual]
 

Returns a Range whose values are the limits on the Y coordinate.

Implements BinaryTransform.

Definition at line 131 of file XYTransform.cxx.

References UnaryTransform::limits(), and m_y.

const Range & BinaryTransform::limitZ  )  const [inherited]
 

Returns the Range limits on the third corrdinate.

Definition at line 110 of file BinaryTransform.cxx.

References UnaryTransform::limits(), and BinaryTransform::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::BinaryTransform(), TransformXML::createElement(), DisplayController::getLog(), DisplayController::setLog(), and XYTransform().

bool BinaryTransform::needsGrid  )  const [inherited]
 

Returns wether this transform needs grid.

Definition at line 116 of file BinaryTransform.cxx.

References BinaryTransform::m_needs_grid.

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

bool BinaryTransform::needsXTicks  )  const [inherited]
 

Returns wether this transform needs x ticks.

Definition at line 126 of file BinaryTransform.cxx.

References BinaryTransform::m_needs_x_ticks.

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

bool BinaryTransform::needsYTicks  )  const [inherited]
 

Returns wether this transform needs y ticks.

Definition at line 136 of file BinaryTransform.cxx.

References BinaryTransform::m_needs_y_ticks.

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

void BinaryTransform::setNeedsGrid bool  needs_grid  )  [inherited]
 

Sets wether this transform needs grid.

Definition at line 121 of file BinaryTransform.cxx.

References BinaryTransform::m_needs_grid.

void BinaryTransform::setNeedsXTicks bool  needs_x_ticks  )  [inherited]
 

Sets wether this transform needs x ticks.

Definition at line 131 of file BinaryTransform.cxx.

References BinaryTransform::m_needs_x_ticks.

void BinaryTransform::setNeedsYTicks bool  needs_y_ticks  )  [inherited]
 

Sets wether this transform needs y yicks.

Definition at line 141 of file BinaryTransform.cxx.

References BinaryTransform::m_needs_y_ticks.

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

Sets and return the axis ticks on specified axis.

Implements BinaryTransform.

Definition at line 148 of file XYTransform.cxx.

References m_x, m_y, BinaryTransform::m_z, UnaryTransform::setTicks(), hippodraw::Axes::X, and hippodraw::Axes::Y.

void BinaryTransform::setZTransform TransformBase transform  )  [inherited]
 

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 BinaryTransform::m_z.

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

A transform on two axes.

Implements BinaryTransform.

Definition at line 89 of file XYTransform.cxx.

References m_x, m_y, and UnaryTransform::transform().

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

Transform the coordinates on the X and Y axes.

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

Implements BinaryTransform.

Definition at line 71 of file XYTransform.cxx.

References m_x, m_y, and UnaryTransform::transform().

Referenced by calcRectangle().

void BinaryTransform::transformZ double &  z  )  const [inherited]
 

Transforms the z coordinate.

Definition at line 98 of file BinaryTransform.cxx.

References BinaryTransform::m_z, and UnaryTransform::transform().

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

void XYTransform::validate Range x,
Range y
const [virtual]
 

Validates the Ranges.

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

Implements BinaryTransform.

Definition at line 118 of file XYTransform.cxx.

References m_x, m_y, and UnaryTransform::validate().

TransformBase * XYTransform::xTransform  )  const
 

Returns the transform function on the X axis.

Definition at line 136 of file XYTransform.cxx.

References m_x.

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

TransformBase * XYTransform::yTransform  )  const
 

Returns the transform function on the Y axis.

Definition at line 141 of file XYTransform.cxx.

References m_y.

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

TransformBase * BinaryTransform::zTransform  )  const [inherited]
 

Returns the transform function on the Z axis.

Definition at line 84 of file BinaryTransform.cxx.

References BinaryTransform::m_z.

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


Member Data Documentation

bool BinaryTransform::m_is_periodic [protected, inherited]
 

Is this transform periodic.

Definition at line 55 of file BinaryTransform.h.

Referenced by BinaryTransform::BinaryTransform(), and BinaryTransform::isPeriodic().

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

Name of the Transform.

Definition at line 39 of file TransformBase.h.

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

bool BinaryTransform::m_needs_grid [protected, inherited]
 

Does this binary tranform needs grid?

Definition at line 46 of file BinaryTransform.h.

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

bool BinaryTransform::m_needs_x_ticks [protected, inherited]
 

Does this binary tranform x ticks?

Definition at line 49 of file BinaryTransform.h.

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

bool BinaryTransform::m_needs_y_ticks [protected, inherited]
 

Does this binary tranform y ticks?

Definition at line 52 of file BinaryTransform.h.

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

UnaryTransform* XYTransform::m_x [private]
 

The transform on the X axis.

Definition at line 33 of file XYTransform.h.

Referenced by adjustValues(), inverseTransform(), isLinearInXY(), limitX(), setTicks(), transform(), validate(), xTransform(), XYTransform(), and ~XYTransform().

UnaryTransform* XYTransform::m_y [private]
 

The transform on the Y axis.

Definition at line 36 of file XYTransform.h.

Referenced by adjustValues(), inverseTransform(), isLinearInXY(), limitY(), setTicks(), transform(), validate(), XYTransform(), yTransform(), and ~XYTransform().

UnaryTransform* BinaryTransform::m_z [protected, inherited]
 

The transform on the Z axis.

Definition at line 43 of file BinaryTransform.h.

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


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