Class Merge merges two meshes into one.
Merge
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
unicgeometry:Boolean
[read-write]Implementation
public function get unicgeometry():Boolean
public function set unicgeometry(value:Boolean):void
public function Merge(objectspace:Boolean = true, unicgeometry:Boolean = false, keepMaterial:Boolean = false)
Parameters
| objectspace:Boolean (default = true ) — objectspace [optional] Boolean. Defines if mesh2 is merge using its objectspace or worldspace. Default is true.
|
|
| unicgeometry:Boolean (default = false ) — unicgeometry [optional] Boolean. Defines if the receiver object must generate new vertexes, uv's or uses mesh2's. Default is false.
|
|
| keepMaterial:Boolean (default = false ) — keepMaterial [optional] Boolean. Defines if the receiver object must use the mesh2 material information. If false the merge information from mesh2 gets the mesh1 material. Default is false.
If keepMaterial is set to false, mesh2 receives mesh1 material, code assumes the material is not applied at faces level. Instead mesh1 material needs to applied as mesh.material = somematerial;
If set to true. mesh2 can have multiple materials at face level or applied as single material. Face material will get then priority if both case is found.
|
Init Parameters
public function apply(mesh1:Mesh, mesh2:Mesh):void
Merges two 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.
|