Class TLspPaintedObjectsBoundsQuery

java.lang.Object
com.luciad.view.lightspeed.query.ALspPaintQuery<Collection<ALspBoundsInfo>>
com.luciad.view.lightspeed.query.TLspPaintedObjectsBoundsQuery

public class TLspPaintedObjectsBoundsQuery extends ALspPaintQuery<Collection<ALspBoundsInfo>>
Query to retrieve the bounds of all objects that are painted and overlap with a specified view region.

This query only takes the objects that are currently painted into account.

The bounds(com.luciad.view.lightspeed.layer.ALspWorldBoundsInfo) methods may be called multiple times for the same object if it has multiple bounds. This implementation collects all bounds.

Since:
2012.0
See Also:
  • Constructor Details

    • TLspPaintedObjectsBoundsQuery

      public TLspPaintedObjectsBoundsQuery(TLspPaintRepresentationState aPaintRepresentationState, ILcdPoint aViewPoint, double aSensitivity)
      Creates a new objects bounds query.
      Parameters:
      aPaintRepresentationState - the paint representation state
      aViewPoint - the view point
      aSensitivity - the sensitivity
    • TLspPaintedObjectsBoundsQuery

      public TLspPaintedObjectsBoundsQuery(TLspPaintRepresentationState aPaintRepresentationState, ILcdBounds aViewBounds, double aSensitivity)
      Creates a new objects bounds query.
      Parameters:
      aPaintRepresentationState - the paint representation state
      aViewBounds - the view bounds or null if unrestricted
      aSensitivity - the sensitivity
  • Method Details

    • getPaintRepresentationState

      public TLspPaintRepresentationState getPaintRepresentationState()
      Returns the paint representation state that should be queried.
      Returns:
      the paint representation state
    • getViewBounds

      public ILcdBounds getViewBounds()
      Returns the view bounds that should be queried or null if unrestricted.
      Returns:
      the view bounds or null
    • getSensitivity

      public double getSensitivity()
      Returns the sensitivity in pixels.
      Returns:
      the sensitivity
    • getResult

      public Collection<ALspBoundsInfo> getResult()
      Returns the bounds infos of all objects.
      Specified by:
      getResult in class ALspPaintQuery<Collection<ALspBoundsInfo>>
      Returns:
      the bounds infos, never null.
    • bounds

      public boolean bounds(ALspWorldBoundsInfo aBoundsInfo)
      Called for all objects with world bounds.

      Note that the aBoundsInfo may change after this method call returns. The implementation can create a ALspBoundsInfo.clone() if it still needs it after the method call returns.

      Parameters:
      aBoundsInfo - the bounds info
      Returns:
      true if the query should continue, false if it should stop
    • bounds

      public boolean bounds(ALspViewBoundsInfo aBoundsInfo)
      Called for all objects with view bounds.

      Note that the aBoundsInfo may change after this method call returns. The implementation can create a ALspBoundsInfo.clone() if it still needs it after the method call returns.

      Parameters:
      aBoundsInfo - the bounds info
      Returns:
      true if the query should continue, false if it should stop