Packageaway3d.core.geom
Classpublic class Path

Holds information about a single Path definition.

Public Properties
 PropertyDefined by
  array : Array
[read-only] returns the Path elements array
Path
  aSegments : Array
The array that contains the path definition.
Path
  averaged : Boolean
[read-only] returns true if the averagePath handler is being used.
Path
  display : Boolean
Defines if the path data must be visible or not if debugPath has been called
Path
  length : int
[read-only] returns the length of the Path elements array
Path
  _pathDebug : PathDebug
To display/debug the Path instance data
Path
  showAnchors : Boolean
Defines if the anchors must be displayed if debugPath has been called.
Path
  smoothed : Boolean
[read-only] returns true if the smoothPath handler is being used.
Path
  worldAxis : Number3D
The worldAxis of reference
Path
Public Methods
 MethodDefined by
  
Path
(aVectors:Array = null)
Creates a new Path object.
Path
  
add(cs:PathCommand):void
adds a PathCommand to the path
Path
  
averagePath():void
handler will average the path using averages of the PathCommands note that this is not dynamic, the path values are overwrited
Path
  
continuousCurve(points:Array, closed:Boolean = false):void
Path
  
debugPath(scene:Scene3D):void
display the path in scene
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 PathCommands note that this is not dynamic, the PathCommands values are overwrited
Path
Property detail
arrayproperty
array:Array  [read-only]

returns the Path elements array

Implementation
    public function get array():Array
aSegmentsproperty 
public var aSegments:Array

The array that contains the path definition.

averagedproperty 
averaged:Boolean  [read-only]

returns true if the averagePath handler is being used.

Implementation
    public function get averaged():Boolean
displayproperty 
display:Boolean  [read-write]

Defines if the path data must be visible or not if debugPath has been called

Implementation
    public function get display():Boolean
    public function set display(value:Boolean):void
lengthproperty 
length:int  [read-only]

returns the length of the Path elements array

Implementation
    public function get length():int
_pathDebugproperty 
public var _pathDebug:PathDebug

To display/debug the Path instance data

showAnchorsproperty 
showAnchors:Boolean  [read-write]

Defines if the anchors must be displayed if debugPath has been called. if false, only curves are displayed

Implementation
    public function get showAnchors():Boolean
    public function set showAnchors(value:Boolean):void
smoothedproperty 
smoothed:Boolean  [read-only]

returns true if the smoothPath handler is being used.

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

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 number3D'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(cs:PathCommand):void

adds a PathCommand to the path

Parameters
cs:PathCommand

See also

PathCommand:
averagePath()method 
public function averagePath():void

handler will average the path using averages of the PathCommands 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)
debugPath()method 
public function debugPath(scene:Scene3D):void

display the path in scene

Parameters
scene:Scene3D
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 PathCommands note that this is not dynamic, the PathCommands values are overwrited

Wiki link
Click to go to the wiki page for 'away3d.core.geom.Path'

Code examples

Comments