Packageaway3d.primitives
Classpublic class NURBSGeometry
InheritanceNURBSGeometry Inheritance PrimitiveBase Inheritance Geometry Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

A NURBS primitive geometry.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only]
Geometry
  controlNet : Vector.<NURBSVertex>
Defines the control point net to describe the NURBS surface
NURBSGeometry
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
 InheritedsubGeometries : Vector.<ISubGeometry>
[override] [read-only] A collection of SubGeometry objects, each of which contain geometrical data such as vertices, normals, etc.
PrimitiveBase
  uControlPoints : int
Defines the number of control points along the U splines
NURBSGeometry
  uKnot : Vector.<Number>
Defines the knot sequence in the U direction that determines where and how the control points affect the NURBS curve.
NURBSGeometry
  uOrder : int
Defines the number of control points along the U splines that influence any given point on the curve
NURBSGeometry
  uSegments : int
Defines the number segments (triangle pair) the final curve will be divided into in the U direction
NURBSGeometry
  vControlPoints : int
Defines the number of control points along the V splines
NURBSGeometry
  vKnot : Vector.<Number>
Defines the knot sequence in the V direction that determines where and how the control points affect the NURBS curve.
NURBSGeometry
  vOrder : int
Defines the number of control points along the V splines that influence any given point on the curve
NURBSGeometry
  vSegments : int
Defines the number segments (triangle pair) the final curve will be divided into in the V direction
NURBSGeometry
Protected Properties
 PropertyDefined By
 Inherited_geomDirty : Boolean = true
PrimitiveBase
 Inherited_uvDirty : Boolean = true
PrimitiveBase
Public Methods
 MethodDefined By
  
NURBSGeometry(cNet:Vector.<NURBSVertex>, uCtrlPnts:int, vCtrlPnts:int, uOrder:int = 4, vOrder:int = 4, uSegments:int = 10, vSegments:int = 10, uKnot:Vector.<Number> = null, vKnot:Vector.<Number> = null)
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
NURBSGeometry
 Inherited
addSubGeometry(subGeometry:ISubGeometry):void
Adds a new SubGeometry object to the list.
Geometry
 Inherited
applyTransformation(transform:Matrix3D):void
[override]
PrimitiveBase
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
[override] Clones the geometry.
PrimitiveBase
 Inherited
Updates the SubGeometries so all vertex data is represented in different buffers.
Geometry
 Inherited
dispose():void
Clears all resources used by the Geometry object, including SubGeometries.
Geometry
  
getSurfacePoint(uS:Number, vS:Number, vecOffset:Number = 0, scale:Number = 1, uTol:Number = 0.01, vTol:Number = 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.
NURBSGeometry
  
Refresh the mesh without reconstructing all the supporting data.
NURBSGeometry
 Inherited
Removes a new SubGeometry object from the list.
Geometry
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
 Inherited
scale(scale:Number):void
[override] Scales the geometry.
PrimitiveBase
 Inherited
scaleUV(scaleU:Number = 1, scaleV:Number = 1):void
[override] Scales the uv coordinates (tiling)
PrimitiveBase
Protected Methods
 MethodDefined By
  
[override] Rebuild the mesh as there is significant change to the structural parameters
NURBSGeometry
  
[override] Rebuild the UV coordinates as there is significant change to the structural parameters
NURBSGeometry
 Inherited
Invalidates the primitive's geometry, causing it to be updated when requested.
PrimitiveBase
 Inherited
Invalidates the primitive's uv coordinates, causing them to be updated when requested.
PrimitiveBase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
controlNetproperty
controlNet:Vector.<NURBSVertex>

Defines the control point net to describe the NURBS surface


Implementation
    public function get controlNet():Vector.<NURBSVertex>
    public function set controlNet(value:Vector.<NURBSVertex>):void
uControlPointsproperty 
uControlPoints:int

Defines the number of control points along the U splines


Implementation
    public function get uControlPoints():int
    public function set uControlPoints(value:int):void
uKnotproperty 
uKnot:Vector.<Number>

Defines the knot sequence in the U direction that determines where and how the control points affect the NURBS curve.


Implementation
    public function get uKnot():Vector.<Number>
    public function set uKnot(value:Vector.<Number>):void
uOrderproperty 
uOrder:int

Defines the number of control points along the U splines that influence any given point on the curve


Implementation
    public function get uOrder():int
    public function set uOrder(value:int):void
uSegmentsproperty 
uSegments:int

Defines the number segments (triangle pair) the final curve will be divided into in the U direction


Implementation
    public function get uSegments():int
    public function set uSegments(value:int):void
vControlPointsproperty 
vControlPoints:int

Defines the number of control points along the V splines


Implementation
    public function get vControlPoints():int
    public function set vControlPoints(value:int):void
vKnotproperty 
vKnot:Vector.<Number>

Defines the knot sequence in the V direction that determines where and how the control points affect the NURBS curve.


Implementation
    public function get vKnot():Vector.<Number>
    public function set vKnot(value:Vector.<Number>):void
vOrderproperty 
vOrder:int

Defines the number of control points along the V splines that influence any given point on the curve


Implementation
    public function get vOrder():int
    public function set vOrder(value:int):void
vSegmentsproperty 
vSegments:int

Defines the number segments (triangle pair) the final curve will be divided into in the V direction


Implementation
    public function get vSegments():int
    public function set vSegments(value:int):void
Constructor Detail
NURBSGeometry()Constructor
public function NURBSGeometry(cNet:Vector.<NURBSVertex>, uCtrlPnts:int, vCtrlPnts:int, uOrder:int = 4, vOrder:int = 4, uSegments:int = 10, vSegments:int = 10, uKnot:Vector.<Number> = null, vKnot:Vector.<Number> = null)

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:Vector.<NURBSVertex> — Array of control points (WeightedVertex array)
 
uCtrlPnts:int — Number of control points in the U direction
 
vCtrlPnts:int — Number of control points in the V direction
 
uOrder:int (default = 4) — Init object for the mesh
 
vOrder:int (default = 4)
 
uSegments:int (default = 10)
 
vSegments:int (default = 10)
 
uKnot:Vector.<Number> (default = null)
 
vKnot:Vector.<Number> (default = null)
Method Detail
buildGeometry()method
override protected function buildGeometry(target:CompactSubGeometry):void

Rebuild the mesh as there is significant change to the structural parameters

Parameters

target:CompactSubGeometry

buildUVs()method 
override protected function buildUVs(target:CompactSubGeometry):void

Rebuild the UV coordinates as there is significant change to the structural parameters

Parameters

target:CompactSubGeometry

getSurfacePoint()method 
public function getSurfacePoint(uS:Number, vS:Number, vecOffset:Number = 0, scale:Number = 1, uTol:Number = 0.01, vTol:Number = 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:Number — U position on the surface
 
vS:Number — V position on the surface
 
vecOffset:Number (default = 0) — Offset the point on the surface by this vector
 
scale:Number (default = 1) — Scale of the surface point - should match the Mesh scaling
 
uTol:Number (default = 0.01) — U tolerance for adjacent surface sample to calculate normal
 
vTol:Number (default = 0.01) — V tolerance for adjacent surface sample to calculate normal

Returns
Vector3D — The offset surface point being returned
refreshNURBS()method 
public function refreshNURBS():void

Refresh the mesh without reconstructing all the supporting data. This should be used only when the control point positions change.