lt.monarch.chart.engine
Interface Projector

All Superinterfaces:
java.lang.Cloneable
All Known Subinterfaces:
Projector2D
All Known Implementing Classes:
DirectProjector, PolarProjector, Projector3D, SimpleProjector2D, SimpleProjector3D

public interface Projector
extends java.lang.Cloneable

Projector is responsible for mapping n-dimensional points to 2D points.


Method Summary
Modifier and Type Method and Description
 java.lang.Object clone()
          Clones this projector
 Rectangle2D getProjectionArea()
          Returns a 2D projection space
 Rectangle2D getProjectionAreaReference()
          Returns a 2D projection space reference
 void prepare()
          Prepares the projector.
 GeneralPoint project(GeneralPoint point)
          Projects a n-dimensional point into a 2D Point.
 GeneralPoint project(GeneralPoint point, GeneralPoint template)
          Projects a n-dimensional point into a 2D Point.
 Polygon2D project(Rectangle2D r)
          Projects a rectangle into polygon.
 void setProjectionArea(Rectangle2D r)
          Sets a 2D projection space
 

Method Detail

setProjectionArea

void setProjectionArea(Rectangle2D r)
Sets a 2D projection space

Parameters:
r - projection space

getProjectionArea

Rectangle2D getProjectionArea()
Returns a 2D projection space

Returns:
projection space

getProjectionAreaReference

Rectangle2D getProjectionAreaReference()
Returns a 2D projection space reference

Returns:
projection space

project

GeneralPoint project(GeneralPoint point)
Projects a n-dimensional point into a 2D Point.

Parameters:
point - n-dimensional point
Returns:
creates and returns a 2D Point

project

GeneralPoint project(GeneralPoint point,
                     GeneralPoint template)
Projects a n-dimensional point into a 2D Point. A 2D point is template is used to avoid unnecessary object creation

Parameters:
point - n-dimensional point
template - point object, to be changed
Returns:
template value

project

Polygon2D project(Rectangle2D r)
Projects a rectangle into polygon.

Parameters:
r - 2D rectangle
Returns:
projected polygon

prepare

void prepare()
Prepares the projector. Allows the projector to do some tedious calculations in advance.


clone

java.lang.Object clone()
Clones this projector

Returns:
cloned projector