Packageaway3d.tools
Classpublic class Mirror

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 — object3d The Object3D, ObjectContainer3D are parsed recurvely as well.
 
axe:String — axe 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) — recenter [optional] Recenter the Object3D pivot. This doesn't affect ObjectContainers3D's. Default is true.
 
duplicate:Boolean (default = true) — duplicate [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) — keepUniqueMapping [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) — doubleMap 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.
Wiki link
Click to go to the wiki page for 'away3d.tools.Mirror'

Code examples

Comments