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 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
|
public function getInverseViewMatrix():IIsometry
Returns the inverse of the view matrix.
Returns
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.
|
public function getViewMatrix():IIsometry
Returns the view matrix.
Returns
public function project(p:IPoint, d:DisplayObject):Point
Project a IPoint (Hyperbolic Geometry) to Point (Display Geometry)
Parameters
Returns
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
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