Class: NurbsSurfaceArray

PD. NurbsSurfaceArray

Defines a 3D NURBS surface.

A NURBS surface is a simple class for generating surface points from a set of 3D spatially distributed control nodes.


new NurbsSurfaceArray(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.<Array.<number>>

The array of control nodes.

Author:
  • drajmarsh

Members


:Array.<Array.<number>>

controlPoints

The array of control nodes.

Type
  • Array.<Array.<number>>

: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
t1 number

The fraction along the U-axis of the surface (0.0 to 1.0).

t2 number

The fraction along the V-axis of the surface (0.0 to 1.0).

target Array.<number>

The vector to receive the NURBS surface position.


getPointAndNormal(t1, t2, target, normal)

Retrieves a point and surface normal on the NURBS surface.

Parameters:
Name Type Description
t1 number

The fraction along the U-axis of the surface (0.0 to 1.0).

t2 number

The fraction along the V-axis of the surface (0.0 to 1.0).

target Array.<number>

The vector to receive the NURBS surface position.

normal Array.<number>

The vector to receive the NURBS surface normal.