Packageaway3d.extrusions
Classpublic class PathDuplicator
InheritancePathDuplicator Inheritance Object
Deprecated: Deprecated



Public Properties
 PropertyDefined By
  alignToPath : Boolean
Defines if the profile point array should be orientated on path or not.
PathDuplicator
  clones : Vector.<Mesh>
[read-only] returns a vector with all meshes cloned since last time build method was called.
PathDuplicator
  container : ObjectContainer3D
If a container is provided, the meshes are addChilded to it instead of directly into the scene.
PathDuplicator
  meshes : Vector.<Mesh>
Defines an optional Vector.<Mesh>.
PathDuplicator
  path : IPath
Sets and defines the Path object.
PathDuplicator
  randomRotationY : Boolean
Defines if a clone gets a random rotationY to break visual repetitions, usefull in case of vegetation for instance.
PathDuplicator
  repeat : uint
Defines the resolution between each PathSegments.
PathDuplicator
  segmentSpread : Boolean
defines if the meshes[index] is repeated per segments or duplicated after each others.
PathDuplicator
  upAxis : Vector3D
The up axis to which duplicated objects' Y axis will be oriented.
PathDuplicator
Public Methods
 MethodDefined By
  
PathDuplicator(path:IPath = null, meshes:Vector.<Mesh> = null, scene:Scene3D = null, repeat:uint = 1, alignToPath:Boolean = true, segmentSpread:Boolean = true, container:ObjectContainer3D = null, randomRotationY:Boolean = false)
Creates a new PathDuplicator Class replicates and distribute one or more mesh(es) along a path.
PathDuplicator
  
build():void
Triggers the generation
PathDuplicator
  
clearData(destroyCachedMeshes:Boolean):void
PathDuplicator
Property Detail
alignToPathproperty
alignToPath:Boolean

Defines if the profile point array should be orientated on path or not. Default true.


Implementation
    public function get alignToPath():Boolean
    public function set alignToPath(value:Boolean):void
clonesproperty 
clones:Vector.<Mesh>  [read-only]

returns a vector with all meshes cloned since last time build method was called. Returns null if build hasn't be called yet. Another option to retreive the generated meshes is to pass an ObjectContainer3D to the class


Implementation
    public function get clones():Vector.<Mesh>
containerproperty 
container:ObjectContainer3D

If a container is provided, the meshes are addChilded to it instead of directly into the scene. The container is NOT addChilded to the scene.


Implementation
    public function get container():ObjectContainer3D
    public function set container(value:ObjectContainer3D):void
meshesproperty 
meshes:Vector.<Mesh>

Defines an optional Vector.<Mesh>. One or more meshes to repeat along the path. When the last in the vector is reached, the first in the array will be used, this process go on and on until the last segment.


Implementation
    public function get meshes():Vector.<Mesh>
    public function set meshes(value:Vector.<Mesh>):void
pathproperty 
path:IPath

Sets and defines the Path object. See extrusions.utils package. Required for this class.


Implementation
    public function get path():IPath
    public function set path(value:IPath):void
randomRotationYproperty 
randomRotationY:Boolean

Defines if a clone gets a random rotationY to break visual repetitions, usefull in case of vegetation for instance.


Implementation
    public function get randomRotationY():Boolean
    public function set randomRotationY(value:Boolean):void
repeatproperty 
repeat:uint

Defines the resolution between each PathSegments. Default 1, is also minimum.


Implementation
    public function get repeat():uint
    public function set repeat(value:uint):void
segmentSpreadproperty 
segmentSpread:Boolean

defines if the meshes[index] is repeated per segments or duplicated after each others. default = false.


Implementation
    public function get segmentSpread():Boolean
    public function set segmentSpread(value:Boolean):void
upAxisproperty 
upAxis:Vector3D

The up axis to which duplicated objects' Y axis will be oriented.


Implementation
    public function get upAxis():Vector3D
    public function set upAxis(value:Vector3D):void
Constructor Detail
PathDuplicator()Constructor
public function PathDuplicator(path:IPath = null, meshes:Vector.<Mesh> = null, scene:Scene3D = null, repeat:uint = 1, alignToPath:Boolean = true, segmentSpread:Boolean = true, container:ObjectContainer3D = null, randomRotationY:Boolean = false)

Creates a new PathDuplicator Class replicates and distribute one or more mesh(es) along a path. The offsets are defined by the position of the object. 0,0,0 would place the center of the mesh exactly on Path.

Parameters
path:IPath (default = null) — [optional] A Path object. The _path definition. either Cubic or Quadratic path
 
meshes:Vector.<Mesh> (default = null) — [optional] Vector.<Mesh>. One or more meshes to repeat along the path.
 
scene:Scene3D (default = null) — [optional] Scene3D. The scene where to addchild the meshes if no ObjectContainer3D is provided.
 
repeat:uint (default = 1) — [optional] uint. How many times a mesh is cloned per PathSegment. Default is 1.
 
alignToPath:Boolean (default = true) — [optional] Boolean. If the alignment of the clones must follow the path. Default is true.
 
segmentSpread:Boolean (default = true) — [optional] Boolean. If more than one Mesh is passed, it defines if the clones alternate themselves per PathSegment or each repeat. Default is false.
 
container:ObjectContainer3D (default = null) — [optional] ObjectContainer3D. If an ObjectContainer3D is provided, the meshes are addChilded to it instead of directly into the scene. The container is NOT addChilded to the scene by default.
 
randomRotationY:Boolean (default = false) — [optional] Boolean. If the clones must have a random rotationY added to them.
Method Detail
build()method
public function build():void

Triggers the generation

clearData()method 
public function clearData(destroyCachedMeshes:Boolean):void

Parameters

destroyCachedMeshes:Boolean