Class Merge merges two or more static meshes into one.Merge

Constructor

@:value({ objectSpace : false, disposeSources : false, keepMaterial : false })new(keepMaterial:Bool = false, disposeSources:Bool = false, objectSpace:Bool = false)

Parameters:

keepMaterial

[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

[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

[optional] Determines if source mesh(es) is/are merged using objectSpace or worldspace. Defaults to false.

Variables

Methods

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

The Mesh to receive the merged contents of both meshes.

mesh

The Mesh to be merged with the receiver mesh

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

The Mesh to receive the merged contents of the container.

objectContainer

The ObjectContainer3D holding the meshes to be mergd.

Returns:

The merged Mesh instance.

applyToMeshes(receiver:Mesh, meshes:Vector<Mesh>):Void

Merges all the meshes found in the Vector.<Mesh> into a single Mesh.

Parameters:

receiver

The Mesh to receive the merged contents of the meshes.

meshes

A series of Meshes to be merged with the reciever mesh.

reset():Void