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:
TLspLookAtTrackingCameraConstraint2DTLspLookAtTrackingCameraConstraint3DTLspLookFromTrackingCameraConstraint3D
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTrackingPointChangeListener(ILcdChangeListener aListener) Adds a tracking point change listener.protected voidThis method can be used to notify the registered listeners of tracking point (or orientation) changes.abstract doubleProvides the pitch angle (in degrees) to be used for orienting the camera, orDouble.Nanif no pitch could be calculated.abstract ILcdPointSelects a target point that is to be followed by the camera, in world coordinates.abstract doubleProvides the roll angle (in degrees) to be used for orienting the camera, orDouble.NaNif no roll could be calculated.abstract doubleProvides the world rotation (yaw) angle (in degrees) to be used for orienting the camera.abstract ILspViewgetView()Returns the view in which tracking is done.voidRemoves 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
nullif 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.NaNshould 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.NaNif no orientation could be calculated.
-
getTargetPitch
public abstract double getTargetPitch()Provides the pitch angle (in degrees) to be used for orienting the camera, orDouble.Nanif 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.NaNif 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.
-