Package com.luciad.tea.viewshed
Class TLcdAverageVisibilityComposite
java.lang.Object
com.luciad.tea.viewshed.TLcdAverageVisibilityComposite
- All Implemented Interfaces:
ILcdVisibilityComposite
This ILcdVisibilityComposite
will output an average of all the provided
viewshed visibilities.
For instance, if an instance of TLcdAverageVisibilityComposite
would obtain visibilities 0.0, 0.0 and 1.0 respectively, then the result of this composite would
be (1.0/3.0).
A possible use case for this composite implementation is the combination of multiple observers for the same 3D scene. The values can be interpreted as gradations of visibility as a function of visibility to amount of observers. For the above example of three observers this would mean that that the returned visibility times 3 can be interpreted the amount of observers the point is visible to. (1.0/3.0) means the point is visible to only one of three observers.
- Since:
- 11.0
-
Constructor Summary
ConstructorDescriptionTLcdAverageVisibilityComposite
(int aNbViewsheds) Creates a new instance ofTLcdAverageVisibilityComposite
-
Method Summary
Modifier and TypeMethodDescriptiondouble
compose
(double aPreviousVisibility, double aCurrentVisibility) Performs one compositing step by combining the previously accumulated visibility value with a new value.double
Returns the visibility value with which the compositing should be initialized.boolean
stop
(double aVisibility) Checks whether additional compositing steps are useful.
-
Constructor Details
-
TLcdAverageVisibilityComposite
public TLcdAverageVisibilityComposite(int aNbViewsheds) Creates a new instance ofTLcdAverageVisibilityComposite
- Parameters:
aNbViewsheds
- The number of viewsheds for which the average is computed
-
-
Method Details
-
initialVisibility
public double initialVisibility()Description copied from interface:ILcdVisibilityComposite
Returns the visibility value with which the compositing should be initialized.- Specified by:
initialVisibility
in interfaceILcdVisibilityComposite
- Returns:
- the visibility value with which the compositing should be initialized.
-
compose
public double compose(double aPreviousVisibility, double aCurrentVisibility) Description copied from interface:ILcdVisibilityComposite
Performs one compositing step by combining the previously accumulated visibility value with a new value.- Specified by:
compose
in interfaceILcdVisibilityComposite
- Parameters:
aPreviousVisibility
- the previously accumulated visibility valueaCurrentVisibility
- new visibility value- Returns:
- the new composited visibility value
-
stop
public boolean stop(double aVisibility) Description copied from interface:ILcdVisibilityComposite
Checks whether additional compositing steps are useful.- Specified by:
stop
in interfaceILcdVisibilityComposite
- Parameters:
aVisibility
- the accumulated visibility value so far.- Returns:
- whether compositing should be terminated
-