Class TLspImageProjector
java.lang.Object
com.luciad.view.lightspeed.layer.imageprojection.TLspImageProjector
- All Implemented Interfaces:
ILspImageProjector
Default implementation of
ILspImageProjector
.
You can use the lookAt(com.luciad.shape.ILcdPoint, double, double, double, double, com.luciad.reference.ILcdGeoReference)
and lookFrom(com.luciad.shape.ILcdPoint, double, double, double, double, com.luciad.reference.ILcdGeoReference)
to conveniently specify the projector's
location and orientation. Note that you must also set the range
otherwise the image might not be visible (range too small) or projected on the back side of the
earth (range too large). Typically the range should be 2-4 times the distance of the projector
from the ground.- Since:
- 2012.0
-
Constructor Summary
ConstructorDescriptionCreates a new, uninitialized image projector.TLspImageProjector
(ILcdPoint aEyePoint, ILcdPoint aReferencePoint, ILcdPoint aUpVector, double aFieldOfView, double aAspectRatio, double aRange) Creates a new image projector with the given properties. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the projector's aspect ratio.Returns the projector's eye point.double
Returns the projector's vertical field of view, in degrees.double
getRange()
Returns the projector's distance range.Returns the projector's reference point.Returns the projector's up vector.void
lookAt
(ILcdPoint aLookAt, double aDistance, double aYaw, double aPitch, double aRoll, ILcdGeoReference aProjectorReference) Computes the projector's eye point, reference point and up vector based on the given parameters.void
lookFrom
(ILcdPoint aLookFrom, double aDistance, double aYaw, double aPitch, double aRoll, ILcdGeoReference aProjectorReference) Computes the projector's eye point, reference point and up vector based on the given parameters.void
setAspectRatio
(double aAspectRatio) Changes the projector's aspect ratio to the specified value.void
setEyePoint
(ILcdPoint aEyePoint) Moves the projector's eye point to the specified location.void
setFieldOfView
(double aFieldOfView) Changes the projector's vertical field of view angle to the specified value.void
setRange
(double aRange) Changes the projector's distance range to the specified value.void
setReferencePoint
(ILcdPoint aReferencePoint) Moves the projector's reference point to the specified location.void
setUpVector
(ILcdPoint aUpVector) Changes the projector's up vector.
-
Constructor Details
-
TLspImageProjector
public TLspImageProjector()Creates a new, uninitialized image projector. Until all its properties are set to appropriate values, using this projector will produce undefined results. -
TLspImageProjector
public TLspImageProjector(ILcdPoint aEyePoint, ILcdPoint aReferencePoint, ILcdPoint aUpVector, double aFieldOfView, double aAspectRatio, double aRange) Creates a new image projector with the given properties.- Parameters:
aEyePoint
- the initial eye pointaReferencePoint
- the initial reference pointaUpVector
- the initial up vectoraFieldOfView
- the initial field of viewaAspectRatio
- the initial aspect rationaRange
- the initial distance range
-
-
Method Details
-
getEyePoint
Description copied from interface:ILspImageProjector
Returns the projector's eye point. This is position of the projector in the world.- Specified by:
getEyePoint
in interfaceILspImageProjector
- Returns:
- the projector's eye point
-
setEyePoint
Moves the projector's eye point to the specified location.- Parameters:
aEyePoint
- the new eye point- See Also:
-
getReferencePoint
Description copied from interface:ILspImageProjector
Returns the projector's reference point. This is the point at which the projector is pointed.- Specified by:
getReferencePoint
in interfaceILspImageProjector
- Returns:
- the projector's reference point
-
setReferencePoint
Moves the projector's reference point to the specified location.- Parameters:
aReferencePoint
- the new reference point- See Also:
-
getUpVector
Description copied from interface:ILspImageProjector
Returns the projector's up vector. This is a normalized vector, relative to the eye point, which defines the "up" direction in the projector's local coordinate frame (i.e. which determines the projector's roll angle around its line of sight axis).- Specified by:
getUpVector
in interfaceILspImageProjector
- Returns:
- the projector's up vector
-
setUpVector
Changes the projector's up vector.- Parameters:
aUpVector
- the new up vector- See Also:
-
getFieldOfView
public double getFieldOfView()Description copied from interface:ILspImageProjector
Returns the projector's vertical field of view, in degrees.- Specified by:
getFieldOfView
in interfaceILspImageProjector
- Returns:
- the projector's vertical field of view
-
setFieldOfView
public void setFieldOfView(double aFieldOfView) Changes the projector's vertical field of view angle to the specified value.- Parameters:
aFieldOfView
- the new vertical field of view, in degrees- See Also:
-
getAspectRatio
public double getAspectRatio()Description copied from interface:ILspImageProjector
Returns the projector's aspect ratio. This is the ratio of the projected image's width and height.- Specified by:
getAspectRatio
in interfaceILspImageProjector
- Returns:
- the projector's aspect ratio
-
setAspectRatio
public void setAspectRatio(double aAspectRatio) Changes the projector's aspect ratio to the specified value.- Parameters:
aAspectRatio
- the new aspect ratio- See Also:
-
getRange
public double getRange()Description copied from interface:ILspImageProjector
Returns the projector's distance range. This is the maximum distance from the eye point to which the projector's image should be cast. The projector's image will not be visible beyond this distance.- Specified by:
getRange
in interfaceILspImageProjector
- Returns:
- the projector's distance range
-
setRange
public void setRange(double aRange) Changes the projector's distance range to the specified value.- Parameters:
aRange
- the new distance range- See Also:
-
lookAt
public void lookAt(ILcdPoint aLookAt, double aDistance, double aYaw, double aPitch, double aRoll, ILcdGeoReference aProjectorReference) Computes the projector's eye point, reference point and up vector based on the given parameters. This method is equivalent toTLspViewXYZWorldTransformation3D.lookAt(com.luciad.shape.ILcdPoint, double, double, double, double)
. Using distance, yaw, pitch and roll parameters is often more intuitive than having to compute a reference point and an up vector by hand.- Parameters:
aLookAt
- the point (in world coordinates) at which to put the viewer's reference pointaDistance
- the distance from the reference point at which to put the eye pointaYaw
- the desired yaw angle from the eye point to the reference point (in degrees)aPitch
- the desired pitch angle from the eye point to the reference point (in degrees)aRoll
- the desired roll angle of the viewer around its line-of-sight axis (in degrees)aProjectorReference
- the reference in which the projector is defined
-
lookFrom
public void lookFrom(ILcdPoint aLookFrom, double aDistance, double aYaw, double aPitch, double aRoll, ILcdGeoReference aProjectorReference) Computes the projector's eye point, reference point and up vector based on the given parameters. This method is equivalent toTLspViewXYZWorldTransformation3D.lookFrom(com.luciad.shape.ILcdPoint, double, double, double, double)
Using distance, yaw, pitch and roll parameters is often more intuitive than having to compute a reference point and an up vector by hand.- Parameters:
aLookFrom
- the point (in world coordinates) at which to put the eye pointaDistance
- the distance from the eye point at which to put the viewer's reference pointaYaw
- the desired yaw angle from the eye point to the reference point (in degrees)aPitch
- the desired pitch angle from the eye point to the reference point (in degrees)aRoll
- the desired roll angle of the viewer around its line-of-sight axis (in degrees)aProjectorReference
- the reference in which the projector is defined
-