new NURBSSurface(degree1, degree2, knots1, knots2, controlPoints)
Creates a 3D NURBS surface.
Parameters:
| Name | Type | Description |
|---|---|---|
degree1 |
number | The degree of the U-axis curve. |
degree2 |
number | The degree of the V-axis curve. |
knots1 |
Array.<number> | The knots in the U-axis. |
knots2 |
Array.<number> | The knots in the V-axis. |
controlPoints |
Array.<PD.Point> | The array of control nodes. |
Members
-
:Array.<PD.Point>
controlPoints
-
The array of control nodes.
Type
- Array.<PD.Point>
-
:number
degree1
-
The degree of the U-axis curve.
Type
- number
-
:number
degree2
-
The degree of the V-axis curve.
Type
- number
-
:Array.<number>
knots1
-
The knots in the U-axis.
Type
- Array.<number>
-
:Array.<number>
knots2
-
The knots in the V-axis.
Type
- Array.<number>
Methods
-
getPoint(t1, t2, target)
-
Retrieves a point on the NURBS surface.
Parameters:
Name Type Description t1number The fraction along the U-axis of the surface (0.0 to 1.0).
t2number The fraction along the V-axis of the surface (0.0 to 1.0).
targetTHREE.Vector3 The vector to receive the NURBS surface position.
-
getPointAndNormal(t1, t2, target, normal)
-
Retrieves a point and surface normal on the NURBS surface.
This method uses finite differences to closely approximate the surface normal and tangent at the point.
Parameters:
Name Type Description t1number The fraction along the U-axis of the surface (0.0 to 1.0).
t2number The fraction along the V-axis of the surface (0.0 to 1.0).
targetTHREE.Vector3 The vector to receive the NURBS surface position.
normalTHREE.Vector3 The vector to receive the NURBS surface normal.