Packageaway3d.tools
Classpublic class Merge
InheritanceMerge Inheritance Object

Class Merge merges two meshes into one.Merge



Public Properties
 PropertyDefined By
  keepmaterial : Boolean
[write-only] Defines if mesh2 will be merged using its own material information.
Merge
  keepMaterial : Boolean
[read-only]
Merge
  objectspace : Boolean
Defines if mesh2 is merged using its objectspace.
Merge
  unicgeometry : Boolean
Defines if mesh2 will be merged using new instances of UV's and Vertexes or shared from mesh1.
Merge
Public Methods
 MethodDefined By
  
Merge(objectspace:Boolean = true, unicgeometry:Boolean = false, keepMaterial:Boolean = false)
Merge
  
apply(mesh1:Mesh, mesh2:Mesh):void
Merges two meshes into one.
Merge
Property Detail
keepmaterialproperty
keepmaterial:Boolean  [write-only]

Defines if mesh2 will be merged using its own material information.


Implementation
    public function set keepmaterial(value:Boolean):void
keepMaterialproperty 
keepMaterial:Boolean  [read-only]


Implementation
    public function get keepMaterial():Boolean
objectspaceproperty 
objectspace:Boolean

Defines if mesh2 is merged using its objectspace.


Implementation
    public function get objectspace():Boolean
    public function set objectspace(value:Boolean):void
unicgeometryproperty 
unicgeometry:Boolean

Defines if mesh2 will be merged using new instances of UV's and Vertexes or shared from mesh1.


Implementation
    public function get unicgeometry():Boolean
    public function set unicgeometry(value:Boolean):void
Constructor Detail
Merge()Constructor
public function Merge(objectspace:Boolean = true, unicgeometry:Boolean = false, keepMaterial:Boolean = false)

Parameters
objectspace:Boolean (default = true) — [optional] Boolean. Defines if mesh2 is merge using its objectspace or worldspace. Default is true.
 
unicgeometry:Boolean (default = false) — [optional] Boolean. Defines if the receiver object must generate new vertexes, uv's or uses mesh2's. Default is false.
 
keepMaterial:Boolean (default = false) — [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####
Method Detail
apply()method
public function apply(mesh1:Mesh, mesh2:Mesh):void

Merges two meshes into one.

Parameters

mesh1:Mesh — Mesh. The receiver object that will hold both meshes information.
 
mesh2:Mesh — Mesh. The Mesh object to be merge with mesh1.