public abstract class ALcyLspCameraLinker3D extends ALcyCameraLinker
Implementation of ALcyLspCameraLinker
, specifically meant to be used in combination with
3D Lightspeed views.
Constructor and Description |
---|
ALcyLspCameraLinker3D(ILcyLspMapComponent aMapComponent,
Object[] aObjects,
ILcdModel[] aModels)
Create a new 3D camera linker, which is used to create and configure new tracking camera's.
|
Modifier and Type | Method and Description |
---|---|
protected abstract ALspCameraConstraint<TLspViewXYZWorldTransformation3D> |
createCameraConstraint(ALspTrackingPointProvider aTrackingPointProvider,
ILspView aView)
Create a new camera constraint and return it.
|
protected ALspTrackingPointProvider |
createTrackingPointProvider(Object[] aObjectsToTrack,
ILcdModel[] aModelsToTrack,
ILspView aView)
Create a new tracking point provider, based on the given parameters.
|
ILcdModel[] |
getTrackedModels()
Return the models to which the objects, which will be tracked by any camera installed by this linker object,
belong to.
|
Object[] |
getTrackedObjects()
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.
|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
public ALcyLspCameraLinker3D(ILcyLspMapComponent aMapComponent, Object[] aObjects, ILcdModel[] aModels)
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 of aObjects
to which ILcdModel
it belongs.protected void linkTrackingCamera(Object[] aObjectsToTrack, ILcdModel[] aModelsToTrack, ILspView aView)
Create and install a new tracking camera on the given view.
aObjectsToTrack
- The objects the camera should track.aModelsToTrack
- The models of those objects.aView
- The view which contains the currently installed camera.protected void unlinkTrackingCamera(Object[] aObjectsToTrack, ILcdModel[] aModelsToTrack, ILspView aView)
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.protected ALspTrackingPointProvider createTrackingPointProvider(Object[] aObjectsToTrack, ILcdModel[] aModelsToTrack, ILspView aView)
Create a new tracking point provider, based on the given 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.protected abstract ALspCameraConstraint<TLspViewXYZWorldTransformation3D> createCameraConstraint(ALspTrackingPointProvider 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.
aTrackingPointProvider
- The tracking point provider that should be used by the camera constraint.aView
- The view which contains the camera on which the constraint shall be installed later on.public boolean isLinked()
ALcyCameraLinker
isLinked
in class ALcyCameraLinker
protected boolean isValidViewXYZWorldTransformation(ALspViewXYZWorldTransformation aTransformation)
aTransformation
- transfo to checkpublic void setLinked(boolean aLinked)
ALcyCameraLinker
setLinked
in class ALcyCameraLinker
aLinked
- Whether or not to link the camera.public Object[] getTrackedObjects()
public ILcdModel[] getTrackedModels()