Bugfix: fixed a bug that caused NURB lines did not use their proper
resolution.
This commit is contained in:
parent
7e185b25df
commit
8958459ef9
@ -198,6 +198,12 @@ public class Curve extends Mesh {
|
|||||||
* points
|
* points
|
||||||
*/
|
*/
|
||||||
private void createNurbMesh(int nbSubSegments) {
|
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 minKnot = spline.getMinNurbKnot();
|
||||||
float maxKnot = spline.getMaxNurbKnot();
|
float maxKnot = spline.getMaxNurbKnot();
|
||||||
float deltaU = (maxKnot - minKnot) / nbSubSegments;
|
float deltaU = (maxKnot - minKnot) / nbSubSegments;
|
||||||
@ -228,6 +234,7 @@ public class Curve extends Mesh {
|
|||||||
this.updateBound();
|
this.updateBound();
|
||||||
this.updateCounts();
|
this.updateCounts();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void createLinearMesh() {
|
private void createLinearMesh() {
|
||||||
float[] array = new float[spline.getControlPoints().size() * 3];
|
float[] array = new float[spline.getControlPoints().size() * 3];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user