PointCloudpublic class PointCloud extends Shape A class representing a set of GL_POINT objects. GlobalTime uses this class
to draw city lights on the night side of the earth. |
Constructors Summary |
---|
public PointCloud(int[] vertices)Constructs a PointCloud with a point at each of the given vertex
(x, y, z) positions.
this(vertices, 0, vertices.length);
| public PointCloud(int[] vertices, int off, int len)Constructs a PointCloud with a point at each of the given vertex
(x, y, z) positions.
super(GL10.GL_POINTS, GL10.GL_UNSIGNED_SHORT,
false, false, false);
int numPoints = len / 3;
short[] indices = new short[numPoints];
for (int i = 0; i < numPoints; i++) {
indices[i] = (short)i;
}
allocateBuffers(vertices, null, null, null, indices);
this.mNumIndices = mIndexBuffer.capacity();
|
Methods Summary |
---|
public int | getNumTriangles()
return mNumIndices * 2;
|
|