// Path: vrlib/src/main/java/com/martin/ads/vrlib/constant/Constants.java
// public class Constants {
//     public static final int FLOAT_SIZE_BYTES = 4;
//     public static final int SHORT_SIZE_BYTES = 2;
//     //Sensor
//     public static final int SENSOR_ACC= Sensor.TYPE_ACCELEROMETER;
//     public static final int SENSOR_MAG=Sensor.TYPE_MAGNETIC_FIELD;
//     public static final int SENSOR_ROT=Sensor.TYPE_ROTATION_VECTOR;
// 
// }


import com.martin.ads.vrlib.constant.Constants;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.nio.ShortBuffer;
package com.martin.ads.vrlib.utils;



/**
 * Created by Ads on 2016/6/25.
 */
public class BufferUtils {

    public static FloatBuffer getFloatBuffer(final float[] array,int offset){
        FloatBuffer bb=ByteBuffer.allocateDirect(
// Path: vrlib/src/main/java/com/martin/ads/vrlib/constant/Constants.java
// public class Constants {
//     public static final int FLOAT_SIZE_BYTES = 4;
//     public static final int SHORT_SIZE_BYTES = 2;
//     //Sensor
//     public static final int SENSOR_ACC= Sensor.TYPE_ACCELEROMETER;
//     public static final int SENSOR_MAG=Sensor.TYPE_MAGNETIC_FIELD;
//     public static final int SENSOR_ROT=Sensor.TYPE_ROTATION_VECTOR;
// 
// }


// Path: vrlib/src/main/java/com/martin/ads/vrlib/utils/BufferUtils.java
import com.martin.ads.vrlib.constant.Constants;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.nio.ShortBuffer;

package com.martin.ads.vrlib.utils;



/**
 * Created by Ads on 2016/6/25.
 */
public class BufferUtils {

    public static FloatBuffer getFloatBuffer(final float[] array,int offset){
        FloatBuffer bb=ByteBuffer.allocateDirect(
                array.length * Constants.FLOAT_SIZE_BYTES)