Android Open Source - OpenGlDraw_Android Shape Cup64 Verts






From Project

Back to project page OpenGlDraw_Android.

License

The source code is released under:

GNU General Public License

If you think the Android project OpenGlDraw_Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.opengldraw.shapes;
//from  w ww  . j a  v  a2 s .c o m
import com.example.opengldraw.utils.ShapeDataInterface;

public class ShapeCup64Verts extends Object implements ShapeDataInterface {

  float vertices[] = {
      0.000000f, -1.036582f, -1.000000f, -0.195090f, -1.036582f, -0.980785f, -0.382683f, -1.036582f, -0.923880f,
      -0.555570f, -1.036582f, -0.831470f, -0.707107f, -1.036582f, -0.707107f, -0.831470f, -1.036582f, -0.555570f,
      -0.923880f, -1.036582f, -0.382683f, -0.980785f, -1.036582f, -0.195090f, -1.000000f, -1.036582f, -0.000000f,
      -0.980785f, -1.036582f, 0.195090f, -0.923880f, -1.036582f, 0.382683f, -0.831470f, -1.036582f, 0.555570f, 
      -0.707107f, -1.036582f, 0.707107f, -0.555570f, -1.036582f, 0.831470f, -0.382683f, -1.036582f, 0.923880f, 
      -0.195090f, -1.036582f, 0.980785f, 0.000000f, -1.036582f, 1.000000f, 0.195091f, -1.036582f, 0.980785f,
      0.382684f, -1.036582f, 0.923879f, 0.555571f, -1.036582f, 0.831469f, 0.707107f, -1.036582f, 0.707106f, 
      0.831470f, -1.036582f, 0.555570f, 0.923880f, -1.036582f, 0.382683f, 0.980785f, -1.036582f, 0.195089f, 
      1.000000f, -1.036582f, -0.000001f, 0.980785f, -1.036582f, -0.195091f, 0.923879f, -1.036582f, -0.382684f,
      0.831469f, -1.036582f, -0.555571f, 0.707106f, -1.036582f, -0.707108f, 0.555569f, -1.036582f, -0.831470f,
      0.382682f, -1.036582f, -0.923880f, 0.195089f, -1.036582f, -0.980786f, 0.000000f, 1.279373f, -1.318715f,
      -0.257269f, 1.279373f, -1.293376f, -0.504651f, 1.279373f, -1.218334f, -0.732639f, 1.279373f, -1.096472f,
      -0.932473f, 1.279373f, -0.932472f, -1.096472f, 1.279373f, -0.732639f, -1.218334f, 1.279373f, -0.504650f,
      -1.293377f, 1.279373f, -0.257269f, -1.318715f, 1.279373f, -0.000000f, -1.293377f, 1.279373f, 0.257269f,
      -1.218334f, 1.279373f, 0.504650f, -1.096472f, 1.279373f, 0.732639f, -0.932473f, 1.279373f, 0.932473f,
      -0.732639f, 1.279373f, 1.096472f, -0.504650f, 1.279373f, 1.218334f, -0.257268f, 1.279373f, 1.293377f,
      0.000000f, 1.279373f, 1.318715f, 0.257269f, 1.279373f, 1.293377f, 0.504651f, 1.279373f, 1.218334f,
      0.732640f, 1.279373f, 1.096471f, 0.932473f, 1.279373f, 0.932472f, 1.096472f, 1.279373f, 0.732638f,
      1.218335f, 1.279373f, 0.504650f, 1.293377f, 1.279373f, 0.257268f, 1.318715f, 1.279373f, -0.000001f, 1.293376f,
      1.279373f, -0.257270f, 1.218334f, 1.279373f, -0.504652f, 1.096471f, 1.279373f, -0.732640f, 0.932471f, 1.279373f,
      -0.932474f, 0.732638f, 1.279373f, -1.096473f, 0.504649f, 1.279373f, -1.218335f, 0.257267f, 1.279373f, -1.293377f
  };
  
  float colors[] = {
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f,
    234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f, 234/255f, 234/255f, 234/255f, 1.0f
  };
  
