computeWorldVertices method
Updates .worldVertices
and sets .worldVerticesNeedsUpdate
to false.
Implementation
void computeWorldVertices(Vec3 position, Quaternion quat) {
final int n = vertices.length;
while (worldVertices.length < n) {
worldVertices.add(Vec3());
}
final verts = vertices;
//final worldVerts = worldVertices;
for (int i = 0; i != n; i++) {
quat.vmult(verts[i], worldVertices[i]);
position.vadd(worldVertices[i], worldVertices[i]);
}
worldVerticesNeedsUpdate = false;
}