Code example for Matrix4f

Methods: loadIdentity

0
    private final float[] mRotationMatrix = new float[16];
 
    private static final int INVALID_POINTER_ID = -1;
    private int mActivePointerId = INVALID_POINTER_ID;
    private boolean mUseSensor = false;
    private Matrix4f mIdentityMatrix = new Matrix4f();
 
    public SimpleModelView(Context context) {
        super(context);
        ensureRenderScript(); 
        mScaleDetector = new ScaleGestureDetector(context, new ScaleListener());
        // Get an instance of the SensorManager 
        mSensorManager = (SensorManager)getContext().getSystemService(Context.SENSOR_SERVICE);
        // find the rotation-vector sensor 
        mRotationVectorSensor = mSensorManager.getDefaultSensor(
                Sensor.TYPE_ROTATION_VECTOR);
        mIdentityMatrix.loadIdentity();
    } 
 
    private void ensureRenderScript() { 
        if (mRS == null) {
            RenderScriptGL.SurfaceConfig sc = new RenderScriptGL.SurfaceConfig();
Contextual code suggestions in your IDE  Get Codota for Java