Example usage for android.opengl Matrix scaleM

List of usage examples for android.opengl Matrix scaleM

Introduction

In this page you can find the example usage for android.opengl Matrix scaleM.

Prototype

public static void scaleM(float[] sm, int smOffset, float[] m, int mOffset, float x, float y, float z) 

Source Link

Document

Scales matrix m by x, y, and z, putting the result in sm.

Usage

From source file:com.tumblr.cardboard.Tumblr3DActivity.java

/**
 * Moves the texture to the middle and makes it big.
 *
 * @param photoIndex the index of the texture to move
 *//*from www .java2  s  . c o  m*/
private void selectPhoto(int photoIndex) {
    final int i = NUM_IMAGES_STATIC + photoIndex;
    Matrix.scaleM(mModelRect[i], 0, mImageRect[i], 0, mScaleTheater, mScaleTheater, 1f);
    Matrix.translateM(mModelRect[i], 0, 0f, 0f, -SPHERE_RADIUS);
}