public class TLcyLOSManager extends Object implements ILcdDisposable
The LOS (line-of-sight) manager allows you to create, remove, and configure LOS coverages on Lightspeed maps in Lucy.
You have access to the TLcyLOSManager
through the Lucy service mechanism. You can request a LOS manager with:
TLcyLOSManager losManager = aLucyEnv.getService(TLcyLOSManager.class);
Because LOS coverages are displayed around point objects, the LOS manager allows you to validate
first if a domain object is suitable for the addition of a LOS coverage.
When you create a LOS coverage, the ensuing LOS computation results in a TLcyLOSDomainObject
. All LOS coverage objects are added to a Line-of-sight layer with its dedicated model.
This layer and model are automatically added to and removed from the view.
To change the properties used for the LOS calculation, you need to get the LOS model with getLOSModel(TLcyLOSDomainObject)
first, and access the LOS properties from there.
See this article for more information about
the use of the TLcyLOSManager
.
Note that all changes to the LOS manager must originate from the Event Dispatch Thread (EDT). You must also take a lock on the LOS model if you want to change the LOS calculation properties.
Modifier and Type | Method and Description |
---|---|
TLcyLOSDomainObject |
addLOSCoverage(TLcdDomainObjectContext aDomainObjectContext)
Adds a LOS coverage for a specific domain object.
|
boolean |
canAddLOSCoverageFor(TLcdDomainObjectContext aContext)
Verify if a domain object context can be used for a LOS coverage.
|
void |
dispose()
Disposes of this object and allows it to release any system resources that it is holding.
|
ILcdModel |
getLOSModel(TLcyLOSDomainObject aLOSDomainObject)
Gets the LOS model for an existing LOS domain object.
|
void |
removeLOSCoverage(TLcdDomainObjectContext aDomainObjectContext)
Remove the LOS coverage for a specific domain object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public ILcdModel getLOSModel(TLcyLOSDomainObject aLOSDomainObject)
aLOSDomainObject
- the LOS domain object to find.public TLcyLOSDomainObject addLOSCoverage(TLcdDomainObjectContext aDomainObjectContext) throws IllegalArgumentException
Adds a LOS coverage for a specific domain object. If there is no LOS layer yet for the given view, it will be created along with its LOS model.
If the domain object context doesn't support LOS Coverages, an IllegalArgumentException gets thrown.
Verify this with canAddLOSCoverageFor(TLcdDomainObjectContext)
.
aDomainObjectContext
- the context with the domain object.IllegalArgumentException
- if the domain object context doesn't support LOS coverages.public void removeLOSCoverage(TLcdDomainObjectContext aDomainObjectContext)
aDomainObjectContext
- the context with the domain object.public void dispose()
ILcdDisposable
Disposes of this object and allows it to release any system resources that it is holding.
The result of calling any other method (other than finalize
) on this object subsequent to a call to
this method is undefined.
dispose
in interface ILcdDisposable
public boolean canAddLOSCoverageFor(TLcdDomainObjectContext aContext)
ILcdPoint
, or a ILcdPointList
containing a single point, are supported.aContext
- the context with the domain object.