Package | away3d.tools |
Class | public class Merge |
Inheritance | Merge Object |
Merge
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
Merge(objectspace:Boolean = true, unicgeometry:Boolean = false, keepMaterial:Boolean = false) | Merge | ||
Merges two meshes into one. | Merge |
keepmaterial | property |
keepmaterial:Boolean
[write-only] Defines if mesh2 will be merged using its own material information.
public function set keepmaterial(value:Boolean):void
keepMaterial | property |
keepMaterial:Boolean
[read-only] public function get keepMaterial():Boolean
objectspace | property |
objectspace:Boolean
Defines if mesh2 is merged using its objectspace.
public function get objectspace():Boolean
public function set objectspace(value:Boolean):void
unicgeometry | property |
unicgeometry:Boolean
Defines if mesh2 will be merged using new instances of UV's and Vertexes or shared from mesh1.
public function get unicgeometry():Boolean
public function set unicgeometry(value:Boolean):void
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.
|
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.
|