public class TLcdBoundedCompositeViewshed extends ALcdCompositeViewshed
A bounded object viewshed is a composite viewshed optimized for bounded objects.
Adding
new viewsheds to this viewshed can be done using the addBoundedObject(com.luciad.shape.ILcdBounded,
com.luciad.transformation.ILcdModelModelTransformation, ILcdViewshed)
method. The result of a
getVisibility(com.luciad.shape.ILcdPoint)
query will be the result of visibility queries
for all added viewsheds through the ILcdVisibilityComposite
visibility composite set by the
ALcdCompositeViewshed.setComposite(com.luciad.tea.viewshed.ILcdVisibilityComposite)
method.
To this respect, this
viewshed should be used to composite viewsheds that represent separate objects, such as
buildings. In this case, each building should be added individually, and the TLcdBoundedCompositeViewshed
would represent the viewshed for a collection
of buildings for the given ALcdViewshedObserver
Note: It is important that all added viewsheds be defined in the same reference and for the same observer in order for this viewshed to generate meaningful results.
Performance considerations: Using the addAllObjects(TLcdBoundedCompositeViewshed)
can
be greatly beneficial to performance. It is generally recommended to use a single bounded object viewshed
per observer to achieve maximum performance.
Constructor and Description |
---|
TLcdBoundedCompositeViewshed(ILcdGeoReference aViewshedReference,
ALcdViewshedObserver aViewshedObserver)
Creates a new
TLcdBoundedCompositeViewshed , given an ALcdViewshedObserver . |
Modifier and Type | Method and Description |
---|---|
void |
addAllObjects(TLcdBoundedCompositeViewshed aViewshed)
Adds all the bounded objects from the given bounded object viewshed to this bounded object viewshed,
effectively merging the two.
|
void |
addBoundedObject(ILcdBounded aBoundedObject,
ILcdModelModelTransformation aTransformation,
ILcdViewshed aViewshed)
Adds a bounded object to this viewshed.
|
ILcdGeoReference |
getReference()
Returns the reference in which this viewshed is defined.
|
ALcdViewshedObserver |
getViewshedObserver()
Returns the viewshed observer for this
TLcdBoundedCompositeViewshed . |
double |
getVisibility(ILcdPoint aPoint)
Returns the visibility of a given point.
|
getComposite, setComposite
public TLcdBoundedCompositeViewshed(ILcdGeoReference aViewshedReference, ALcdViewshedObserver aViewshedObserver)
TLcdBoundedCompositeViewshed
, given an ALcdViewshedObserver
.aViewshedReference
- The reference in which this viewshed is defined. Must be a cartesian reference.aViewshedObserver
- The viewshed observer for this viewshed.public ALcdViewshedObserver getViewshedObserver()
TLcdBoundedCompositeViewshed
.public void addAllObjects(TLcdBoundedCompositeViewshed aViewshed)
ALcdViewshedObserver
must be equal in order for this method to work.aViewshed
- A viewshed with bounded objects that should be added to this bounded object viewshed.
The given viewshed must be defined for the same observer as this viewshed.public void addBoundedObject(ILcdBounded aBoundedObject, ILcdModelModelTransformation aTransformation, ILcdViewshed aViewshed)
Adds a bounded object to this viewshed. The bounded object must be accompanied by a viewshed.
Note: It is important that all viewsheds are defined in the same reference and for the same
viewshed observer, namely the one returned by getViewshedObserver()
for this class
to generate meaningful results.
aBoundedObject
- The bounded object that is the cause for the viewshed, defined
in the source reference of aTransformation
.aTransformation
- A transformation that can transform the bounded object to the
reference of the this viewshed. The destination of this
transformation must be the same for all added viewsheds.aViewshed
- The viewshed that is the result of the bounded object, given in
the destination reference of aTransformation
and generated
for the viewshed observer in getViewshedObserver()
.public double getVisibility(ILcdPoint aPoint)
ILcdViewshed
aPoint
- The point to check visibility of. The point must be given in the reference
in which the viewshed is defined.public ILcdGeoReference getReference()
ILcdViewshed