Package | away3d.tools |
Class | public class Grid |
Inheritance | Grid Object |
Grid
Property | Defined By | ||
---|---|---|---|
objectSpace : Boolean
Defines if the grid unit is applied in objectspace or worldspace. | Grid | ||
unit : Number
Defines if the grid unit. | Grid |
Method | Defined By | ||
---|---|---|---|
Grid(unit:Number = 1, objectSpace:Boolean = false)
Grid snaps vertexes according to a given grid unit
| Grid | ||
snapObject(object3d:Object3D, dovert:Boolean = false):void
Apply the grid code to a given object3D. | Grid | ||
snapVertices(vertices:Vector.<Vertex>):void
Apply the grid code to a given set of vertexes. | Grid |
objectSpace | property |
objectSpace:Boolean
Defines if the grid unit is applied in objectspace or worldspace. In worldspace, objects positions are affected.
public function get objectSpace():Boolean
public function set objectSpace(value:Boolean):void
unit | property |
unit:Number
Defines if the grid unit.
public function get unit():Number
public function set unit(value:Number):void
Grid | () | Constructor |
public function Grid(unit:Number = 1, objectSpace:Boolean = false)
Grid snaps vertexes according to a given grid unit
Parametersunit:Number (default = 1 ) — [optional] Number. The grid unit. Default is 1.
| |
objectSpace:Boolean (default = false ) — [optional] Boolean. Apply only to vertexes in geometry objectspace when Object3D are considered. Default is false.
|
snapObject | () | method |
public function snapObject(object3d:Object3D, dovert:Boolean = false):void
Apply the grid code to a given object3D. If type ObjectContainer3D, all children Mesh vertices will be affected.
Parameters
object3d:Object3D — Object3D. The Object3d to snap to grid.
| |
dovert:Boolean (default = false ) — [optional]. If the vertices must be handled or not. When false only object position is snapped to grid. Default is false.
|
snapVertices | () | method |
public function snapVertices(vertices:Vector.<Vertex>):void
Apply the grid code to a given set of vertexes.
Parameters
vertices:Vector.<Vertex> — Array. An array of Vertex objects
|