/** * Create a curve mesh. Use a CatmullRom spline model that does not cycle. * * @param controlPoints the control points to use to create this curve * @param nbSubSegments the number of subsegments between the control points */ public Curve(Vector3f[] controlPoints, int nbSubSegments) { this(new Spline(Spline.SplineType.CatmullRom, controlPoints, 10, false), nbSubSegments); }
Curve curve = new Curve(new Spline(SplineType.Bezier, controlPoints, 0, false), resolution);
int resolu = ((Number) nurb.getFieldValue("resolu")).intValue(); if (knots[1] == null) {// creating the NURB curve Curve curve = new Curve(new Spline(controlPoints.get(0), knots[0]), resolu); FloatBuffer vertsBuffer = (FloatBuffer) curve.getBuffer(Type.Position).getData(); beziers.add(new BezierLine(BufferUtils.getVector3Array(vertsBuffer), materialIndex, smooth, false));
bevelCurve = new Curve(new Spline(SplineType.Bezier, conrtolPoints, 0, false), bevResol); } else if (extrude > 0.0f) { Spline bevelSpline = new Spline(SplineType.Linear, new Vector3f[] { new Vector3f(0, extrude, 0), new Vector3f(0, -extrude, 0) }, 1, false); bevelCurve = new Curve(bevelSpline, bevResol);
/** * Create a curve mesh. * Use a CatmullRom spline model that does not cycle. * * @param controlPoints the control points to use to create this curve * @param nbSubSegments the number of subsegments between the control points */ public Curve(Vector3f[] controlPoints, int nbSubSegments) { this(new Spline(Spline.SplineType.CatmullRom, controlPoints, 10, false), nbSubSegments); }
/** * Create a curve mesh. Use a CatmullRom spline model that does not cycle. * * @param controlPoints the control points to use to create this curve * @param nbSubSegments the number of subsegments between the control points */ public Curve(Vector3f[] controlPoints, int nbSubSegments) { this(new Spline(Spline.SplineType.CatmullRom, controlPoints, 10, false), nbSubSegments); }