| Package | away3d.tools |
| Class | public class MeshHelper |
| Inheritance | MeshHelper Object |
MeshHelper
A series of methods usually usefull for mesh manipulations
| Method | Defined By | ||
|---|---|---|---|
applyPosition(mesh:Mesh, dx:Number, dy:Number, dz:Number):void [static]
Applys an offset to a mesh at vertices level
| MeshHelper | ||
applyRotations(mesh:Mesh):void [static]
Applys the rotation values of a mesh in object space and resets rotations to zero. | MeshHelper | ||
boundingRadius(mesh:Mesh):Number [static]
Returns the boundingRadius of an Entity of a Mesh. | MeshHelper | ||
boundingRadiusContainer(container:ObjectContainer3D):Number [static]
Returns the boundingRadius of a ObjectContainer3D
| MeshHelper | ||
build(vertices:Vector.<Number>, indices:Vector.<uint>, uvs:Vector.<Number> = null, name:String, material:MaterialBase = null, shareVertices:Boolean = true, useDefaultMap:Boolean = true):Mesh [static]
Build a Mesh from Vectors
| MeshHelper | ||
[static]
Duplicates a Mesh
| MeshHelper | ||
invertContainerFaces(obj:ObjectContainer3D):void [static]
Inverts the faces of all the Meshes into an ObjectContainer3D
| MeshHelper | ||
invertFaces(mesh:Mesh):void [static]
Inverts the faces of a Mesh
| MeshHelper | ||
[static]
Recenter geometry, (its pivot is at center of geometry)
| MeshHelper | ||
| applyPosition | () | method |
public static function applyPosition(mesh:Mesh, dx:Number, dy:Number, dz:Number):voidApplys an offset to a mesh at vertices level
Parameters
mesh:Mesh — Mesh. The Mesh to offset
| |
dx:Number — Number. The offset along the x axis
| |
dy:Number — Number. The offset along the y axis
| |
dz:Number — Number. The offset along the z axis
|
| applyRotations | () | method |
public static function applyRotations(mesh:Mesh):voidApplys the rotation values of a mesh in object space and resets rotations to zero.
Parameters
mesh:Mesh — Mesh. The Mesh to alter
|
| boundingRadius | () | method |
public static function boundingRadius(mesh:Mesh):NumberReturns the boundingRadius of an Entity of a Mesh.
Parameters
mesh:Mesh — Mesh. The mesh to get the boundingRadius from.
|
Number |
| boundingRadiusContainer | () | method |
public static function boundingRadiusContainer(container:ObjectContainer3D):NumberReturns the boundingRadius of a ObjectContainer3D
Parameters
container:ObjectContainer3D — ObjectContainer3D. The ObjectContainer3D and its children to get the boundingRadius from.
|
Number |
| build | () | method |
public static function build(vertices:Vector.<Number>, indices:Vector.<uint>, uvs:Vector.<Number> = null, name:String, material:MaterialBase = null, shareVertices:Boolean = true, useDefaultMap:Boolean = true):MeshBuild a Mesh from Vectors
Parameters
vertices:Vector.<Number> — Vector.<Number>. The vertices Vector.<Number>, must hold a multiple of 3 numbers.
| |
indices:Vector.<uint> — Vector.<uint>. The indices Vector.<uint>, holding the face order
| |
uvs:Vector.<Number> (default = null) — [optional] Vector.<Number>. The uvs Vector, must hold a series of numbers of (vertices.length/3 2) entries. If none is set, default uv's are applied
if no uv's are defined, default uv mapping is set.
| |
name:String — [optional] String. new name for the generated mesh. Default = "";
| |
material:MaterialBase (default = null) — [optional] MaterialBase. new name for the duplicated mesh. Default = null;
| |
shareVertices:Boolean (default = true) — [optional] Boolean. Defines if the vertices are shared or not. When true surface gets a smoother appearance when exposed to light. Default = true;
| |
useDefaultMap:Boolean (default = true) — [optional] Boolean. Defines if the mesh receives the default engine map if no material is passes. Default = true;
|
Mesh |
| duplicate | () | method |
public static function duplicate(mesh:Mesh, newName:String):MeshDuplicates a Mesh
Parameters
mesh:Mesh — Mesh. The mesh to duplicate
| |
newName:String — [optional] String. new name for the duplicated mesh. Default = "";
|
Mesh |
| invertContainerFaces | () | method |
public static function invertContainerFaces(obj:ObjectContainer3D):voidInverts the faces of all the Meshes into an ObjectContainer3D
Parameters
obj:ObjectContainer3D — ObjectContainer3D. The ObjectContainer3D to invert.
|
| invertFaces | () | method |
public static function invertFaces(mesh:Mesh):voidInverts the faces of a Mesh
Parameters
mesh:Mesh — Mesh. The Mesh to invert.
|
| recenter | () | method |
public static function recenter(mesh:Mesh):voidRecenter geometry, (its pivot is at center of geometry)
Parameters
mesh:Mesh — Mesh. The Mesh to offset
|