Package | away3d.tools.commands |
Class | public class Merge |
Inheritance | Merge ![]() |
Merge
Property | Defined By | ||
---|---|---|---|
disposeSources : Boolean
Defines if the mesh(es) sources used for the merging are kept or disposed. | Merge | ||
keepMaterial : Boolean
Defines if mesh2 will be merged using its own material information. | Merge | ||
objectSpace : Boolean
Defines if mesh2 is merged using its objectSpace. | Merge |
Method | Defined By | ||
---|---|---|---|
Merge(keepMaterial:Boolean = false, disposeSources:Boolean = false, objectSpace:Boolean = false) | Merge | ||
Merge 2 meshes into one. | Merge | ||
Merges all the children of a container into a single Mesh. | Merge | ||
Merges all the meshes found in the Vector.<Mesh> into a single Mesh. | Merge |
disposeSources | property |
disposeSources:Boolean
Defines if the mesh(es) sources used for the merging are kept or disposed.
public function get disposeSources():Boolean
public function set disposeSources(value:Boolean):void
keepMaterial | property |
keepMaterial:Boolean
Defines if mesh2 will be merged using its own material information.
public function get keepMaterial():Boolean
public function set keepMaterial(value:Boolean):void
objectSpace | property |
objectSpace:Boolean
Defines if mesh2 is merged using its objectSpace.
public function get objectSpace():Boolean
public function set objectSpace(value:Boolean):void
Merge | () | Constructor |
public function Merge(keepMaterial:Boolean = false, disposeSources:Boolean = false, objectSpace:Boolean = false)
Parameters
keepMaterial:Boolean (default = false ) — [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 receiver object has multiple materials, the last material found in mesh1 submeshes is applied to mesh2 submeshes.
| |
disposeSources:Boolean (default = false ) — [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.
| |
objectSpace:Boolean (default = false ) — [optional] Boolean. Defines if mesh2 is merge using its objectSpace or worldspace. Default is false.
|
apply | () | method |
public function apply(receiver:Mesh, mesh:Mesh):void
Merge 2 meshes into one. It is recommand to use apply when 2 meshes are to be merged. If more need to be merged, use either applyToMeshes or applyToContainer methods.
Parameters
receiver:Mesh — The Mesh that will receive the merged contents of both meshes.
| |
mesh:Mesh — The Mesh that will be merged with the receiver mesh
|
applyToContainer | () | method |
public function applyToContainer(receiver:Mesh, objectContainer:ObjectContainer3D):void
Merges all the children of a container into a single Mesh. If no Mesh object is found, method returns the receiver without modification.
Parameters
receiver:Mesh — The Mesh that will receive the merged contents of the container.
| |
objectContainer:ObjectContainer3D — The ObjectContainer3D holding meshes to merge as one mesh.
|
applyToMeshes | () | method |
public function applyToMeshes(receiver:Mesh, meshes:Vector.<Mesh>):void
Merges all the meshes found in the Vector.<Mesh> into a single Mesh.
Parameters
receiver:Mesh — The Mesh that will receive the merged contents of the meshes.
| |
meshes:Vector.<Mesh> — Vector.<Mesh>. A series of Meshes to be merged with the reciever mesh.
|