| Package | away3d.core.base |
| Class | public class Face |
| Inheritance | Face Element flash.events.EventDispatcher |
See also
| Property | Defined By | ||
|---|---|---|---|
| area : Number [read-only]
Returns the calculated 2 dimensional area of the face. | Face | ||
| back : Material
Defines the optional back material of the face. | Face | ||
| bitmapRect : Rectangle | Face | ||
![]() | commands : Vector.<String> [read-only]
Returns an array of drawing command strings that make up the 3d element. | Element | |
![]() | extra : Object
An optional untyped object that can contain used-defined properties. | Element | |
| faceVO : FaceVO | Face | ||
| isBack : Boolean | Face | ||
| material : Material
Defines the material of the face. | Face | ||
| maxX : Number [override] [read-only]
Returns the maximum x value of the face
| Face | ||
| maxY : Number [override] [read-only]
Returns the maximum y value of the face
| Face | ||
| maxZ : Number [override] [read-only]
Returns the maximum zx value of the face
| Face | ||
| minX : Number [override] [read-only]
Returns the minimum x value of the face
| Face | ||
| minY : Number [override] [read-only]
Returns the minimum y value of the face
| Face | ||
| minZ : Number [override] [read-only]
Returns the minimum z value of the face
| Face | ||
| normal : Vector3D [read-only]
Returns the normal vector of the face. | Face | ||
| normalDirty : Boolean [write-only]
Forces the recalculation of the face normal
| Face | ||
![]() | parent : Geometry
Defines the parent 3d object of the segment. | Element | |
![]() | pathCommands : Array [read-only]
Returns an array of drawing command objects that are used by the face. | Element | |
| plane : Plane3D [read-only]
used in BSP
| Face | ||
| radius2 : Number [override] [read-only]
Returns the squared bounding radius of the face. | Face | ||
| uv0 : UV
Defines the uv0 coordinate of the face. | Face | ||
| uv1 : UV
Defines the uv1 coordinate of the face. | Face | ||
| uv2 : UV
Defines the uv2 coordinate of the face. | Face | ||
| uvs : Vector.<UV> [read-only]
Returns an array of uv objects that are used by the face. | Face | ||
| v0 : Vertex
Defines the v0 vertex of the face. | Face | ||
| v1 : Vertex
Defines the v1 vertex of the face. | Face | ||
| v2 : Vertex
Defines the v2 vertex of the face. | Face | ||
![]() | vertexDirty : Boolean | Element | |
![]() | vertices : Vector.<Vertex> [read-only]
Returns an array of vertex objects that make up the 3d element. | Element | |
![]() | visible : Boolean
Determines whether the 3d element is visible in the scene. | Element | |
| Method | Defined By | ||
|---|---|---|---|
Face(v0:Vertex = null, v1:Vertex = null, v2:Vertex = null, material:Material = null, uv0:UV = null, uv1:UV = null, uv2:UV = null)
Creates a new Face object. | Face | ||
![]() | addOnMappingChange(listener:Function):void
Default method for adding a mappingchanged event listener
| Element | |
![]() | addOnVertexChange(listener:Function):void
Default method for adding a vertexchanged event listener
| Element | |
![]() | addOnVertexValueChange(listener:Function):void
Default method for adding a vertexvaluechanged event listener
| Element | |
![]() | addOnVisibleChange(listener:Function):void
Default method for adding a visiblechanged event listener
| Element | |
Produces a clone of the face. | Face | ||
curveTo(cx:Number, cy:Number, cz:Number, ex:Number, ey:Number, ez:Number):void | Face | ||
hasEdgeOnPlane(plane:Plane3D, epsilon:Number = 0.001):Boolean
Tests if an edge of the face lies on a given plane
| Face | ||
invert():void
Inverts the geometry of the face object by swapping the v1, v2 and uv1, uv2 points. | Face | ||
lineTo(x:Number, y:Number, z:Number):void | Face | ||
moveTo(x:Number, y:Number, z:Number):void | Face | ||
![]() | offset(x:Number, y:Number, z:Number):void
Offsets the vertices of the face by given amounts in x, y and z. | Element | |
![]() | removeOnMappingChange(listener:Function):void
Default method for removing a mappingchanged event listener
| Element | |
![]() | removeOnVertexChange(listener:Function):void
Default method for removing a vertexchanged event listener
| Element | |
![]() | removeOnVertexValueChange(listener:Function):void
Default method for removing a vertexvaluechanged event listener
| Element | |
![]() | removeOnVisibleChange(listener:Function):void
Default method for removing a visiblechanged event listener
| Element | |
scaleAboutCenter(scale:Number):void
Scales the face by a given factor about its unweighed center. | Face | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the uv mapping of the face changes. | Face | |||
| Dispatched when the material of the face changes. | Face | |||
![]() | Dispatched when the vertex of a 3d element changes. | Element | ||
![]() | Dispatched when the vertex value of a 3d element changes. | Element | ||
![]() | Dispatched when the visiblity of a 3d element changes. | Element | ||
| _plane | property |
arcane var _plane:Plane3D| area | property |
area:Number [read-only] Returns the calculated 2 dimensional area of the face.
public function get area():Number| back | property |
back:MaterialDefines the optional back material of the face. Displays when the face is pointing away from the camera.
public function get back():Material public function set back(value:Material):void| bitmapRect | property |
public var bitmapRect:Rectangle| faceVO | property |
public var faceVO:FaceVO| isBack | property |
public var isBack:Boolean| material | property |
material:MaterialDefines the material of the face.
public function get material():Material public function set material(value:Material):void| maxX | property |
maxX:Number [read-only] [override] Returns the maximum x value of the face
public function get maxX():NumberSee also
| maxY | property |
maxY:Number [read-only] [override] Returns the maximum y value of the face
public function get maxY():NumberSee also
| maxZ | property |
maxZ:Number [read-only] [override] Returns the maximum zx value of the face
public function get maxZ():NumberSee also
| minX | property |
minX:Number [read-only] [override] Returns the minimum x value of the face
public function get minX():NumberSee also
| minY | property |
minY:Number [read-only] [override] Returns the minimum y value of the face
public function get minY():NumberSee also
| minZ | property |
minZ:Number [read-only] [override] Returns the minimum z value of the face
public function get minZ():NumberSee also
| normal | property |
normal:Vector3D [read-only] Returns the normal vector of the face.
public function get normal():Vector3D| normalDirty | property |
normalDirty:Boolean [write-only] Forces the recalculation of the face normal
public function set normalDirty(value:Boolean):void| plane | property |
| radius2 | property |
radius2:Number [read-only] [override] Returns the squared bounding radius of the face.
public function get radius2():Number| uv0 | property |
uv0:UVDefines the uv0 coordinate of the face.
public function get uv0():UV public function set uv0(value:UV):void| uv1 | property |
uv1:UVDefines the uv1 coordinate of the face.
public function get uv1():UV public function set uv1(value:UV):void| uv2 | property |
uv2:UVDefines the uv2 coordinate of the face.
public function get uv2():UV public function set uv2(value:UV):void| uvs | property |
uvs:Vector.<UV> [read-only] Returns an array of uv objects that are used by the face.
public function get uvs():Vector.<UV>| v0 | property |
v0:VertexDefines the v0 vertex of the face.
public function get v0():Vertex public function set v0(value:Vertex):void| v1 | property |
v1:VertexDefines the v1 vertex of the face.
public function get v1():Vertex public function set v1(value:Vertex):void| v2 | property |
v2:VertexDefines the v2 vertex of the face.
public function get v2():Vertex public function set v2(value:Vertex):void| Face | () | Constructor |
public function Face(v0:Vertex = null, v1:Vertex = null, v2:Vertex = null, material:Material = null, uv0:UV = null, uv1:UV = null, uv2:UV = null)
Creates a new Face object.
v0:Vertex (default = null) — The first vertex object of the triangle
| |
v1:Vertex (default = null) — The second vertex object of the triangle
| |
v2:Vertex (default = null) — The third vertex object of the triangle
| |
material:Material (default = null) — [optional] The material used by the triangle to render
| |
uv0:UV (default = null) — [optional] The first uv object of the triangle
| |
uv1:UV (default = null) — [optional] The second uv object of the triangle
| |
uv2:UV (default = null) — [optional] The third uv object of the triangle
|
See also
| clone | () | method |
public function clone():FaceProduces a clone of the face. NOTE: Supports only irregular faces for now.
ReturnsFace — [Face] The cloned face.
|
| curveTo | () | method |
public function curveTo(cx:Number, cy:Number, cz:Number, ex:Number, ey:Number, ez:Number):voidParameters
cx:Number | |
cy:Number | |
cz:Number | |
ex:Number | |
ey:Number | |
ez:Number |
| hasEdgeOnPlane | () | method |
public function hasEdgeOnPlane(plane:Plane3D, epsilon:Number = 0.001):BooleanTests if an edge of the face lies on a given plane
Parameters
plane:Plane3D — The plane to test against
| |
epsilon:Number (default = 0.001) |
Boolean — Whether or not an edge of this Face lies on the plane
|
| invert | () | method |
public function invert():void
Inverts the geometry of the face object by swapping the v1, v2 and uv1, uv2 points.
| lineTo | () | method |
public function lineTo(x:Number, y:Number, z:Number):voidParameters
x:Number | |
y:Number | |
z:Number |
| moveTo | () | method |
public function moveTo(x:Number, y:Number, z:Number):voidParameters
x:Number | |
y:Number | |
z:Number |
| scaleAboutCenter | () | method |
public function scaleAboutCenter(scale:Number):voidScales the face by a given factor about its unweighed center. NOTE: Supports only irregular faces for now.
Parameters
scale:Number — [Number] The amount factor to scale the face.
|
| mappingChanged | Event |
away3d.events.FaceEventaway3d.events.FaceEventDispatched when the uv mapping of the face changes.
| materialChanged | Event |
away3d.events.FaceEventaway3d.events.FaceEventDispatched when the material of the face changes.