Package com.luciad.view.lightspeed.util
Class TLspViewTransformationUtil
java.lang.Object
com.luciad.view.lightspeed.util.TLspViewTransformationUtil
Provides utility methods for configuring a view as either a 2D or 3D view. These methods
instantiate an appropriate
ALspViewXYZWorldTransformation
and initialize it with sensible default parameters. If desirable, this class can also configure
the new world-to-view transformation such that the visible area of the world with the new
transformation remains approximately the same as with the old one. This allows, for instance,
for a view to be switched back and forth between 2D and 3D without changing its currently viewed
area.- Since:
- 2012.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
setup2DView
(TLspViewXYZWorldTransformation2D aV2W, ILspView aView, ILcdXYZWorldReference aWorldReference, boolean aPreserveViewBounds) Switches the specified view to 2D using the requested world reference.static void
setup2DView
(ILspView aView, ILcdXYZWorldReference aWorldReference) Switches the specified view to 2D using the requested world reference.static void
setup2DView
(ILspView aView, ILcdXYZWorldReference aWorldReference, boolean aPreserveViewBounds) Switches the specified view to 2D using the requested world reference, with the option to preserve the current view bounds.static void
setup3DView
(TLspViewXYZWorldTransformation3D aV2W, ILspView aView, ILcdXYZWorldReference aWorldReference, boolean aPreserveViewBounds) Switches the specified view to 3D using the requested world reference.static void
setup3DView
(ILspView aView, boolean aPreserveViewBounds) Switches the specified view to 3D.static void
setup3DView
(ILspView aView, ILcdXYZWorldReference aWorldReference) Switches the specified view to 3D using the requested world reference.static void
setup3DView
(ILspView aView, ILcdXYZWorldReference aWorldReference, boolean aPreserveViewBounds) Switches the specified view to 3D using the requested world reference, with the option to preserve the current view bounds.static void
setup3DView
(ILspView aView, ILcdXYZWorldReference aWorldReference, boolean aPreserveViewBounds, boolean aAboveTerrain) Switches the specified view to 3D using the requested world reference.
-
Method Details
-
setup3DView
Switches the specified view to 3D. The world reference of the view will be set to aTLcdGeocentricReference
with a WGS84 geodetic datum. In addition to the world reference, this method also sets the world-to-view transformation to aTLspViewXYZWorldTransformation3D
. IfaPreserveViewBounds
is true then, after changing the world reference, the view is fit to approximately the same area it was viewing before the change of world reference. Otherwise, the view is fit to the entire bounds of the world.- Parameters:
aView
- the view to be configuredaPreserveViewBounds
- true to preserve the visible area of the view
-
setup2DView
public static void setup2DView(TLspViewXYZWorldTransformation2D aV2W, ILspView aView, ILcdXYZWorldReference aWorldReference, boolean aPreserveViewBounds) Switches the specified view to 2D using the requested world reference. In addition to the world reference, this method also sets the given world-to-view transformation. IfaPreserveViewBounds
is true then, after changing the world reference, the view is fit to approximately the same area it was viewing before the change of world reference. Otherwise the view is fit to the entire bounds of the world. Note that for 2D views, @code aWorldReference} should preferably be anILcdGridReference
. Other types, such as geocentric references may produce undesirable results.- Parameters:
aV2W
- the given world-to-view transformationaView
- the view to be configuredaWorldReference
- the world reference to set on the viewaPreserveViewBounds
- true to preserve the visible area of the view
-
setup3DView
public static void setup3DView(ILspView aView, ILcdXYZWorldReference aWorldReference, boolean aPreserveViewBounds, boolean aAboveTerrain) Switches the specified view to 3D using the requested world reference. In addition to the world reference, this method also sets the world-to-view transformation to aTLspViewXYZWorldTransformation3D
. IfaPreserveViewBounds
is true then, after changing the world reference, the view is fit to approximately the same area it was viewing before the change of world reference. Otherwise, the view is fit to the entire bounds of the world.- Parameters:
aView
- the view to be configuredaWorldReference
- the world reference to set on the viewaPreserveViewBounds
- true to preserve the visible area of the viewaAboveTerrain
- true to constrain the camera over the terrain
-
setup3DView
public static void setup3DView(TLspViewXYZWorldTransformation3D aV2W, ILspView aView, ILcdXYZWorldReference aWorldReference, boolean aPreserveViewBounds) Switches the specified view to 3D using the requested world reference. In addition to the world reference, this method also sets the given world-to-view transformation. IfaPreserveViewBounds
is true then, after changing the world reference, the view is fit to approximately the same area it was viewing before the change of world reference. Otherwise, the view is fit to the entire bounds of the world.- Parameters:
aV2W
- a given world-to-view transformation.aView
- the view to be configuredaWorldReference
- the world reference to set on the viewaPreserveViewBounds
- true to preserve the visible area of the view
-
setup2DView
Switches the specified view to 2D using the requested world reference. In addition to the world reference, this method also sets the world-to-view transformation to aTLspViewXYZWorldTransformation2D
. Note that for 2D views,aWorldReference
should preferably be anILcdGridReference
. Other types, such as geocentric references may produce undesirable results.- Parameters:
aView
- the view to be configuredaWorldReference
- the world reference to set on the view
-
setup3DView
Switches the specified view to 3D using the requested world reference. In addition to the world reference, this method also sets the world-to-view transformation to aTLspViewXYZWorldTransformation3D
.- Parameters:
aView
- the view to be configuredaWorldReference
- the world reference to set on the view
-
setup2DView
public static void setup2DView(ILspView aView, ILcdXYZWorldReference aWorldReference, boolean aPreserveViewBounds) Switches the specified view to 2D using the requested world reference, with the option to preserve the current view bounds. In addition to the world reference, this method also sets the world-to-view transformation to aTLspViewXYZWorldTransformation2D
. IfaPreserveViewBounds
is true then, after changing the world reference, the view is fit to approximately the same area it was viewing before the change of world reference. Otherwise, the view is fit to the entire bounds of the world. Note that for 2D views,aWorldReference
should preferably be anILcdGridReference
. Other types, such as geocentric references may produce undesirable results.- Parameters:
aView
- the view to be configuredaWorldReference
- the world reference to set on the viewaPreserveViewBounds
- true to preserve the visible area of the view
-
setup3DView
public static void setup3DView(ILspView aView, ILcdXYZWorldReference aWorldReference, boolean aPreserveViewBounds) Switches the specified view to 3D using the requested world reference, with the option to preserve the current view bounds. In addition to the world reference, this method also sets the world-to-view transformation to aTLspViewXYZWorldTransformation3D
. IfaPreserveViewBounds
is true then, after changing the world reference, the view is fit to approximately the same area it was viewing before the change of world reference. Otherwise, the view is fit to the entire bounds of the world.- Parameters:
aView
- the view to be configuredaWorldReference
- the world reference to set on the viewaPreserveViewBounds
- true to preserve the visible area of the view
-