public abstract class ALspTrackingPointProvider extends Object
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.
Constructor and Description |
---|
ALspTrackingPointProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addTrackingPointChangeListener(ILcdChangeListener aListener)
Adds a tracking point change listener.
|
protected void |
fireTrackingPointChange()
This method can be used to notify the registered listeners of tracking point (or orientation)
changes.
|
abstract double |
getTargetPitch()
Provides the pitch angle (in degrees) to be used for orienting the camera, or
Double.Nan if no pitch could be calculated. |
abstract ILcdPoint |
getTargetPoint()
Selects a target point that is to be followed by the camera, in world coordinates.
|
abstract double |
getTargetRoll()
Provides the roll angle (in degrees) to be used for orienting the camera, or
Double.NaN if no roll could be calculated. |
abstract double |
getTargetYaw()
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 |
removeTrackingPointChangeListener(ILcdChangeListener aListener)
Removes the given tracking point change listener.
|
public void addTrackingPointChangeListener(ILcdChangeListener aListener)
aListener
- a tracking point change listener.fireTrackingPointChange()
public void removeTrackingPointChangeListener(ILcdChangeListener aListener)
aListener
- a tracking point change listener.fireTrackingPointChange()
protected void fireTrackingPointChange()
public abstract ILspView getView()
public abstract ILcdPoint getTargetPoint()
null
if none was found.public abstract double getTargetYaw()
Double.NaN
should be returned. This method
can be used for 2D as well as 3D cameras.Double.NaN
if no orientation could be calculated.public abstract double getTargetPitch()
Double.Nan
if no pitch could be calculated. This method should only
be used for 3D cameras.public abstract double getTargetRoll()
Double.NaN
if no roll could be calculated. This method should only
be used for 3D camera.