Class TLspLookAtTrackingCameraConstraint2D<T extends TLspViewXYZWorldTransformation2D>
Constraint for TLspViewXYZWorldTransformation2D that forces it to follow a target
object. If the object is oriented, there is the option to follow the orientation as well.
By default, this constraint doesn't track any objects. To do this setTrackingPointProvider should be called
first.
- Since:
- 2012.0
-
Constructor Summary
ConstructorsConstructorDescriptionTLspLookAtTrackingCameraConstraint2D(boolean aFollowOrientation) Creates a look-at camera constraint for a given set of objects (whose motion is to be tracked). -
Method Summary
Modifier and TypeMethodDescriptionvoidConstrains the given view world transformation.Returns the used tracking point provider, ornullif no tracking point provider is used.voidsetTrackingPointProvider(ALspTrackingPointProvider aTrackingPointProvider) Sets the tracking point provider.Methods inherited from class com.luciad.view.lightspeed.camera.ALspCameraConstraint
addConstraintChangeListener, fireConstraintChangeEvent, removeConstraintChangeListener
-
Constructor Details
-
TLspLookAtTrackingCameraConstraint2D
public TLspLookAtTrackingCameraConstraint2D(boolean aFollowOrientation) Creates a look-at camera constraint for a given set of objects (whose motion is to be tracked).- Parameters:
aFollowOrientation- indicates whether the rotation of the view should take the orientation of the tracked objects into account.
-
-
Method Details
-
constrain
Description copied from class:ALspCameraConstraintConstrains 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.aSourceis the original transformation. It is given as context information.- Specified by:
constrainin classALspCameraConstraint<T extends TLspViewXYZWorldTransformation2D>- 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.
-
getTrackingPointProvider
Returns the used tracking point provider, ornullif no tracking point provider is used.- Returns:
- the used tracking point provider, or
nullif no tracking point provider is used. - See Also:
-
setTrackingPointProvider
Sets the tracking point provider.- Parameters:
aTrackingPointProvider- a tracking point provider.- See Also:
-