Class TransformationManagerImpl
- java.lang.Object
-
- org.scilab.forge.scirenderer.tranformations.TransformationManagerImpl
-
- All Implemented Interfaces:
TransformationManager
public class TransformationManagerImpl extends java.lang.Object implements TransformationManager
DefaultTransformationManagerimplementation.- Author:
- Pierre Lando
-
-
Constructor Summary
Constructors Constructor Description TransformationManagerImpl(Canvas canvas)Standard constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(TransformationManagerListener listener)Add a listener.protected voidfireTransformationChanged()Notify listeners the top transformation have changed.TransformationgetCanvasProjection()Return the canvas projection matrix.TransformationgetG2DProjection()Return the canvas projection matrix for Graphics2D.TransformationgetG2DSingleProjection()Return the projection matrix (no modelView).TransformationgetG2DWindowProjection()Return the window projection matrix for Graphics2D.TransformationgetInverseWindowTransformation()Return the inverse of window transformation.TransformationStackgetModelViewStack()Return the model view matrix stack.TransformationStackgetProjectionStack()Return the projection matrix stack.TransformationgetTransformation()Return the top scene transformation.TransformationgetWindowTransformation()Return the window transformation.booleanisUsingSceneCoordinate()Return true if is using scene coordinate.voidremoveListener(TransformationManagerListener listener)Remove a listener.voidreset()Clear all stack.voiduseSceneCoordinate()Switch to scene coordinate.voiduseWindowCoordinate()Switch to window coordinate.
-
-
-
Constructor Detail
-
TransformationManagerImpl
public TransformationManagerImpl(Canvas canvas)
Standard constructor.- Parameters:
canvas- the canvas.
-
-
Method Detail
-
addListener
public void addListener(TransformationManagerListener listener)
Description copied from interface:TransformationManagerAdd a listener.- Specified by:
addListenerin interfaceTransformationManager- Parameters:
listener- added.
-
removeListener
public void removeListener(TransformationManagerListener listener)
Description copied from interface:TransformationManagerRemove a listener.- Specified by:
removeListenerin interfaceTransformationManager- Parameters:
listener- removed.
-
getModelViewStack
public TransformationStack getModelViewStack()
Description copied from interface:TransformationManagerReturn the model view matrix stack.- Specified by:
getModelViewStackin interfaceTransformationManager- Returns:
- the model view matrix stack.
-
getProjectionStack
public TransformationStack getProjectionStack()
Description copied from interface:TransformationManagerReturn the projection matrix stack.- Specified by:
getProjectionStackin interfaceTransformationManager- Returns:
- the projection matrix stack.
-
getTransformation
public Transformation getTransformation()
Description copied from interface:TransformationManagerReturn the top scene transformation.- Specified by:
getTransformationin interfaceTransformationManager- Returns:
- the top scene transformation.
-
getWindowTransformation
public Transformation getWindowTransformation()
Description copied from interface:TransformationManagerReturn the window transformation.- Specified by:
getWindowTransformationin interfaceTransformationManager- Returns:
- the window transformation.
-
getInverseWindowTransformation
public Transformation getInverseWindowTransformation()
Description copied from interface:TransformationManagerReturn the inverse of window transformation.- Specified by:
getInverseWindowTransformationin interfaceTransformationManager- Returns:
- the inverse window transformation.
-
getCanvasProjection
public Transformation getCanvasProjection()
Description copied from interface:TransformationManagerReturn the canvas projection matrix.- Specified by:
getCanvasProjectionin interfaceTransformationManager- Returns:
- the canvas projection matrix.
-
getG2DProjection
public Transformation getG2DProjection()
Description copied from interface:TransformationManagerReturn the canvas projection matrix for Graphics2D.- Specified by:
getG2DProjectionin interfaceTransformationManager- Returns:
- the canvas projection matrix.
-
getG2DSingleProjection
public Transformation getG2DSingleProjection()
Description copied from interface:TransformationManagerReturn the projection matrix (no modelView).- Specified by:
getG2DSingleProjectionin interfaceTransformationManager- Returns:
- the projection matrix.
-
getG2DWindowProjection
public Transformation getG2DWindowProjection()
Description copied from interface:TransformationManagerReturn the window projection matrix for Graphics2D.- Specified by:
getG2DWindowProjectionin interfaceTransformationManager- Returns:
- the window projection matrix.
-
reset
public void reset()
Description copied from interface:TransformationManagerClear all stack.- Specified by:
resetin interfaceTransformationManager
-
useWindowCoordinate
public void useWindowCoordinate()
Description copied from interface:TransformationManagerSwitch to window coordinate.- Specified by:
useWindowCoordinatein interfaceTransformationManager
-
useSceneCoordinate
public void useSceneCoordinate()
Description copied from interface:TransformationManagerSwitch to scene coordinate.- Specified by:
useSceneCoordinatein interfaceTransformationManager
-
isUsingSceneCoordinate
public boolean isUsingSceneCoordinate()
Description copied from interface:TransformationManagerReturn true if is using scene coordinate.- Specified by:
isUsingSceneCoordinatein interfaceTransformationManager- Returns:
- true if is using scene coordinate.
-
fireTransformationChanged
protected void fireTransformationChanged()
Notify listeners the top transformation have changed.
-
-