| Package | away3d.extrusions |
| Class | public class PathDuplicator |
| Inheritance | PathDuplicator Object |
| Property | Defined 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 | ||
| Method | Defined 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 | ||
| alignToPath | property |
alignToPath:BooleanDefines if the profile point array should be orientated on path or not. Default true.
public function get alignToPath():Boolean public function set alignToPath(value:Boolean):void| clones | property |
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
public function get clones():Vector.<Mesh>| container | property |
container:ObjectContainer3DIf a container is provided, the meshes are addChilded to it instead of directly into the scene. The container is NOT addChilded to the scene.
public function get container():ObjectContainer3D public function set container(value:ObjectContainer3D):void| meshes | property |
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.
public function get meshes():Vector.<Mesh> public function set meshes(value:Vector.<Mesh>):void| path | property |
path:IPathSets and defines the Path object. See extrusions.utils package. Required for this class.
public function get path():IPath public function set path(value:IPath):void| randomRotationY | property |
randomRotationY:BooleanDefines if a clone gets a random rotationY to break visual repetitions, usefull in case of vegetation for instance.
public function get randomRotationY():Boolean public function set randomRotationY(value:Boolean):void| repeat | property |
repeat:uintDefines the resolution between each PathSegments. Default 1, is also minimum.
public function get repeat():uint public function set repeat(value:uint):void| segmentSpread | property |
segmentSpread:Booleandefines if the meshes[index] is repeated per segments or duplicated after each others. default = false.
public function get segmentSpread():Boolean public function set segmentSpread(value:Boolean):void| upAxis | property |
upAxis:Vector3DThe up axis to which duplicated objects' Y axis will be oriented.
public function get upAxis():Vector3D public function set upAxis(value:Vector3D):void| 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.
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.
|
| build | () | method |
public function build():voidTriggers the generation
| clearData | () | method |
public function clearData(destroyCachedMeshes:Boolean):voidParameters
destroyCachedMeshes:Boolean |