Packageaway3d.extrusions.utils
Classpublic class Path

Holds information about a single Path definition. DEBUG OPTION OUT AT THIS TIME OF DEV

Public Properties
 PropertyDefined by
  averaged : Boolean
[read-only] returns true if the averagePath handler is being used.
Path
  length : int
[read-only] returns the length of the Path elements array
Path
  _segments : Vector
To display/debug the Path instance data
Path
  segments : Vector
[read-only] returns the Vector. holding the elements (PathSegment) of the path
Path
  smoothed : Boolean
[read-only] returns true if the smoothPath handler is being used.
Path
  worldAxis : Vector3D
The worldAxis of reference
Path
Public Methods
 MethodDefined by
  
Path
(aVectors:Array = null)
Creates a new Path object.
Path
  
add(ps:PathSegment):void
display the path in scene
Path
  
averagePath():void
handler will average the path using averages of the PathSegments note that this is not dynamic, the path values are overwrited
Path
  
continuousCurve(points:Array, closed:Boolean = false):void
Path
  
removeSegment(index:int, join:Boolean = false):void
removes a segment in the path according to id.
Path
  
smoothPath():void
handler will smooth the path using anchors as control vector of the PathSegments note that this is not dynamic, the PathSegments values are overwrited
Path
Property detail
averagedproperty
averaged:Boolean  [read-only]

returns true if the averagePath handler is being used.

Implementation
    public function get averaged():Boolean
lengthproperty 
length:int  [read-only]

returns the length of the Path elements array

Implementation
    public function get length():int
_segmentsproperty 
public var _segments:Vector

To display/debug the Path instance data

segmentsproperty 
segments:Vector  [read-only]

returns the Vector. holding the elements (PathSegment) of the path

Implementation
    public function get segments():Vector
smoothedproperty 
smoothed:Boolean  [read-only]

returns true if the smoothPath handler is being used.

Implementation
    public function get smoothed():Boolean
worldAxisproperty 
public var worldAxis:Vector3D

The worldAxis of reference

Constructor detail
Path()constructor
public function Path(aVectors:Array = null)Parameters
aVectors:Array (default = null) — aVectors [optional] An array of a series of Vector3D's organized in the following fashion. [a,b,c,a,b,c etc...] a = pEnd, b=pControl (control point), c = v2
Init Parameters
Method detail
add()method
public function add(ps:PathSegment):void

display the path in scene

Parameters
ps:PathSegment
averagePath()method 
public function averagePath():void

handler will average the path using averages of the PathSegments note that this is not dynamic, the path values are overwrited

continuousCurve()method 
public function continuousCurve(points:Array, closed:Boolean = false):void Parameters
points:Array
 
closed:Boolean (default = false)
removeSegment()method 
public function removeSegment(index:int, join:Boolean = false):void

removes a segment in the path according to id.

Parameters
index:int — index int. The index in path of the to be removed curvesegment
 
join:Boolean (default = false) — join Boolean. If true previous and next segments coordinates are reconnected
smoothPath()method 
public function smoothPath():void

handler will smooth the path using anchors as control vector of the PathSegments note that this is not dynamic, the PathSegments values are overwrited

Wiki link
Click to go to the wiki page for 'away3d.extrusions.utils.Path'

Code examples

Comments