|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface MultiTouchController.MultiTouchObjectCanvas<T>
Method Summary | |
---|---|
T |
getDraggableObjectAtPoint(MultiTouchController.PointInfo touchPoint)
See if there is a draggable object at the current point. |
void |
getPositionAndScale(T obj,
MultiTouchController.PositionAndScale objPosAndScaleOut)
Get the screen coords of the dragged object's origin, and scale multiplier to convert screen coords to obj coords. |
void |
selectObject(T obj,
MultiTouchController.PointInfo touchPoint)
Select an object at the given point. |
boolean |
setPositionAndScale(T obj,
MultiTouchController.PositionAndScale newObjPosAndScale,
MultiTouchController.PointInfo touchPoint)
Callback to update the position and scale (in object coords) of the currently-dragged object. |
Method Detail |
---|
T getDraggableObjectAtPoint(MultiTouchController.PointInfo touchPoint)
touchPoint
- The point being tested (in object coordinates). Return the topmost object under this point, or if dragging/stretching the whole
canvas, just return a reference to the canvas.
void getPositionAndScale(T obj, MultiTouchController.PositionAndScale objPosAndScaleOut)
obj
- The object being dragged/stretched.objPosAndScaleOut
- Output parameter: You need to call objPosAndScaleOut.set() to record the current position and scale of obj.boolean setPositionAndScale(T obj, MultiTouchController.PositionAndScale newObjPosAndScale, MultiTouchController.PointInfo touchPoint)
obj
- The object being dragged/stretched.newObjPosAndScale
- The new position and scale of the object, in object coordinates. Use this to move/resize the object before returning.touchPoint
- Info about the current touch point, including multitouch information and utilities to calculate and cache multitouch pinch
diameter etc. (Note: touchPoint is volatile, if you want to keep any fields of touchPoint, you must copy them before the method
body exits.)
void selectObject(T obj, MultiTouchController.PointInfo touchPoint)
obj
- The object being selected by single-touch, or null on touch-up.touchPoint
- The current touch point.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |