createChain method
Create a chain with isolated end vertices.
vertices
are copied.
Implementation
void createChain(List<Vector2> vertices) {
assert(vertexCount == 0);
assert(vertices.length >= 2);
this.vertices.addAll(vertices.map((Vector2 v) => v.clone()));
_validateDistances(this.vertices);
_prevVertex.setZero();
_nextVertex.setZero();
_hasPrevVertex = false;
_hasNextVertex = false;
}