Class TLspPaintedObjectsTouchQuery

java.lang.Object
com.luciad.view.lightspeed.query.ALspPaintQuery<Collection<ALspTouchInfo>>
com.luciad.view.lightspeed.query.TLspPaintedObjectsTouchQuery

public class TLspPaintedObjectsTouchQuery extends ALspPaintQuery<Collection<ALspTouchInfo>>
Query to retrieve all objects that are painted and touched by a specified view region.

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

The touched(com.luciad.view.lightspeed.layer.ALspWorldTouchInfo) methods may be called multiple times for the same object if it is touched at multiple points. This implementation collects all touched points.

Since:
2012.0
See Also:
  • Constructor Details

    • TLspPaintedObjectsTouchQuery

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

      public TLspPaintedObjectsTouchQuery(TLspPaintRepresentationState aPaintRepresentationState, ILcdBounds aViewBounds, double aSensitivity)
      Creates a new touched objects 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<ALspTouchInfo> getResult()
      Returns the touch infos of all objects that are touched.
      Specified by:
      getResult in class ALspPaintQuery<Collection<ALspTouchInfo>>
      Returns:
      the touch infos, never null.
    • touched

      public boolean touched(ALspWorldTouchInfo aTouchInfo)
      Called for all objects that are touched at a point in world coordinates.

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

      Parameters:
      aTouchInfo - the touch info
      Returns:
      true if the query should continue, false if it should stop
    • touched

      public boolean touched(ALspViewTouchInfo aTouchInfo)
      Called for all objects that are touched at a point in view coordinates.

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

      Parameters:
      aTouchInfo - the touch info
      Returns:
      true if the query should continue, false if it should stop