Packageorg.un.flex.utils.geom
Interfacepublic interface IProjector
ImplementorsPoincareProjector

This interface defines the functionality of a projector, which is used to map points in Display Geometry (Screen) to those in Non-Euclidean Space (Hyperbolic Geometry).
The implementation is a rewrite of Jens Kanschik's Hypergraph implementation in Java. However, apart from the general idea and some variable names, this code improves on hypergraph and also implements additional functionality. Copyright (C) 2003 Jens Kanschik, mail : jensKanschik



Public Methods
 MethodDefined by
  
getCenter(x1:Number, y1:Number, x2:Number, y2:Number, d:DisplayObject):Point
Returns the center of the circle in Euclidean space, which joins the two points P (x1, y1) and Q (x2, y2)
IProjector
  
Returns the inverse of the view matrix.
IProjector
  
getScale(p:IPoint):Point
Returns the scaling factors at a point in the non-euclidean space.
IProjector
  
Returns the view matrix.
IProjector
  
project(p:IPoint, d:DisplayObject):Point
Project a IPoint (Hyperbolic Geometry) to Point (Display Geometry)
IProjector
  
Sets the view matrix and computes the inverse of the view matrix.
IProjector
  
unProject(p:Point, d:DisplayObject, adjustBadNodes:Boolean):IPoint
Un-project a Point (Display Geometry) to IPoint (Hyperbolic Geometry)
IProjector
Method detail
getCenter()method
public function getCenter(x1:Number, y1:Number, x2:Number, y2:Number, d:DisplayObject):Point

Returns the center of the circle in Euclidean space, which joins the two points P (x1, y1) and Q (x2, y2)

Parameters
x1:Number
 
y1:Number
 
x2:Number
 
y2:Number
 
d:DisplayObject

Returns
Point — The center of the circle
getInverseViewMatrix()method 
public function getInverseViewMatrix():IIsometry

Returns the inverse of the view matrix.

Returns
IIsometry — The inverse of the view matrix.
getScale()method 
public function getScale(p:IPoint):Point

Returns the scaling factors at a point in the non-euclidean space.

Parameters
p:IPoint — The point in the non-euclidean space

Returns
Point — A point with scaling factors in X and Y directions.
getViewMatrix()method 
public function getViewMatrix():IIsometry

Returns the view matrix.

Returns
IIsometry — The view matrix.
project()method 
public function project(p:IPoint, d:DisplayObject):Point

Project a IPoint (Hyperbolic Geometry) to Point (Display Geometry)

Parameters
p:IPoint
 
d:DisplayObject

Returns
Point
setViewMatrix()method 
public function setViewMatrix(vm:IIsometry):void

Sets the view matrix and computes the inverse of the view matrix. If vm is null, the view matrix is set to the identity transformation.

Parameters
vm:IIsometry — The new view matrix.
unProject()method 
public function unProject(p:Point, d:DisplayObject, adjustBadNodes:Boolean):IPoint

Un-project a Point (Display Geometry) to IPoint (Hyperbolic Geometry)

Parameters
p:Point
 
d:DisplayObject
 
adjustBadNodes:Boolean

Returns
IPoint