Class TLspLookFromTrackingCameraConstraint3D<T extends TLspViewXYZWorldTransformation3D>
Constraint for TLspViewXYZWorldTransformation3D
that forces the camera to always look from a target point.
It provides two modes, based on the value of the flag followOrientation
.
If the flag is set to true
, the camera's orientation is adapted based on the
tracked point(s) orientation. If set to false
, the camera's orientation is
controlled by the user (through the rotation controller).
By default, this camera constraint doesn't track any objects. To do this
setTrackingPointProvider
should be called first.
- Since:
- 2012.0
-
Constructor Summary
ConstructorDescriptionTLspLookFromTrackingCameraConstraint3D
(boolean aFollowOrientation) Creates a look-from camera constraint for a given set of objects (whose motion is to be tracked). -
Method Summary
Modifier and TypeMethodDescriptionvoid
Constrains the given view world transformation.Returns the used tracking point provider, ornull
if no tracking point provider is used.void
setTrackingPointProvider
(ALspTrackingPointProvider aTrackingPointProvider) Sets the tracking point provider.Methods inherited from class com.luciad.view.lightspeed.camera.ALspCameraConstraint
addConstraintChangeListener, fireConstraintChangeEvent, removeConstraintChangeListener
-
Constructor Details
-
TLspLookFromTrackingCameraConstraint3D
public TLspLookFromTrackingCameraConstraint3D(boolean aFollowOrientation) Creates a look-from camera constraint for a given set of objects (whose motion is to be tracked).- Parameters:
aFollowOrientation
- whether or not to follow the orientation changes of the tracked objects. Iftrue
, the camera follows both translations and rotations of the object, so that it is fully in the reference frame of the object. Iffalse
, only translations of the object are followed, rotations of it are ignored.
-
-
Method Details
-
getTrackingPointProvider
Returns the used tracking point provider, ornull
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
Sets the tracking point provider.- Parameters:
aTrackingPointProvider
- a tracking point provider.- See Also:
-
constrain
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 classALspCameraConstraint<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.
-