|
|
|
@ -198,6 +198,12 @@ public class Curve extends Mesh { |
|
|
|
|
* points |
|
|
|
|
*/ |
|
|
|
|
private void createNurbMesh(int nbSubSegments) { |
|
|
|
|
if(spline.getControlPoints() != null && spline.getControlPoints().size() > 0) { |
|
|
|
|
if(nbSubSegments == 0) { |
|
|
|
|
nbSubSegments = spline.getControlPoints().size() + 1; |
|
|
|
|
} else { |
|
|
|
|
nbSubSegments = spline.getControlPoints().size() * nbSubSegments + 1; |
|
|
|
|
} |
|
|
|
|
float minKnot = spline.getMinNurbKnot(); |
|
|
|
|
float maxKnot = spline.getMaxNurbKnot(); |
|
|
|
|
float deltaU = (maxKnot - minKnot) / nbSubSegments; |
|
|
|
@ -228,6 +234,7 @@ public class Curve extends Mesh { |
|
|
|
|
this.updateBound(); |
|
|
|
|
this.updateCounts(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void createLinearMesh() { |
|
|
|
|
float[] array = new float[spline.getControlPoints().size() * 3]; |
|
|
|
|