Class Merge merges two or more meshes into one.
Merge
Doesn't support Animation Merging (yet)
disposeSources:Boolean
[read-write]Implementation
public function get disposeSources():Boolean
public function set disposeSources(value:Boolean):void
keepmaterial:Boolean
[write-only]
Defines if mesh2 will be merged using its own material information.
Implementation
public function set keepmaterial(value:Boolean):void
keepMaterial:Boolean
[read-only]Implementation
public function get keepMaterial():Boolean
objectspace:Boolean
[read-write]Implementation
public function get objectspace():Boolean
public function set objectspace(value:Boolean):void
public function Merge(objectspace:Boolean = false, keepMaterial:Boolean = false, disposeSources:Boolean = false)
Parameters
| objectspace:Boolean (default = false ) — objectspace [optional] Boolean. Defines if mesh2 is merge using its objectspace or worldspace. Default is false.
|
|
| keepMaterial:Boolean (default = false ) — keepMaterial [optional] Boolean. Defines if the merged object uses the mesh1 material information or keeps its material(s). Default is false.
If set to false and reciever object has multiple materials, the last material found in mesh1 submeshes is applied to mesh2 submeshes.
|
|
| disposeSources:Boolean (default = false ) — disposeSources [optional] Boolean. Defines if mesh2 (or sources meshes in case applyToContainer is used) are kept untouched or disposed. Default is false.
If keepMaterial is true, only geometry and eventual ObjectContainers3D are cleared from memory.
|
Init Parameters
public function apply(mesh1:Mesh, mesh2:Mesh):void
Merge 2 meshes into one
Parameters
| mesh1:Mesh — mesh1 Mesh. The receiver object that will hold both meshes information.
|
|
| mesh2:Mesh — mesh2 Mesh. The Mesh object to be merge with mesh1.
|
public function applyToContainer(object:ObjectContainer3D):Mesh
Merges all the children of a container as one single Mesh.
The first Mesh child encountered becomes the reciever. This is mesh that is returned.
If no Mesh object is found, class returns null.
Parameters
Returns
| Mesh —
The merged Mesh instance
|