public class TransformationManagerImpl extends java.lang.Object implements TransformationManager
TransformationManager implementation.| Constructor and Description |
|---|
TransformationManagerImpl(Canvas canvas)
Standard constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(TransformationManagerListener listener)
Add a listener.
|
protected void |
fireTransformationChanged()
Notify listeners the top transformation have changed.
|
Transformation |
getCanvasProjection()
Return the canvas projection matrix.
|
Transformation |
getG2DProjection()
Return the canvas projection matrix for Graphics2D.
|
Transformation |
getG2DSingleProjection()
Return the projection matrix (no modelView).
|
Transformation |
getG2DWindowProjection()
Return the window projection matrix for Graphics2D.
|
Transformation |
getInverseWindowTransformation()
Return the inverse of window transformation.
|
TransformationStack |
getModelViewStack()
Return the model view matrix stack.
|
TransformationStack |
getProjectionStack()
Return the projection matrix stack.
|
Transformation |
getTransformation()
Return the top scene transformation.
|
Transformation |
getWindowTransformation()
Return the window transformation.
|
boolean |
isUsingSceneCoordinate()
Return true if is using scene coordinate.
|
void |
removeListener(TransformationManagerListener listener)
Remove a listener.
|
void |
reset()
Clear all stack.
|
void |
useSceneCoordinate()
Switch to scene coordinate.
|
void |
useWindowCoordinate()
Switch to window coordinate.
|
public TransformationManagerImpl(Canvas canvas)
canvas - the canvas.public void addListener(TransformationManagerListener listener)
TransformationManageraddListener in interface TransformationManagerlistener - added.public void removeListener(TransformationManagerListener listener)
TransformationManagerremoveListener in interface TransformationManagerlistener - removed.public TransformationStack getModelViewStack()
TransformationManagergetModelViewStack in interface TransformationManagerpublic TransformationStack getProjectionStack()
TransformationManagergetProjectionStack in interface TransformationManagerpublic Transformation getTransformation()
TransformationManagergetTransformation in interface TransformationManagerpublic Transformation getWindowTransformation()
TransformationManagergetWindowTransformation in interface TransformationManagerpublic Transformation getInverseWindowTransformation()
TransformationManagergetInverseWindowTransformation in interface TransformationManagerpublic Transformation getCanvasProjection()
TransformationManagergetCanvasProjection in interface TransformationManagerpublic Transformation getG2DProjection()
TransformationManagergetG2DProjection in interface TransformationManagerpublic Transformation getG2DSingleProjection()
TransformationManagergetG2DSingleProjection in interface TransformationManagerpublic Transformation getG2DWindowProjection()
TransformationManagergetG2DWindowProjection in interface TransformationManagerpublic void reset()
TransformationManagerreset in interface TransformationManagerpublic void useWindowCoordinate()
TransformationManageruseWindowCoordinate in interface TransformationManagerpublic void useSceneCoordinate()
TransformationManageruseSceneCoordinate in interface TransformationManagerpublic boolean isUsingSceneCoordinate()
TransformationManagerisUsingSceneCoordinate in interface TransformationManagerprotected void fireTransformationChanged()