docs: public static GVRMesh createRoundQuad(GVRContext gvrContext, float width, float height,
                                              float rx, float ry, int segments) {
          GVRMesh mesh = new GVRMesh(gvrContext);
  
          if (segments < 0)
              segments = 0;
  
          // adjust to internal logic
          segments += 2;
  
          if (rx > width * 0.5f) rx = width * 0.5f;
          if (ry > height * 0.5f) ry = height * 0.5f;
  
          final double angle = (float) Math.PI * 0.5f / (segments - 1);
  
          final float[] vertices = new float[3 * (4 * segments + 1)];
          final float[] normals = new float[vertices.length];
          final char[] triangles = new char[vertices.length - 3];
          final float[] texcoords = new float[2 * (4 * segments + 1)];
  
          // Center to the triangles
          vertices[vertices.length - 3] = 0.0f;
          vertices[vertices.length - 2] = 0.0f;
          vertices[vertices.length - 1] = 0.0f;
  
          normals[normals.length - 3] = 0.0f;
          normals[normals.length - 2] = 0.0f;
          normals[normals.length - 1] = 1.0f;
  
          texcoords[texcoords.length - 2] = 0.5f;
          texcoords[texcoords.length - 1] = 0.5f;
  
          for (char i = 0; i < segments; i++) {
              final float cos = (float) Math.cos(i * angle);
              final float sin = (float) Math.sin(i * angle);
              final float dx = (1.0f - cos) * 2.0f * rx / width;
              final float dy = (1.0f - sin) * 2.0f * ry / height;
              final float x0 = (1.0f - dx) * 0.5f;
              final float y0 = (1.0f - dy) * 0.5f;
              final float x = x0 * width;
              final float y = y0 * height;
  
              // top right
              vertices[3 * i + 0 + 0 * segments] = x;
              vertices[3 * i + 1 + 0 * segments] = y;
              vertices[3 * i + 2 + 0 * segments] = 0.0f;
  
              // top left
              vertices[6 * segments - (3 * i + 3)] = -x;
              vertices[6 * segments - (3 * i + 2)] = y;
              vertices[6 * segments - (3 * i + 1)] = 0.0f;
  
              // down left
              vertices[3 * i + 0 + 6 * segments] = -x;
              vertices[3 * i + 1 + 6 * segments] = -y;
              vertices[3 * i + 2 + 6 * segments] = 0.0f;
  
              // down right
              vertices[12 * segments - (3 * i + 3)] = x;
              vertices[12 * segments - (3 * i + 2)] = -y;
              vertices[12 * segments - (3 * i + 1)] = 0.0f;
  
  
              // top right
              texcoords[2 * i + 0 + 0 * segments] = 0.5f + x0;
              texcoords[2 * i + 1 + 0 * segments] = 0.5f - y0;
  
              // top left
              texcoords[4 * segments - (2 * i + 2)] = 0.5f - x0;
              texcoords[4 * segments - (2 * i + 1)] = 0.5f - y0;
  
              // down left
              texcoords[2 * i + 0 + 4 * segments] = 0.5f - x0;
              texcoords[2 * i + 1 + 4 * segments] = 0.5f + y0;
  
              // down right
              texcoords[8 * segments - (2 * i + 2)] = 0.5f + x0;
              texcoords[8 * segments - (2 * i + 1)] = 0.5f + y0;
          }
  
          final int num_vertices = (vertices.length / 3) - 1;
          for (char i = 0; i < num_vertices; i++) {
              normals[3 * i] = 0.0f;
              normals[3 * i + 1] = 0.0f;
              normals[3 * i + 2] = 1.0f;
  
              triangles[3 * i] = i;
              triangles[3 * i + 1] = (char) ((i + 1) % num_vertices);
              triangles[3 * i + 2] = (char) num_vertices;
          }
  
          mesh.setVertices(vertices);
          mesh.setNormals(normals);
          mesh.setTexCoords(texcoords);
          mesh.setIndices(triangles);
  
          return mesh;
      }