Class TLspLookAtTrackingCameraConstraint3D<T extends TLspViewXYZWorldTransformation3D>

java.lang.Object
com.luciad.view.lightspeed.camera.ALspCameraConstraint<T>
com.luciad.view.lightspeed.camera.tracking.TLspLookAtTrackingCameraConstraint3D<T>

public class TLspLookAtTrackingCameraConstraint3D<T extends TLspViewXYZWorldTransformation3D> extends ALspCameraConstraint<T>

Constraint for TLspViewXYZWorldTransformation3D that forces the camera to always look at a target point. The camera is free to move and rotate in space, but its look-at vector is constrained to point to the target point.

By default, this camera doesn't track any objects. To do this setTrackingPointProvider should be called first.

Since:
2012.0
  • Constructor Details

    • TLspLookAtTrackingCameraConstraint3D

      public TLspLookAtTrackingCameraConstraint3D()
      Creates a look-at camera constraint for a given set of objects (whose motion is to be tracked).
  • Method Details

    • getTrackingPointProvider

      public ALspTrackingPointProvider getTrackingPointProvider()
      Returns the used tracking point provider, or null if no tracking point provider is used.
      Returns:
      the used tracking point provider, or null if no tracking point provider is used.
      See Also:
    • setTrackingPointProvider

      public void setTrackingPointProvider(ALspTrackingPointProvider aTrackingPointProvider)
      Sets the tracking point provider.
      Parameters:
      aTrackingPointProvider - a tracking point provider.
      See Also:
    • setMinDistance

      public void setMinDistance(double aMinDistance)
      Sets the minimum distance to be kept by this camera between the eye and reference point. (by default = 1.0 meter)
      Parameters:
      aMinDistance - the min distance allowed between eye and reference point.
    • constrain

      public void constrain(T aSource, T aTargetSFCT)
      Description copied from class: ALspCameraConstraint

      Constrains the given view world transformation. This method can be implemented by modifying aTargetSFCT.

      When the original view world transformation is modified, the changes are first applied on a copy of the transformation (aTargetSFCT). This copy is passed to the constraints, which can also modify it. After all constraints are evaluated, all changes are applied on the original transformation.

      aSource is the original transformation. It is given as context information.

      Specified by:
      constrain in class ALspCameraConstraint<T extends TLspViewXYZWorldTransformation3D>
      Parameters:
      aSource - the original transformation, on which all changes will be applied after all constraints are evaluated. It is given as context information.
      aTargetSFCT - the view transformation copy which contains the modifications. Constraints should be applied on this transformation.