Packageaway3d.tools
Classpublic class Mirror
InheritanceMirror Inheritance Object

Class Mirror an Object3D geometry and its uv's.Mirror



Public Methods
 MethodDefined By
  
apply(object3d:Object3D, axe:String, recenter:Boolean = true, duplicate:Boolean = true, keepUniqueMapping:Boolean = false, doubleMap:Boolean = false):void
[static] Mirrors an Object3D Mesh object geometry and uv's
Mirror
Method Detail
apply()method
public static function apply(object3d:Object3D, axe:String, recenter:Boolean = true, duplicate:Boolean = true, keepUniqueMapping:Boolean = false, doubleMap:Boolean = false):void

Mirrors an Object3D Mesh object geometry and uv's

Parameters

object3d:Object3D — The Object3D, ObjectContainer3D are parsed recurvely as well.
 
axe:String — A string "x-", "x+", "x", "y-", "y+", "y", "z-", "z+", "z". "x", "y","z" mirrors on world position 0,0,0, the + mirrors geometry in positive direction, the - mirrors geometry in positive direction.
 
recenter:Boolean (default = true) — [optional] Recenter the Object3D pivot. This doesn't affect ObjectContainers3D's. Default is true.
 
duplicate:Boolean (default = true) — [optional] Duplicate model geometry along the axe or set to false mirror but do not duplicate. Default is true. Note that if duplicate is set to false, the mesh vertices must be unique. See tools.Explode class. If not Mirroring can be applied multiple times to same Vertex object.
 
keepUniqueMapping:Boolean (default = false) — [optional] If duplicate is true, ensure that that new geoemtry gets unique uv's. original and duplicate geometry will take respectively .5 of the map. Default = false.
 
doubleMap:Boolean (default = false) — If both duplicate and keepUniqueMapping are true and the mesh passed has a material of type BitmapMaterial. map ios doubled in size to keep ratio 1/1 for the resulting mesh. Default = false. When doubleMap is applied, original map is not disposed, but the new map is applied to mesh material. Access bitmapMaterial.bitmap after to mirroring to retreive the new map.