Package | away3d.tools.commands |
Class | public class Merge |
Inheritance | Merge Object |
Merge
Property | Defined By | ||
---|---|---|---|
disposeSources : Boolean
Determines if the mesh and geometry source(s) used for the merging are disposed. | Merge | ||
keepMaterial : Boolean
Determines if the material source(s) used for the merging are disposed. | Merge | ||
objectSpace : Boolean
Determines if source mesh(es) is/are merged using objectSpace or worldspace. | Merge |
Method | Defined By | ||
---|---|---|---|
Merge(keepMaterial:Boolean = false, disposeSources:Boolean = false, objectSpace:Boolean = false) | Merge | ||
Merges 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
Determines if the mesh and geometry source(s) used for the merging are disposed. Defaults to false.
public function get disposeSources():Boolean
public function set disposeSources(value:Boolean):void
keepMaterial | property |
keepMaterial:Boolean
Determines if the material source(s) used for the merging are disposed. Defaults to false.
public function get keepMaterial():Boolean
public function set keepMaterial(value:Boolean):void
objectSpace | property |
objectSpace:Boolean
Determines if source mesh(es) is/are merged using objectSpace or worldspace. Defaults to false.
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] Determines if the merged object uses the recevier mesh material information or keeps its source material(s). Defaults to false.
If false and receiver object has multiple materials, the last material found in receiver submeshes is applied to the merged submesh(es).
| |
disposeSources:Boolean (default = false ) — [optional] Determines if the mesh and geometry source(s) used for the merging are disposed. Defaults to false.
If true, only receiver geometry and resulting mesh are kept in memory.
| |
objectSpace:Boolean (default = false ) — [optional] Determines if source mesh(es) is/are merged using objectSpace or worldspace. Defaults to false.
|
apply | () | method |
public function apply(receiver:Mesh, mesh:Mesh):void
Merges 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 to receive the merged contents of both meshes.
| |
mesh:Mesh — The Mesh to 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 to receive the merged contents of the container.
| |
objectContainer:ObjectContainer3D — The ObjectContainer3D holding the meshes to be mergd.
|
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 to receive the merged contents of the meshes.
| |
meshes:Vector.<Mesh> — A series of Meshes to be merged with the reciever mesh.
|