Class ALspTrackingPointProvider
java.lang.Object
com.luciad.view.lightspeed.camera.tracking.ALspTrackingPointProvider
- Direct Known Subclasses:
TLspModelElementTrackingPointProvider
Base class for tracking a series of points for a camera. It can be used by following tracking camera classes:
TLspLookAtTrackingCameraConstraint2D
TLspLookAtTrackingCameraConstraint3D
TLspLookFromTrackingCameraConstraint3D
This class can be extended by implementing getTargetPoint
. For
tracking cameras that take orientation into account, the getTargetYaw
,
getTargetPitch
and getTargetRoll
methods
can be implemented.
When the target point (or rotations) change, a ILcdChangeListener
can be used to notify this to registered listeners.
- Since:
- 2012.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTrackingPointChangeListener
(ILcdChangeListener aListener) Adds a tracking point change listener.protected void
This method can be used to notify the registered listeners of tracking point (or orientation) changes.abstract double
Provides the pitch angle (in degrees) to be used for orienting the camera, orDouble.Nan
if no pitch could be calculated.abstract ILcdPoint
Selects a target point that is to be followed by the camera, in world coordinates.abstract double
Provides the roll angle (in degrees) to be used for orienting the camera, orDouble.NaN
if no roll could be calculated.abstract double
Provides the world rotation (yaw) angle (in degrees) to be used for orienting the camera.abstract ILspView
getView()
Returns the view in which tracking is done.void
Removes the given tracking point change listener.
-
Constructor Details
-
ALspTrackingPointProvider
public ALspTrackingPointProvider()
-
-
Method Details
-
addTrackingPointChangeListener
Adds a tracking point change listener.- Parameters:
aListener
- a tracking point change listener.- See Also:
-
removeTrackingPointChangeListener
Removes the given tracking point change listener.- Parameters:
aListener
- a tracking point change listener.- See Also:
-
fireTrackingPointChange
protected void fireTrackingPointChange()This method can be used to notify the registered listeners of tracking point (or orientation) changes.- See Also:
-
getView
Returns the view in which tracking is done.- Returns:
- the view in which tracking is done.
-
getTargetPoint
Selects a target point that is to be followed by the camera, in world coordinates. By implementing this method, users of this class can easily customize the selected target point.- Returns:
- the selected target point, in world coordinates, or
null
if none was found.
-
getTargetYaw
public abstract double getTargetYaw()Provides the world rotation (yaw) angle (in degrees) to be used for orienting the camera. If no orientation can be calculated,Double.NaN
should be returned. This method can be used for 2D as well as 3D cameras.- Returns:
- the world rotation (yaw) angle (in degrees) to be used for orienting the camera or
Double.NaN
if no orientation could be calculated.
-
getTargetPitch
public abstract double getTargetPitch()Provides the pitch angle (in degrees) to be used for orienting the camera, orDouble.Nan
if no pitch could be calculated. This method should only be used for 3D cameras.- Returns:
- the pitch angle (in degrees) to be used for orienting the camera.
-
getTargetRoll
public abstract double getTargetRoll()Provides the roll angle (in degrees) to be used for orienting the camera, orDouble.NaN
if no roll could be calculated. This method should only be used for 3D camera.- Returns:
- the roll angle (in degrees) to be used for orienting the camera.
-