if (nextPoint != null) {
direction.set(nextPoint).subtractLocal(point);
} else {
direction.set(point).subtractLocal(lastPoint);
}
rotation.lookAt(direction, up);
if (shapeNormalBuffer != null && normals != null) {
vector.set(shapeNormalBuffer.get(), shapeNormalBuffer.get(), shapeNormalBuffer.get());
rotation.apply(vector, vector);
normals.put(vector.getXf());