Packageaway3d.paths
Classpublic class SegmentedPathBase
InheritanceSegmentedPathBase Inheritance Object
Implements IPath
Subclasses CubicPath, QuadraticPath



Public Properties
 PropertyDefined By
  numSegments : uint
[read-only] The number of segments in the Path
SegmentedPathBase
  pointData : Vector.<Vector3D>
[write-only]
SegmentedPathBase
  segments : Vector.<IPathSegment>
[read-only] returns the Vector.<PathSegment> holding the elements (PathSegment) of the path
SegmentedPathBase
Protected Properties
 PropertyDefined By
  _segments : Vector.<IPathSegment>
SegmentedPathBase
Public Methods
 MethodDefined By
  
SegmentedPathBase(pointsPerSegment:uint, data:Vector.<Vector3D> = null)
SegmentedPathBase
  
addSegment(segment:IPathSegment):void
SegmentedPathBase
  
dispose():void
SegmentedPathBase
  
getPointOnCurve(t:Number, target:Vector3D = null):Vector3D
SegmentedPathBase
  
getPointsOnCurvePerSegment(subdivision:uint):Vector.<Vector3D>
SegmentedPathBase
  
returns a given PathSegment from the path (PathSegment holds 3 Vector3D's)
SegmentedPathBase
  
removeSegment(index:uint, join:Boolean = false):void
removes a segment in the path according to id.
SegmentedPathBase
Protected Methods
 MethodDefined By
  
createSegmentFromArrayEntry(data:Vector.<Vector3D>, offset:uint):IPathSegment
SegmentedPathBase
  
getSegmentPoints(segment:IPathSegment, n:uint, last:Boolean):Vector.<Vector3D>
SegmentedPathBase
  
Stitches two segments together based on a segment between them.
SegmentedPathBase
Property Detail
_segmentsproperty
protected var _segments:Vector.<IPathSegment>

numSegmentsproperty 
numSegments:uint  [read-only]

The number of segments in the Path


Implementation
    public function get numSegments():uint
pointDataproperty 
pointData:Vector.<Vector3D>  [write-only]


Implementation
    public function set pointData(value:Vector.<Vector3D>):void
segmentsproperty 
segments:Vector.<IPathSegment>  [read-only]

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


Implementation
    public function get segments():Vector.<IPathSegment>
Constructor Detail
SegmentedPathBase()Constructor
public function SegmentedPathBase(pointsPerSegment:uint, data:Vector.<Vector3D> = null)



Parameters
pointsPerSegment:uint
 
data:Vector.<Vector3D> (default = null)
Method Detail
addSegment()method
public function addSegment(segment:IPathSegment):void

Parameters

segment:IPathSegment

createSegmentFromArrayEntry()method 
protected function createSegmentFromArrayEntry(data:Vector.<Vector3D>, offset:uint):IPathSegment

Parameters

data:Vector.<Vector3D>
 
offset:uint

Returns
IPathSegment
dispose()method 
public function dispose():void

getPointOnCurve()method 
public function getPointOnCurve(t:Number, target:Vector3D = null):Vector3D

Parameters

t:Number
 
target:Vector3D (default = null)

Returns
Vector3D
getPointsOnCurvePerSegment()method 
public function getPointsOnCurvePerSegment(subdivision:uint):Vector.<Vector3D>

Parameters

subdivision:uint

Returns
Vector.<Vector3D>
getSegmentAt()method 
public function getSegmentAt(index:uint):IPathSegment

returns a given PathSegment from the path (PathSegment holds 3 Vector3D's)

Parameters

index:uint — uint. the indice of a given PathSegment

Returns
IPathSegment — given PathSegment from the path
getSegmentPoints()method 
protected function getSegmentPoints(segment:IPathSegment, n:uint, last:Boolean):Vector.<Vector3D>

Parameters

segment:IPathSegment
 
n:uint
 
last:Boolean

Returns
Vector.<Vector3D>
removeSegment()method 
public function removeSegment(index:uint, join:Boolean = false):void

removes a segment in the path according to id.

Parameters

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

stitchSegment()method 
protected function stitchSegment(start:IPathSegment, middle:IPathSegment, end:IPathSegment):void

Stitches two segments together based on a segment between them. This is an abstract method used by the template method removeSegment and must be overridden by concrete subclasses!

Parameters

start:IPathSegment — The section of which the end points must be connected with "end"
 
middle:IPathSegment — The section that was removed and forms the position hint
 
end:IPathSegment — The section of which the start points must be connected with "start"