org.metalev.multitouch.controller
Class MultiTouchController.PositionAndScale

java.lang.Object
  extended by org.metalev.multitouch.controller.MultiTouchController.PositionAndScale
Enclosing class:
MultiTouchController<T>

public static class MultiTouchController.PositionAndScale
extends Object

A class that is used to store scroll offsets and scale information for objects that are managed by the multitouch controller


Constructor Summary
MultiTouchController.PositionAndScale()
           
 
Method Summary
 float getAngle()
           
 float getScale()
           
 float getScaleX()
          Included in case you want to support anisotropic scaling
 float getScaleY()
          Included in case you want to support anisotropic scaling
 float getXOff()
           
 float getYOff()
           
 void set(float xOff, float yOff, boolean updateScale, float scale, boolean updateScaleXY, float scaleX, float scaleY, boolean updateAngle, float angle)
          Set position and optionally scale, anisotropic scale, and/or angle.
protected  void set(float xOff, float yOff, float scale, float scaleX, float scaleY, float angle)
          Set position and optionally scale, anisotropic scale, and/or angle, without changing the "update" flags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiTouchController.PositionAndScale

public MultiTouchController.PositionAndScale()
Method Detail

set

public void set(float xOff,
                float yOff,
                boolean updateScale,
                float scale,
                boolean updateScaleXY,
                float scaleX,
                float scaleY,
                boolean updateAngle,
                float angle)
Set position and optionally scale, anisotropic scale, and/or angle. Where if the corresponding "update" flag is set to false, the field's value will not be changed during a pinch operation. If the value is not being updated *and* the value is not used by the client application, then the value can just be zero. However if the value is not being updated but the value *is* being used by the client application, the value should still be specified and the update flag should be false (e.g. angle of the object being dragged should still be specified even if the program is in "resize" mode rather than "rotate" mode).


set

protected void set(float xOff,
                   float yOff,
                   float scale,
                   float scaleX,
                   float scaleY,
                   float angle)
Set position and optionally scale, anisotropic scale, and/or angle, without changing the "update" flags.


getXOff

public float getXOff()

getYOff

public float getYOff()

getScale

public float getScale()

getScaleX

public float getScaleX()
Included in case you want to support anisotropic scaling


getScaleY

public float getScaleY()
Included in case you want to support anisotropic scaling


getAngle

public float getAngle()


Copyright © 2012. All Rights Reserved.