ComplexPlane.java
Dosyayı İndir
package com.godoro.androidopengl;
public class ComplexPlane extends GLMesh {
public ComplexPlane() {
this(1, 1);
}
public ComplexPlane(float width, float height) {
float textureCoordinates[] = { 0.0f, 1.0f,
1.0f, 1.0f,
0.0f, 0.0f,
1.0f, 0.0f,
};
short[] indices = new short[] { 0, 1, 2, 1, 3, 2 };
float[] vertices = new float[] { -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f,
-0.5f, 0.5f, 0.0f, 0.5f, 0.5f, 0.0f };
setIndices(indices);
setVertices(vertices);
setTextureCoordinates(textureCoordinates);
}
}
Dosyayı İndir