Class ALcyLspCameraLinker2D
java.lang.Object
com.luciad.lucy.map.cameralinking.ALcyCameraLinker
com.luciad.lucy.map.cameralinking.lightspeed.ALcyLspCameraLinker2D
- All Implemented Interfaces:
ILcdPropertyChangeSource
Implementation of ALcyLspCameraLinker
, specifically meant to be used in combination with
2D Lightspeed views.
- Since:
- 2012.0
-
Constructor Summary
ConstructorDescriptionALcyLspCameraLinker2D
(ILcyLspMapComponent aMapComponent, Object[] aObjects, ILcdModel[] aModels) Create a new 2D camera linker, which is used to create and configure new tracking camera's. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ALspCameraConstraint
<TLspViewXYZWorldTransformation2D> createCameraConstraint
(TLspModelElementTrackingPointProvider aTrackingPointProvider, ILspView aView) Create a new camera constraint and return it.protected TLspModelElementTrackingPointProvider
createTrackingPointProvider
(Object[] aObjectsToTrack, ILcdModel[] aModelsToTrack, ILspView aView) Create a new tracking point provider, based on the given parameters.Return the models to which the objects, which will be tracked by any camera installed by this linker object, belong to.Object[]
Return the objects which will be tracked by any camera installed by this linker object.boolean
isLinked()
Check if the camera is linked.protected boolean
isValidViewXYZWorldTransformation
(ALspViewXYZWorldTransformation aTransformation) Determines if the linker is still valid for the given transformation.protected void
linkTrackingCamera
(Object[] aObjectsToTrack, ILcdModel[] aModelsToTrack, ILspView aView) Create and install a new tracking camera on the given view.void
setLinked
(boolean aLinked) Link or unlink the camera.protected void
unlinkTrackingCamera
(Object[] aObjectsToTrack, ILcdModel[] aModelsToTrack, ILspView aView) Remove the currently installed tracking camera from the given view.Methods inherited from class com.luciad.lucy.map.cameralinking.ALcyCameraLinker
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
ALcyLspCameraLinker2D
public ALcyLspCameraLinker2D(ILcyLspMapComponent aMapComponent, Object[] aObjects, ILcdModel[] aModels) Create a new 2D camera linker, which is used to create and configure new tracking camera's.- Parameters:
aMapComponent
- The map component on which this linker will install tracking cameras.aObjects
- The set of object that should be tracked by this camera linker.aModels
- A set of models, denoting for each object ofaObjects
to whichILcdModel
it belongs.
-
-
Method Details
-
linkTrackingCamera
protected void linkTrackingCamera(Object[] aObjectsToTrack, ILcdModel[] aModelsToTrack, ILspView aView) Create and install a new tracking camera on the given view.
- Parameters:
aObjectsToTrack
- The objects the camera should track.aModelsToTrack
- The models of those objects.aView
- The view which contains the currently installed camera.
-
unlinkTrackingCamera
protected void unlinkTrackingCamera(Object[] aObjectsToTrack, ILcdModel[] aModelsToTrack, ILspView aView) Remove the currently installed tracking camera from the given view.- Parameters:
aObjectsToTrack
- The set of objects currently tracked by the tracking camera.aModelsToTrack
- The models of those objectsaView
- The view on which the tracking camera is installed.
-
createTrackingPointProvider
protected TLspModelElementTrackingPointProvider createTrackingPointProvider(Object[] aObjectsToTrack, ILcdModel[] aModelsToTrack, ILspView aView) Create a new tracking point provider, based on the given parameters.
- Parameters:
aObjectsToTrack
- The objects which the tracking point provider should track.aModelsToTrack
- The models of the objects which the tracking point provider should track.aView
- The view which will be tracked using the tracking point provider returned by this method.- Returns:
- A new tracking point provider
-
createCameraConstraint
protected abstract ALspCameraConstraint<TLspViewXYZWorldTransformation2D> createCameraConstraint(TLspModelElementTrackingPointProvider aTrackingPointProvider, ILspView aView) Create a new camera constraint and return it. The constraint can be created based on the given parameters.
Note that the constraint should not yet be installed on the given camera. Adding and eventually removing this constraint will be done afterwards.
By default this method is called by
linkTrackingCamera(Object[], ILcdModel[], ILspView)
, after a matching tracking point provider has been created.- Parameters:
aTrackingPointProvider
- The model element tracking point provider that should be used by the camera constraint.aView
- The view which contains the currently installed, untracked camera.- Returns:
- The camera constraint which has been placed on the view's camera.
-
isLinked
public boolean isLinked()Description copied from class:ALcyCameraLinker
Check if the camera is linked.- Specified by:
isLinked
in classALcyCameraLinker
- Returns:
- Whether or not the camera is linked.
-
isValidViewXYZWorldTransformation
Determines if the linker is still valid for the given transformation. If not, the linker is unlinked- Parameters:
aTransformation
- transfo to check- Returns:
- false if the linker should be unlinked
-
setLinked
public void setLinked(boolean aLinked) Description copied from class:ALcyCameraLinker
Link or unlink the camera.- Specified by:
setLinked
in classALcyCameraLinker
- Parameters:
aLinked
- Whether or not to link the camera.
-
getTrackedObjects
Return the objects which will be tracked by any camera installed by this linker object.- Returns:
- The objects which will be tracked by any camera installed by this linker object.
-
getTrackedModels
Return the models to which the objects, which will be tracked by any camera installed by this linker object, belong to.- Returns:
- The models to which the objects, which will be tracked by any camera installed by this linker object, belong to.
-