treebolic.core
Class HyperTransform

java.lang.Object
  extended by treebolic.core.HyperTransform
All Implemented Interfaces:
IHyperTransform
Direct Known Subclasses:
HyperOrientationPreservingTransform, HyperRadialOrientationPreservingTransform

public class HyperTransform
extends java.lang.Object
implements IHyperTransform

Hyperbolic transform implementation

Author:
Bernard Bou

Field Summary
static HyperTransform NULLTRANSFORM
          Null transform
 HyperRotation theRot
          Rotation componenet of transform, with abs(theRot) == 1
 HyperTranslation theXlat
          Translation component, with abs(theXlat) < 1
 
Constructor Summary
HyperTransform()
          Default constructor that makes null transform
HyperTransform(Complex p, Complex r)
          Constructor from translation vector and rotation angle
HyperTransform(double px, double py, double rx, double ry)
          Constructor for transform expressed in cartesian mode
HyperTransform(HyperRotation r)
          Constructor from rotation, null translation
HyperTransform(HyperTransform t)
          Copy constructor
HyperTransform(HyperTranslation p)
          Constructor from translation, null rotation
HyperTransform(HyperTranslation p, HyperRotation r)
          Constructor from translation and rotation
HyperTransform(HyperTranslation t1, HyperTranslation t2)
          Construct transform as composition of 2 transforms
 
Method Summary
 HyperTransform compose(HyperTransform t2)
          Compose this transform with other transform
 HyperTransform composeXlats(HyperTranslation t1, HyperTranslation t2)
          Compose 2 translations
 HyperTransform inverse()
          Inverse
 Complex map(Complex z)
          Map point in hyperbolic space
 HyperTransform set(HyperTransform t)
          Copy transform
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULLTRANSFORM

public static final HyperTransform NULLTRANSFORM
Null transform


theXlat

public HyperTranslation theXlat
Translation component, with abs(theXlat) < 1


theRot

public HyperRotation theRot
Rotation componenet of transform, with abs(theRot) == 1

Constructor Detail

HyperTransform

public HyperTransform()
Default constructor that makes null transform


HyperTransform

public HyperTransform(Complex p,
                      Complex r)
Constructor from translation vector and rotation angle

Parameters:
p - translation vector
r - rotation angle

HyperTransform

public HyperTransform(HyperTranslation p)
Constructor from translation, null rotation

Parameters:
p - translation vector

HyperTransform

public HyperTransform(HyperRotation r)
Constructor from rotation, null translation

Parameters:
r - rotation angle

HyperTransform

public HyperTransform(HyperTranslation p,
                      HyperRotation r)
Constructor from translation and rotation

Parameters:
p - translation
r - rotation

HyperTransform

public HyperTransform(double px,
                      double py,
                      double rx,
                      double ry)
Constructor for transform expressed in cartesian mode

Parameters:
px - x coordinate for translation vector expressed in cartesian mode (relative to 0,0)
py - y coordinate for translation vector expressed in cartesian mode (relative to 0,0)
rx - x coordinate for rotation expressed by point (relative to 0,0 and x-axis)
ry - y coordinate for rotation expressed by point (relative to 0,0 and x-axis)

HyperTransform

public HyperTransform(HyperTransform t)
Copy constructor

Parameters:
t - source transform

HyperTransform

public HyperTransform(HyperTranslation t1,
                      HyperTranslation t2)
Construct transform as composition of 2 transforms

Parameters:
t1 - transform
t2 - transform
Method Detail

set

public HyperTransform set(HyperTransform t)
Copy transform

Parameters:
t - source transform
Returns:
this transform with value set to t

inverse

public HyperTransform inverse()
Inverse

Returns:
this transform with inverse value

map

public Complex map(Complex z)
Description copied from interface: IHyperTransform
Map point in hyperbolic space

Specified by:
map in interface IHyperTransform
Parameters:
z - point is hyperbolic space
Returns:
map z to z' with z'=map(z)

compose

public HyperTransform compose(HyperTransform t2)
Compose this transform with other transform

Parameters:
t2 - transform
Returns:
this transform as the result of composing the initial transform with t2

composeXlats

public HyperTransform composeXlats(HyperTranslation t1,
                                   HyperTranslation t2)
Compose 2 translations

Parameters:
t1 - translation
t2 - translation
Returns:
composition of t1 and t2

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object