Class TLspImageProjector

java.lang.Object
com.luciad.view.lightspeed.layer.imageprojection.TLspImageProjector
All Implemented Interfaces:
ILspImageProjector

public class TLspImageProjector extends Object implements 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 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 point
      aReferencePoint - the initial reference point
      aUpVector - the initial up vector
      aFieldOfView - the initial field of view
      aAspectRatio - the initial aspect ration
      aRange - the initial distance range
  • Method Details

    • getEyePoint

      public ILcdPoint 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 interface ILspImageProjector
      Returns:
      the projector's eye point
    • setEyePoint

      public void setEyePoint(ILcdPoint aEyePoint)
      Moves the projector's eye point to the specified location.
      Parameters:
      aEyePoint - the new eye point
      See Also:
    • getReferencePoint

      public ILcdPoint 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 interface ILspImageProjector
      Returns:
      the projector's reference point
    • setReferencePoint

      public void setReferencePoint(ILcdPoint aReferencePoint)
      Moves the projector's reference point to the specified location.
      Parameters:
      aReferencePoint - the new reference point
      See Also:
    • getUpVector

      public ILcdPoint 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 interface ILspImageProjector
      Returns:
      the projector's up vector
    • setUpVector

      public void setUpVector(ILcdPoint aUpVector)
      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 interface ILspImageProjector
      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 interface ILspImageProjector
      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 interface ILspImageProjector
      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 to TLspViewXYZWorldTransformation3D.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 point
      aDistance - the distance from the reference point at which to put the eye point
      aYaw - 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 to TLspViewXYZWorldTransformation3D.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 point
      aDistance - the distance from the eye point at which to put the viewer's reference point
      aYaw - 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