  short indices[] = {
    14, 15, 46, 11, 12, 43, 8, 9, 40, 5, 6, 37, 2, 3, 34, 31, 0, 32, 28, 29, 61, 25, 26, 58, 22, 23, 55, 19, 20, 52, 16, 17, 49, 13, 14, 45, 10, 11, 42, 7, 8, 39, 4, 5, 36, 1, 2, 33, 30, 31, 63, 27, 28, 60, 24, 25, 57, 21, 22, 54, 18, 19, 51, 15, 16, 47, 12, 13, 44, 9, 10, 41, 6, 7, 38, 3, 4, 35, 0, 1, 32, 29, 30, 62, 26, 27, 59, 23, 24, 56, 20, 21, 53, 17, 18, 50, 15, 47, 46, 12, 44, 43, 9, 41, 40, 6, 38, 37, 3, 35, 34, 63, 31, 32, 60, 28, 61, 57, 25, 58, 54, 22, 55, 51, 19, 52, 48, 16, 49, 14, 46, 45, 11, 43, 42, 8, 40, 39, 5, 37, 36, 2, 34, 33, 62, 30, 63, 59, 27, 60, 56, 24, 57, 53, 21, 54, 50, 18, 51, 16, 48, 47, 13, 45, 44, 10, 42, 41, 7, 39, 38, 4, 36, 35, 1, 33, 32, 61, 29, 62, 58, 26, 59, 55, 23, 56, 52, 20, 53, 49, 17, 50
  };
  
  float normals[] = {
      0.765860f, -0.135688f, -0.628527f, 0.948090f, -0.135688f, 0.287599f, 0.287600f, -0.135688f, 0.948090f,
      -0.628526f, -0.135688f, 0.765861f, -0.985981f, -0.135688f, -0.097111f, -0.467037f, -0.135688f, -0.873765f,
      0.628525f, -0.135688f, -0.765862f, 0.985981f, -0.135688f, 0.097110f, 0.467037f, -0.135688f, 0.873765f,
      -0.467037f, -0.135688f, 0.873765f, -0.985981f, -0.135688f, 0.097111f, -0.628526f, -0.135688f, -0.765861f,
      0.467036f, -0.135688f, -0.873766f, 0.985981f, -0.135688f, -0.097112f, 0.628527f, -0.135688f, 0.765861f,
      -0.287600f, -0.135688f, 0.948090f, -0.948090f, -0.135688f, 0.287600f, -0.765861f, -0.135688f, -0.628526f,
      0.287598f, -0.135688f, -0.948091f, 0.948090f, -0.135688f, -0.287601f, 0.765862f, -0.135688f, 0.628526f,
      -0.097110f, -0.135688f, 0.985981f, -0.873765f, -0.135688f, 0.467037f, -0.873765f, -0.135688f, -0.467037f,
      -0.097111f, -0.135688f, -0.985981f, 0.097110f, -0.135688f, -0.985981f, 0.873764f, -0.135688f, -0.467038f,
      0.873765f, -0.135688f, 0.467036f, 0.097111f, -0.135688f, 0.985981f, -0.765861f, -0.135688f, 0.628526f,
      -0.948090f, -0.135688f, -0.287600f, -0.287600f, -0.135688f, -0.948090f, 0.287601f, -0.135688f, 0.948090f,
      -0.628526f, -0.135688f, -0.765862f, -0.287599f, -0.135688f, 0.948090f, 0.287599f, -0.135688f, -0.948091f  };
  
  float textCoords[] = new float[10];
  
  @Override
  public float[] getVertices() {
    return vertices;
  }

  @Override
  public float[] getColors() {
    return colors;
  }

  @Override
  public float[] getNormals() {
    return normals;
  }

  @Override
  public short[] getDrawOrder() {
    return indices;
  }
  
  @Override
  public float[] getTextCoords() {
    return textCoords;
  }
}




Java Source Code List

com.example.opengldraw.MainActivity.java
com.example.opengldraw.gl.GLSurfaceViewDraw.java
com.example.opengldraw.gl.RendererDraw.java
com.example.opengldraw.gl.ShapeDrawer.java
com.example.opengldraw.shapes.FireEngine.java
com.example.opengldraw.shapes.ShapeCube.java
com.example.opengldraw.shapes.ShapeCup10Verts.java
com.example.opengldraw.shapes.ShapeCup64Verts.java
com.example.opengldraw.shapes.ShapeSquare.java
com.example.opengldraw.utils.IndexOrderObj.java
com.example.opengldraw.utils.ShapeDataInterface.java
com.example.opengldraw.utils.WavefrontObj.java