Class TransformationManagerImpl
java.lang.Object
org.scilab.forge.scirenderer.tranformations.TransformationManagerImpl
- All Implemented Interfaces:
TransformationManager
Default
TransformationManager
implementation.- Author:
- Pierre Lando
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(TransformationManagerListener listener) Add a listener.protected void
Notify listeners the top transformation have changed.Return the canvas projection matrix.Return the canvas projection matrix for Graphics2D.Return the projection matrix (no modelView).Return the window projection matrix for Graphics2D.Return the inverse of window transformation.Return the model view matrix stack.Return the projection matrix stack.Return the top scene transformation.Return the window transformation.boolean
Return true if is using scene coordinate.void
removeListener
(TransformationManagerListener listener) Remove a listener.void
reset()
Clear all stack.void
Switch to scene coordinate.void
Switch to window coordinate.
-
Constructor Details
-
TransformationManagerImpl
Standard constructor.- Parameters:
canvas
- the canvas.
-
-
Method Details
-
addListener
Description copied from interface:TransformationManager
Add a listener.- Specified by:
addListener
in interfaceTransformationManager
- Parameters:
listener
- added.
-
removeListener
Description copied from interface:TransformationManager
Remove a listener.- Specified by:
removeListener
in interfaceTransformationManager
- Parameters:
listener
- removed.
-
getModelViewStack
Description copied from interface:TransformationManager
Return the model view matrix stack.- Specified by:
getModelViewStack
in interfaceTransformationManager
- Returns:
- the model view matrix stack.
-
getProjectionStack
Description copied from interface:TransformationManager
Return the projection matrix stack.- Specified by:
getProjectionStack
in interfaceTransformationManager
- Returns:
- the projection matrix stack.
-
getTransformation
Description copied from interface:TransformationManager
Return the top scene transformation.- Specified by:
getTransformation
in interfaceTransformationManager
- Returns:
- the top scene transformation.
-
getWindowTransformation
Description copied from interface:TransformationManager
Return the window transformation.- Specified by:
getWindowTransformation
in interfaceTransformationManager
- Returns:
- the window transformation.
-
getInverseWindowTransformation
Description copied from interface:TransformationManager
Return the inverse of window transformation.- Specified by:
getInverseWindowTransformation
in interfaceTransformationManager
- Returns:
- the inverse window transformation.
-
getCanvasProjection
Description copied from interface:TransformationManager
Return the canvas projection matrix.- Specified by:
getCanvasProjection
in interfaceTransformationManager
- Returns:
- the canvas projection matrix.
-
getG2DProjection
Description copied from interface:TransformationManager
Return the canvas projection matrix for Graphics2D.- Specified by:
getG2DProjection
in interfaceTransformationManager
- Returns:
- the canvas projection matrix.
-
getG2DSingleProjection
Description copied from interface:TransformationManager
Return the projection matrix (no modelView).- Specified by:
getG2DSingleProjection
in interfaceTransformationManager
- Returns:
- the projection matrix.
-
getG2DWindowProjection
Description copied from interface:TransformationManager
Return the window projection matrix for Graphics2D.- Specified by:
getG2DWindowProjection
in interfaceTransformationManager
- Returns:
- the window projection matrix.
-
reset
public void reset()Description copied from interface:TransformationManager
Clear all stack.- Specified by:
reset
in interfaceTransformationManager
-
useWindowCoordinate
public void useWindowCoordinate()Description copied from interface:TransformationManager
Switch to window coordinate.- Specified by:
useWindowCoordinate
in interfaceTransformationManager
-
useSceneCoordinate
public void useSceneCoordinate()Description copied from interface:TransformationManager
Switch to scene coordinate.- Specified by:
useSceneCoordinate
in interfaceTransformationManager
-
isUsingSceneCoordinate
public boolean isUsingSceneCoordinate()Description copied from interface:TransformationManager
Return true if is using scene coordinate.- Specified by:
isUsingSceneCoordinate
in interfaceTransformationManager
- Returns:
- true if is using scene coordinate.
-
fireTransformationChanged
protected void fireTransformationChanged()Notify listeners the top transformation have changed.
-