Package org.robovm.apple.uikit

Examples of org.robovm.apple.uikit.UIAcceleration


    if(config.useAccelerometer) {
      accelerometerDelegate = new UIAccelerometerDelegateAdapter() {

        @Method(selector = "accelerometer:didAccelerate:")
        public void didAccelerate (UIAccelerometer accelerometer, @Pointer long valuesPtr) {
          UIAcceleration values = UI_ACCELERATION_WRAPPER.wrap(valuesPtr);
          float x = (float)values.getX() * 10;
          float y = (float)values.getY() * 10;
          float z = (float)values.getZ() * 10;

          acceleration[0] = -x;
          acceleration[1] = -y;
          acceleration[2] = -z;
        }
View Full Code Here


    if(config.useAccelerometer) {
      accelerometerDelegate = new UIAccelerometerDelegateAdapter() {

        @Method(selector = "accelerometer:didAccelerate:")
        public void didAccelerate (UIAccelerometer accelerometer, @Pointer long valuesPtr) {
          UIAcceleration values = UI_ACCELERATION_WRAPPER.wrap(valuesPtr);
          float x = (float)values.getX() * 10;
          float y = (float)values.getY() * 10;
          float z = (float)values.getZ() * 10;

          acceleration[0] = -x;
          acceleration[1] = -y;
          acceleration[2] = -z;
        }
View Full Code Here

    if(config.useAccelerometer) {
      accelerometerDelegate = new UIAccelerometerDelegateAdapter() {

        @Method(selector = "accelerometer:didAccelerate:")
        public void didAccelerate (UIAccelerometer accelerometer, @Pointer long valuesPtr) {
          UIAcceleration values = UI_ACCELERATION_WRAPPER.wrap(valuesPtr);
          float x = (float)values.getX() * 10;
          float y = (float)values.getY() * 10;
          float z = (float)values.getZ() * 10;

          acceleration[0] = -x;
          acceleration[1] = -y;
          acceleration[2] = -z;
        }
View Full Code Here

TOP

Related Classes of org.robovm.apple.uikit.UIAcceleration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.