| Package | alternativa.engine3d.objects |
| Class | public class Mesh |
| Inheritance | Mesh Object3D |
| Subclasses | Box, GeoSphere, Plane, Skin, SkyBox, Sphere |
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | alpha : Number = 1 Alpha transparency value.
| Object3D | |
![]() | blendMode : String = "normal" A value from the
flash. | Object3D | |
![]() | boundMaxX : Number = 1e+22 Right bound of object in its space.
| Object3D | |
![]() | boundMaxY : Number = 1e+22 Front bound of object in its space.
| Object3D | |
![]() | boundMaxZ : Number = 1e+22 Top bound of object in its space.
| Object3D | |
![]() | boundMinX : Number = -1e+22 Left bound of object in its space.
| Object3D | |
![]() | boundMinY : Number = -1e+22 Back bound of object in its space.
| Object3D | |
![]() | boundMinZ : Number = -1e+22 Bottom bound of object in its space.
| Object3D | |
| clipping : int = 2 Object clipping mode by camera frustum.
| Mesh | ||
![]() | colorTransform : ColorTransform = null A ColorTransform object containing values that universally adjust the colors in the display object.
| Object3D | |
![]() | concatenatedMatrix : Matrix3D A
Matrix3D object which is the combined result of transformation matrices of object and all its parens. | Object3D | |
![]() | doubleClickEnabled : Boolean = false Specifies whether the object receives
doubleClick events. | Object3D | |
| faces : Vector [read-only] List of face instances.
| Mesh | ||
![]() | filters : Array = null An indexed array that contains each filter object currently associated with the display object.
| Object3D | |
![]() | matrix : Matrix3DMatrix3D object. | Object3D | |
![]() | mouseEnabled : Boolean = true Specifies whether this object receives mouse messages.
| Object3D | |
![]() | name : String Object name.
| Object3D | |
![]() | parent : Object3DContainer
Indicates the Object3DContainer object that contains this display object.
| Object3D | |
![]() | rotationX : Number = 0 Rotation angle by X axis (in radians).
| Object3D | |
![]() | rotationY : Number = 0 Rotation angle by Y axis (in radians).
| Object3D | |
![]() | rotationZ : Number = 0 Rotation angle by Z axis (in radians).
| Object3D | |
![]() | scaleX : Number = 1 Scale by X axis.
| Object3D | |
![]() | scaleY : Number = 1 Scale by Y axis.
| Object3D | |
![]() | scaleZ : Number = 1 Scale by Z axis.
| Object3D | |
| sorting : int = 1 Faces sorting mode.
| Mesh | ||
| threshold : Number = 0.01 Geometrical threshold.
| Mesh | ||
![]() | useHandCursor : Boolean = false Set this property to
true to show "hand" mouse cursor while hovering the object, false otherwise. | Object3D | |
| vertices : Vector [read-only] List of vertices instances.
| Mesh | ||
![]() | visible : Boolean = true Whether or not the display object is visible.
| Object3D | |
![]() | x : Number = 0 X coordinate.
| Object3D | |
![]() | y : Number = 0 Y coordinate.
| Object3D | |
![]() | z : Number = 0 Z coordinate.
| Object3D | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
| Object3D | |
|
Creates and adds new face.
| Mesh | ||
|
Creates and adss face by vertices identifiers.
| Mesh | ||
|
addQuadFace(a:Vertex, b:Vertex, c:Vertex, d:Vertex, material:Material = null, id:Object = null):Face
Creates and adds new quad face.
| Mesh | ||
|
Creates and adds new triangle face.
| Mesh | ||
|
Creates and adds new vertex.
| Mesh | ||
|
addVerticesAndFaces(vertices:Vector, uvs:Vector, indices:Vector, poly:Boolean = false, material:Material = null):void
Creates and adds vertices and faces created of values supplied vectors.
| Mesh | ||
![]() |
calculateBounds():void
Calculates object bounds in its space.
| Object3D | |
|
calculateNormals(normalize:Boolean = true):void
Calculates normals of faces.
| Mesh | ||
|
calculateResolution(textureWidth:int, textureHeight:int, type:int = 1, matrix:Matrix3D = null):Number
Calculates how many units of 3D space correspond to one pixel of texture.
| Mesh | ||
|
Returns an object that is an exact copy of the original object.
| Mesh | ||
|
containsFace(face:Face):Boolean
Checks if there is a face in the object.
| Mesh | ||
|
containsFaceWithId(id:Object):Boolean
Checks if there is a face in the object with indentifier.
| Mesh | ||
|
containsVertex(vertex:Vertex):Boolean
Checks if there is a vertex in the object.
| Mesh | ||
|
containsVertexWithId(id:Object):Boolean
Checks if there is a vertex in the object with indentifier.
| Mesh | ||
![]() |
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| Object3D | |
|
getFaceById(id:Object):Face
Returns face by identifier.
| Mesh | ||
|
getVertexById(id:Object):Vertex
Returns vertex by identifier.
| Mesh | ||
![]() |
globalToLocal(point:Vector3D):Vector3D
Transforms a point from global space to local spce of the object.
| Object3D | |
![]() |
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| Object3D | |
|
intersectRay(origin:Vector3D, direction:Vector3D, exludedObjects:Dictionary = null, camera:Camera3D = null):RayIntersectionData
Searches for the ray intersection.
| Mesh | ||
![]() |
localToGlobal(point:Vector3D):Vector3D
Transforms a point from local space of object to global spce.
| Object3D | |
|
optimizeForDynamicBSP(iterations:int = 1):void
Puts faces in specified sequence to minimize amount of splits in
Sorting. | Mesh | ||
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| Object3D | |
|
Removes face by instance.
| Mesh | ||
|
removeFaceById(id:Object):Face
Removes face by identifier.
| Mesh | ||
|
Removes face by instance.
| Mesh | ||
|
removeVertexById(id:Object):Vertex
Removes vertex by identifier.
| Mesh | ||
|
setMaterialToAllFaces(material:Material):void
Sets material to all faces.
| Mesh | ||
![]() |
toString():String
Returns the string presentation of the specified object.
| Object3D | |
|
weldFaces(angleThreshold:Number = 0, uvThreshold:Number = 0, convexThreshold:Number = 0, pairWeld:Boolean = false):void
Weld neighboring faces which form flat convex.
| Mesh | ||
|
weldVertices(distanceThreshold:Number = 0, uvThreshold:Number = 0):void
Welds vertices with the same coordinates and UV.
| Mesh | ||
![]() |
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| Object3D | |
| Method | Defined by | ||
|---|---|---|---|
|
clonePropertiesFrom(source:Object3D):void
Copies the base properties.
| Mesh | ||
| clipping | property |
public var clipping:int = 2Object clipping mode by camera frustum. You can use following constants of Clipping class: Clipping.BOUND_CULLING, Clipping.FACE_CULLING, Clipping.FACE_CLIPPING. Default value is Clipping.FACE_CLIPPING.
See also
| faces | property |
faces:Vector [read-only]List of face instances.
Implementation public function get faces():Vector
See also
| sorting | property |
public var sorting:int = 1Faces sorting mode. You can use the following constants to set sorting property: Sorting.NONE, Sorting.AVERAGE_Z, Sorting.DYNAMIC_BSP. Default value is Sorting.AVERAGE_Z.
See also
| threshold | property |
public var threshold:Number = 0.01Geometrical threshold. It is small quantity where it is possible not to take into account values difference. It is used for temporary BSP-tree building in the Sorting.DYNAMIC_BSP mode. Default value is 0.01.
See also
| vertices | property |
vertices:Vector [read-only]List of vertices instances.
Implementation public function get vertices():Vector
See also
| addFace | () | method |
public function addFace(vertices:Vector, material:Material = null, id:Object = null):FaceCreates and adds new face.
Parametersvertices:Vector — Vector of instances of vertices. |
|
material:Material (default = null) — Material. |
|
id:Object (default = null) — Face identifier. |
Face — New face. |
See also
| addFaceByIds | () | method |
public function addFaceByIds(vertexIds:Array, material:Material = null, id:Object = null):FaceCreates and adss face by vertices identifiers.
ParametersvertexIds:Array — Vertices identifiers array. |
|
material:Material (default = null) — Material. |
|
id:Object (default = null) — Face identifier. |
Face — New face. |
See also
| addQuadFace | () | method |
public function addQuadFace(a:Vertex, b:Vertex, c:Vertex, d:Vertex, material:Material = null, id:Object = null):FaceCreates and adds new quad face.
Parametersa:Vertex — Vertex. |
|
b:Vertex — Vertex. |
|
c:Vertex — Vertex. |
|
d:Vertex — Vertex. |
|
material:Material (default = null) — Material. |
|
id:Object (default = null) — Face identifier. |
Face — New face. |
See also
| addTriFace | () | method |
public function addTriFace(a:Vertex, b:Vertex, c:Vertex, material:Material = null, id:Object = null):FaceCreates and adds new triangle face.
Parametersa:Vertex — Vertex. |
|
b:Vertex — Vertex. |
|
c:Vertex — Vertex. |
|
material:Material (default = null) — Material. |
|
id:Object (default = null) — Face identifier. |
Face — New face. |
See also
| addVertex | () | method |
public function addVertex(x:Number, y:Number, z:Number, u:Number = 0, v:Number = 0, id:Object = null):VertexCreates and adds new vertex.
Parametersx:Number — X coordinate. |
|
y:Number — Y coordinate. |
|
z:Number — Z coordinate. |
|
u:Number (default = 0) — U texture coordinate. |
|
v:Number (default = 0) — V texture coordinate. |
|
id:Object (default = null) — Vertex identifier. |
Vertex — New vertex. |
See also
| addVerticesAndFaces | () | method |
public function addVerticesAndFaces(vertices:Vector, uvs:Vector, indices:Vector, poly:Boolean = false, material:Material = null):voidCreates and adds vertices and faces created of values supplied vectors.
Parametersvertices:Vector — Vertices coordinates vector. Vertices coordinates are represented as x1, y1, z1, x2, y2, z2 and so on. |
|
uvs:Vector — Texture coordinates vector corresponding to vertices vector. Texture coordinates are represented as u1, v1, u2, v2 and so on. |
|
indices:Vector — Vector of indices. |
|
poly:Boolean (default = false) — Option for faces presentation as triangles or polygons. If false then indices will be interpreted as sequence of triangles, i.e. 1,2,3,4,3,2. If true then indices will be interpreted as sequence of polygons with amount of vertices indication, i.e. 3, 1,2,3, 4, 5,4,3,2. |
|
material:Material (default = null) — Material for all faces. |
See also
| calculateNormals | () | method |
public function calculateNormals(normalize:Boolean = true):voidCalculates normals of faces.
Parametersnormalize:Boolean (default = true) — Normalization option. If true, then lengths of normals will be equal to one. |
See also
| calculateResolution | () | method |
public override function calculateResolution(textureWidth:int, textureHeight:int, type:int = 1, matrix:Matrix3D = null):NumberCalculates how many units of 3D space correspond to one pixel of texture. It is useful for mipmapping.
ParameterstextureWidth:int — Texture width. |
|
textureHeight:int — Texture height. |
|
type:int (default = 1) — Calculation method: 0 - by first edge, 1 - average value, 2 - max value, 3 - min value. |
|
matrix:Matrix3D (default = null) — Transformation matrix. |
Number — Resolution. |
| clone | () | method |
public override function clone():Object3DReturns an object that is an exact copy of the original object.
ReturnsObject3D — Original object clone. |
| clonePropertiesFrom | () | method |
protected override function clonePropertiesFrom(source:Object3D):voidCopies the base properties.
Parameterssource:Object3D — Source object. |
| containsFace | () | method |
public function containsFace(face:Face):BooleanChecks if there is a face in the object.
Parametersface:Face — Face. |
Boolean — true, if there is a face in the object; false otherwise. |
See also
| containsFaceWithId | () | method |
public function containsFaceWithId(id:Object):BooleanChecks if there is a face in the object with indentifier.
Parametersid:Object — Identifier. |
Boolean — true, if there is a face in the object; false otherwise. |
See also
| containsVertex | () | method |
public function containsVertex(vertex:Vertex):BooleanChecks if there is a vertex in the object.
Parametersvertex:Vertex — Vertex. |
Boolean — true, if there is a vertex in the object; false otherwise. |
See also
| containsVertexWithId | () | method |
public function containsVertexWithId(id:Object):BooleanChecks if there is a vertex in the object with indentifier.
Parametersid:Object — Identifier. |
Boolean — true, if there is a vertex in the object; false otherwise. |
See also
| getFaceById | () | method |
public function getFaceById(id:Object):FaceReturns face by identifier.
Parametersid:Object — Identifier. |
Face — Face. |
See also
| getVertexById | () | method |
public function getVertexById(id:Object):VertexReturns vertex by identifier.
Parametersid:Object — Identifier. |
Vertex — Vertex. |
See also
| intersectRay | () | method |
public override function intersectRay(origin:Vector3D, direction:Vector3D, exludedObjects:Dictionary = null, camera:Camera3D = null):RayIntersectionDataSearches for the ray intersection.
Parametersorigin:Vector3D — Ray origin. |
|
direction:Vector3D — Ray direction. |
|
exludedObjects:Dictionary (default = null) — The objects that are keys of this dictionary will be exluded from intersection test. |
|
camera:Camera3D (default = null) — The camera for Sprite3D objects intersection test. |
RayIntersectionData — Intersection test result - RayIntersectionData object. If there is no intersection the value of null will be returned. |
| optimizeForDynamicBSP | () | method |
public function optimizeForDynamicBSP(iterations:int = 1):voidPuts faces in specified sequence to minimize amount of splits in Sorting.DYNAMIC_BSP mode.
iterations:int (default = 1) — Analysis quality option. |
See also
| removeFace | () | method |
public function removeFace(face:Face):FaceRemoves face by instance.
Parametersface:Face — Face. |
Face — Removable face. |
See also
| removeFaceById | () | method |
public function removeFaceById(id:Object):FaceRemoves face by identifier.
Parametersid:Object — Identifier. |
Face — Removable face. |
See also
| removeVertex | () | method |
public function removeVertex(vertex:Vertex):VertexRemoves face by instance.
Parametersvertex:Vertex — Vertex. |
Vertex — Removable vertex. |
See also
| removeVertexById | () | method |
public function removeVertexById(id:Object):VertexRemoves vertex by identifier.
Parametersid:Object — Identifier. |
Vertex — Removable vertex. |
See also
| setMaterialToAllFaces | () | method |
public function setMaterialToAllFaces(material:Material):voidSets material to all faces.
Parametersmaterial:Material — Material. |
See also
| weldFaces | () | method |
public function weldFaces(angleThreshold:Number = 0, uvThreshold:Number = 0, convexThreshold:Number = 0, pairWeld:Boolean = false):voidWeld neighboring faces which form flat convex. Faces get new digital identifiers after the welding. weldFaces() should be called after weldVertices().
angleThreshold:Number (default = 0) — Acceptable angle between normals of welding neighboring faces. |
|
uvThreshold:Number (default = 0) — Acceptable treshold of uv-coordinates to connect welding faces through UV. |
|
convexThreshold:Number (default = 0) — Quantity that reduce acceptable angle between allied edges of welding faces. |
|
pairWeld:Boolean (default = false) — Option of welding by pairs. |
See also
| weldVertices | () | method |
public function weldVertices(distanceThreshold:Number = 0, uvThreshold:Number = 0):voidWelds vertices with the same coordinates and UV. Coordinates equality is checked taking into account the treshold. Vertices get new digital identifiers after the welding. weldVertices() should be called before weldFaces().
distanceThreshold:Number (default = 0) — Acceptable coordinates difference. |
|
uvThreshold:Number (default = 0) — Acceptable UV-coordinates difference. |
See also