Package com.luciad.view.lightspeed.query
Class TLspPaintedObjectsTouchQuery
java.lang.Object
com.luciad.view.lightspeed.query.ALspPaintQuery<Collection<ALspTouchInfo>>
com.luciad.view.lightspeed.query.TLspPaintedObjectsTouchQuery
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 Summary
ConstructorDescriptionTLspPaintedObjectsTouchQuery
(TLspPaintRepresentationState aPaintRepresentationState, ILcdBounds aViewBounds, double aSensitivity) Creates a new touched objects query.TLspPaintedObjectsTouchQuery
(TLspPaintRepresentationState aPaintRepresentationState, ILcdPoint aViewPoint, double aSensitivity) Creates a new touched objects query. -
Method Summary
Modifier and TypeMethodDescriptionReturns the paint representation state that should be queried.Returns the touch infos of all objects that are touched.double
Returns the sensitivity in pixels.Returns the view bounds that should be queried ornull
if unrestricted.boolean
touched
(ALspViewTouchInfo aTouchInfo) Called for all objects that are touched at a point in view coordinates.boolean
touched
(ALspWorldTouchInfo aTouchInfo) Called for all objects that are touched at a point in world coordinates.
-
Constructor Details
-
TLspPaintedObjectsTouchQuery
public TLspPaintedObjectsTouchQuery(TLspPaintRepresentationState aPaintRepresentationState, ILcdPoint aViewPoint, double aSensitivity) Creates a new touched objects query.- Parameters:
aPaintRepresentationState
- the paint representation stateaViewPoint
- the view pointaSensitivity
- the sensitivity
-
TLspPaintedObjectsTouchQuery
public TLspPaintedObjectsTouchQuery(TLspPaintRepresentationState aPaintRepresentationState, ILcdBounds aViewBounds, double aSensitivity) Creates a new touched objects query.- Parameters:
aPaintRepresentationState
- the paint representation stateaViewBounds
- the view bounds ornull
if unrestrictedaSensitivity
- the sensitivity
-
-
Method Details
-
getPaintRepresentationState
Returns the paint representation state that should be queried.- Returns:
- the paint representation state
-
getViewBounds
Returns the view bounds that should be queried ornull
if unrestricted.- Returns:
- the view bounds or
null
-
getSensitivity
public double getSensitivity()Returns the sensitivity in pixels.- Returns:
- the sensitivity
-
getResult
Returns the touch infos of all objects that are touched.- Specified by:
getResult
in classALspPaintQuery<Collection<ALspTouchInfo>>
- Returns:
- the touch infos, never
null
.
-
touched
Called for all objects that are touched at a point in world coordinates. Note that theaTouchInfo
may change after this method call returns. The implementation can create aALspTouchInfo.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
Called for all objects that are touched at a point in view coordinates. Note that theaTouchInfo
may change after this method call returns. The implementation can create aALspTouchInfo.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
-