class Mesh
package away3d.entities
extends Entity › ObjectContainer3D › Object3D › NamedAssetBase
implements IAsset, IMaterialOwner
extended by Trident, DelaunayMesh, Elevation, LatheExtrude, LinearExtrude, PathExtrude, SkinExtrude, TextField
Available on all platforms
Mesh is an instance of a Geometry, augmenting it with a presence in the scene graph, a material, and an animation state. It consists out of SubMeshes, which in turn correspond to SubGeometries. SubMeshes allow different parts of the geometry to be assigned different materials.
Constructor
new(geometry:Geometry, ?material:MaterialBase)
Create a new Mesh object.
Parameters:
geometry | The geometry used by the mesh that provides it with its shape. |
|---|---|
material | [optional] The material with which to render the Mesh. |
Variables
Methods
clearAnimationGeometry():Void
Clears the animation geometry of this mesh. It will cause animation to generate a new animation geometry. Work only when shareAnimationGeometry is false.
clone():Mesh
Clones this Mesh instance along with all it's children, while re-using the same material, geometry and animation set. The returned result will be a copy of this mesh, containing copies of all of it's children.
Properties that are re-used (i.e. not cloned) by the new copy include name, geometry, and material. Properties that are cloned or created anew for the copy include subMeshes, children of the mesh, and the animator.
If you want to copy just the mesh, reusing it's geometry and material while not cloning it's children, the simplest way is to create a new mesh manually:
var clone : Mesh = new Mesh(original.geometry, original.material);
disposeWithAnimatorAndChildren():Void
Disposes mesh including the animator and children. This is a merely a convenience method. @return