Vector3d t = new Vector3d();
- for (int i = 0; i < vertices.size() - 1; i++) {
- t.set(vertices.get(i+1));
- t.sub(vertices.get(i));
- if (t.lengthSquared() < 0.0000001)
- throw new IllegalArgumentException("vertices at index " + i + " are too close to each other");
+ if (tangents == null) {
+ for (int i = 0; i < vertices.size() - 1; i++) {
+ t.set(vertices.get(i+1));
+ t.sub(vertices.get(i));
+ if (t.lengthSquared() < 0.0000001)
+ throw new IllegalArgumentException("vertices at index " + i + " are too close to each other");
+ }
}
int vcount = vertices.size()*resolution;