NURBSSurface constructor

NURBSSurface(
  1. int degree1,
  2. int degree2,
  3. List<double> knots1,
  4. List<double> knots2,
  5. List<List<Vector4>> controlPoints,
)

Implementation

NURBSSurface(this.degree1, this.degree2, this.knots1, this.knots2, this.controlPoints) {
	final len1 = knots1.length - degree1 - 1;
	final len2 = knots2.length - degree2 - 1;

	// ensure Vector4 for control points
	for (int i = 0; i < len1; ++ i ) {
		//controlPoints[i] = [];
		for (int j = 0; j < len2; ++ j ) {
			final point = controlPoints[ i ][ j ];
        controlPoints[ i ][ j ] = Vector4( point.x, point.y, point.z, point.w );
		}
	}
}