Class ALspCameraConstraint<T extends ALspViewXYZWorldTransformation>

java.lang.Object
com.luciad.view.lightspeed.camera.ALspCameraConstraint<T>
Direct Known Subclasses:
TLspAboveTerrainCameraConstraint3D, TLspLookAtTrackingCameraConstraint2D, TLspLookAtTrackingCameraConstraint3D, TLspLookFromTrackingCameraConstraint3D

public abstract class ALspCameraConstraint<T extends ALspViewXYZWorldTransformation> extends Object

Constraint for a view world transformation. This abstract class makes it possible to constrain the transformation before it is applied. An example could be a constraint which limits the scale, or which keeps the camera above the terrain.

This abstract class can be implemented by overriding constrain. fireConstraintChangeEvent can be called to notify that this constraint has changed, and that the constrain method should be evaluated again.

Since:
2012.0
  • Constructor Details

    • ALspCameraConstraint

      public ALspCameraConstraint()
  • Method Details

    • addConstraintChangeListener

      public void addConstraintChangeListener(ILcdChangeListener aListener)
      Adds the given ConstraintChangeListener.
      Parameters:
      aListener - a listener.
    • removeConstraintChangeListener

      public void removeConstraintChangeListener(ILcdChangeListener aListener)
      Removes the given ConstraintChangeListener.
      Parameters:
      aListener - a listener.
    • fireConstraintChangeEvent

      protected void fireConstraintChangeEvent()
      Fires a constraint change to all listeners registered using addConstraintChangeListener. This method can be used to notify that the constrain method should be evaluated again.
    • constrain

      public abstract void constrain(T aSource, T aTargetSFCT)

      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.

      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.