Class Aligns an arrays of Object3Ds, Vector3D's or Vertexes compaired to each other.Align

Static variables

@:value("av")staticinlineread onlyAVERAGE:String = "av"

@:value("-")staticinlineread onlyNEGATIVE:String = "-"

@:value("+")staticinlineread onlyPOSITIVE:String = "+"

@:value("x")staticinlineread onlyX_AXIS:String = "x"

@:value("y")staticinlineread onlyY_AXIS:String = "y"

@:value("z")staticinlineread onlyZ_AXIS:String = "z"

Static methods

@:value({ condition : "" })staticalign(aObjs:Array<Dynamic>, axis:String, condition:String = ""):Void

Applies to array elements the alignment according to axis, x, y or z and a condition. each element must have public x,y and z properties. In case elements are meshes only their positions is affected. Method doesn't take in account their respective bounds String condition: "+" align to highest value on a given axis "-" align to lowest value on a given axis "" align to a given axis on 0; This is the default. "av" align to average of all values on a given axis

Parameters:

aObjs

Array. An array with elements with x,y and z public properties such as Mesh, Object3D, ObjectContainer3D,Vector3D or Vertex

axis

String. Represent the axis to align on.

condition

[optional]. String. Can be '+", "-", "av" or "", Default is "", aligns to given axis at 0.

@:value({ condition : POSITIVE })staticalignMeshes(meshes:Vector<Mesh>, axis:String, condition:String = POSITIVE):Void

Aligns a series of meshes to their bounds along a given axis.

Parameters:

meshes

A Vector of Mesh objects

axis

Represent the axis to align on.

condition

Can be POSITIVE ('+') or NEGATIVE ('-'), Default is POSITIVE ('+')

staticalignToFloor(meshes:Vector<Mesh>):Void

Place one or more meshes at y 0 using their min bounds

staticdistribute(aObjs:Array<Dynamic>, axis:String):Void

Applies to array elements a distributed alignment according to axis, x,y or z. In case elements are meshes only their positions is affected. Method doesn't take in account their respective bounds each element must have public x,y and z properties

Parameters:

aObjs

Array. An array with elements with x,y and z public properties such as Mesh, Object3D, ObjectContainer3D,Vector3D or Vertex

axis

String. Represent the axis to align on.