Methods Summary |
---|
public void | addFace(GLFace face)
mFaceList.add(face);
|
public GLVertex | addVertex(float x, float y, float z)
// look for an existing GLVertex first
Iterator<GLVertex> iter = mVertexList.iterator();
while (iter.hasNext()) {
GLVertex vertex = iter.next();
if (vertex.x == x && vertex.y == y && vertex.z == z) {
return vertex;
}
}
// doesn't exist, so create new vertex
GLVertex vertex = mWorld.addVertex(x, y, z);
mVertexList.add(vertex);
return vertex;
|
public void | animateTransform(M4 transform)
mAnimateTransform = transform;
if (mTransform != null)
transform = mTransform.multiply(transform);
Iterator<GLVertex> iter = mVertexList.iterator();
while (iter.hasNext()) {
GLVertex vertex = iter.next();
mWorld.transformVertex(vertex, transform);
}
|
public void | endAnimation()
if (mTransform == null) {
mTransform = new M4(mAnimateTransform);
} else {
mTransform = mTransform.multiply(mAnimateTransform);
}
|
public int | getIndexCount()
int count = 0;
Iterator<GLFace> iter = mFaceList.iterator();
while (iter.hasNext()) {
GLFace face = iter.next();
count += face.getIndexCount();
}
return count;
|
public void | putIndices(java.nio.ShortBuffer buffer)
Iterator<GLFace> iter = mFaceList.iterator();
while (iter.hasNext()) {
GLFace face = iter.next();
face.putIndices(buffer);
}
|
public void | setFaceColor(int face, GLColor color)
mFaceList.get(face).setColor(color);
|
public void | startAnimation()
|