class NURBSGeometry
package away3d.primitives
extends PrimitiveBase › Geometry › NamedAssetBase
Available on all platforms
A NURBS primitive geometry.
Constructor
new(cNet:Vector<NURBSVertex>, uCtrlPnts:Int, vCtrlPnts:Int, uOrder:Int = 4, vOrder:Int = 4, uSegments:Int = 10, vSegments:Int = 10, ?uKnot:Vector<Float>, ?vKnot:Vector<Float>)
NURBS primitive generates a segmented mesh that fits the curved surface defined by the specified control points based on weighting, order influence and knot sequence
Parameters:
cNet | Array of control points (WeightedVertex array) |
|---|---|
uCtrlPnts | Number of control points in the U direction |
vCtrlPnts | Number of control points in the V direction |
init | Init object for the mesh |
Variables
Methods
getSurfacePoint(uS:Float, vS:Float, vecOffset:Float = 0, scale:Float = 1, uTol:Float = 0.01, vTol:Float = 0.01):Vector3D
Return a 3d point representing the surface point at the required U(0-1) and V(0-1) across the NURBS curved surface.
Parameters:
uS | U position on the surface |
|---|---|
vS | V position on the surface |
vecOffset | Offset the point on the surface by this vector |
scale | Scale of the surface point - should match the Mesh scaling |
uTol | U tolerance for adjacent surface sample to calculate normal |
vTol | V tolerance for adjacent surface sample to calculate normal |
Returns:
The offset surface point being returned
refreshNURBS():Void
Refresh the mesh without reconstructing all the supporting data. This should be used only
* when the control point positions change.