Packageaway3d.core.base
Classpublic class Face
InheritanceFace Inheritance BaseMeshElement Inheritance flash.events.EventDispatcher

A triangle element used in the mesh object

See also

away3d.core.base.Mesh
Public Properties
 PropertyDefined by
  area : Number
[read-only] Returns the calculated 2 dimensional area of the face.
Face
  back : ITriangleMaterial
Defines the optional back material of the face.
Face
  extra : Object
An optional untyped object that can contain used-defined properties.
Face
  material : ITriangleMaterial
Defines the material of the face.
Face
  maxU : Number
[read-only] Returns the maximum u value of the face
Face
  maxV : Number
[read-only] Returns the maximum v value of the face
Face
  maxX : Number
[read-only] Returns the maximum x value of the face
Face
  maxY : Number
[read-only] Returns the maximum y value of the face
Face
  maxZ : Number
[read-only] Returns the maximum zx value of the face
Face
  minU : Number
[read-only] Returns the minimum u value of the face
Face
  minV : Number
[read-only] Returns the minimum v value of the face
Face
  minX : Number
[read-only] Returns the minimum x value of the face
Face
  minY : Number
[read-only] Returns the minimum y value of the face
Face
  minZ : Number
[read-only] Returns the minimum z value of the face
Face
  normal : Number3D
[read-only] Returns the normal vector of the face.
Face
  parent : Mesh
Defines the parent 3d object of the face.
Face
  radius2 : Number
[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 : Array
[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
  vertices : Array
[read-only] Returns an array of vertex objects that are used by the face.
Face
 Inheritedvisible : Boolean
Defines whether the 3d element is visible in the scene.
BaseMeshElement
Public Methods
 MethodDefined by
  
Face
(v0:Vertex, v1:Vertex, v2:Vertex, material:ITriangleMaterial = 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
Face
  
addOnMaterialChange(listener:Function):void
Default method for adding a materialchanged event listener
Face
 Inherited
addOnVertexChange(listener:Function):void
Default method for adding a vertexchanged event listener
BaseMeshElement
 Inherited
addOnVertexValueChange(listener:Function):void
Default method for adding a vertexvaluechanged event listener
BaseMeshElement
 Inherited
addOnVisibleChange(listener:Function):void
Default method for adding a visiblechanged event listener
BaseMeshElement
  
invert():void
Inverts the geometry of the face object by swapping the v1, v2 and uv1, uv2 points.
Face
  
removeOnMappingChange(listener:Function):void
Default method for removing a mappingchanged event listener
Face
  
removeOnMaterialChange(listener:Function):void
Default method for removing a materialchanged event listener
Face
 Inherited
removeOnVertexChange(listener:Function):void
Default method for removing a vertexchanged event listener
BaseMeshElement
 Inherited
removeOnVertexValueChange(listener:Function):void
Default method for removing a vertexvaluechanged event listener
BaseMeshElement
 Inherited
removeOnVisibleChange(listener:Function):void
Default method for removing a visiblechanged event listener
BaseMeshElement
Events
 EventSummaryDefined by
   Dispatched when the uv mapping of the face changes.Face
   Dispatched when the material of the face changes.Face
 Inherited Dispatched when the vertex of a 3d element changes.BaseMeshElement
 Inherited Dispatched when the vertex value of a 3d element changes.BaseMeshElement
 Inherited Dispatched when the visiblity of a 3d element changes.BaseMeshElement
Property detail
areaproperty
area:Number  [read-only]

Returns the calculated 2 dimensional area of the face.

Implementation
    public function get area():Number
backproperty 
back:ITriangleMaterial  [read-write]

Defines the optional back material of the face. Displays when the face is pointing away from the camera.

Implementation
    public function get back():ITriangleMaterial
    public function set back(value:ITriangleMaterial):void
extraproperty 
public var extra:Object

An optional untyped object that can contain used-defined properties.

materialproperty 
material:ITriangleMaterial  [read-write]

Defines the material of the face.

Implementation
    public function get material():ITriangleMaterial
    public function set material(value:ITriangleMaterial):void
maxUproperty 
maxU:Number  [read-only]

Returns the maximum u value of the face

Implementation
    public function get maxU():Number

See also

maxVproperty 
maxV:Number  [read-only]

Returns the maximum v value of the face

Implementation
    public function get maxV():Number

See also

maxXproperty 
maxX:Number  [read-only]

Returns the maximum x value of the face

Implementation
    public function get maxX():Number

See also

maxYproperty 
maxY:Number  [read-only]

Returns the maximum y value of the face

Implementation
    public function get maxY():Number

See also

maxZproperty 
maxZ:Number  [read-only]

Returns the maximum zx value of the face

Implementation
    public function get maxZ():Number

See also

minUproperty 
minU:Number  [read-only]

Returns the minimum u value of the face

Implementation
    public function get minU():Number

See also

minVproperty 
minV:Number  [read-only]

Returns the minimum v value of the face

Implementation
    public function get minV():Number

See also

minXproperty 
minX:Number  [read-only]

Returns the minimum x value of the face

Implementation
    public function get minX():Number

See also

minYproperty 
minY:Number  [read-only]

Returns the minimum y value of the face

Implementation
    public function get minY():Number

See also

minZproperty 
minZ:Number  [read-only]

Returns the minimum z value of the face

Implementation
    public function get minZ():Number

See also

normalproperty 
normal:Number3D  [read-only]

Returns the normal vector of the face.

Implementation
    public function get normal():Number3D
parentproperty 
public var parent:Mesh

Defines the parent 3d object of the face.

radius2property 
radius2:Number  [read-only]

Returns the squared bounding radius of the face.

Implementation
    public function get radius2():Number
uv0property 
uv0:UV  [read-write]

Defines the uv0 coordinate of the face.

Implementation
    public function get uv0():UV
    public function set uv0(value:UV):void
uv1property 
uv1:UV  [read-write]

Defines the uv1 coordinate of the face.

Implementation
    public function get uv1():UV
    public function set uv1(value:UV):void
uv2property 
uv2:UV  [read-write]

Defines the uv2 coordinate of the face.

Implementation
    public function get uv2():UV
    public function set uv2(value:UV):void
uvsproperty 
uvs:Array  [read-only]

Returns an array of uv objects that are used by the face.

Implementation
    public function get uvs():Array
v0property 
v0:Vertex  [read-write]

Defines the v0 vertex of the face.

Implementation
    public function get v0():Vertex
    public function set v0(value:Vertex):void
v1property 
v1:Vertex  [read-write]

Defines the v1 vertex of the face.

Implementation
    public function get v1():Vertex
    public function set v1(value:Vertex):void
v2property 
v2:Vertex  [read-write]

Defines the v2 vertex of the face.

Implementation
    public function get v2():Vertex
    public function set v2(value:Vertex):void
verticesproperty 
vertices:Array  [read-only]

Returns an array of vertex objects that are used by the face.

Implementation
    public function get vertices():Array
Constructor detail
Face()constructor
public function Face(v0:Vertex, v1:Vertex, v2:Vertex, material:ITriangleMaterial = null, uv0:UV = null, uv1:UV = null, uv2:UV = null)
Parameters
v0:Vertex — The first vertex object of the triangle
 
v1:Vertex — The second vertex object of the triangle
 
v2:Vertex — The third vertex object of the triangle
 
material:ITriangleMaterial (default = null) — 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

Method detail
addOnMappingChange()method
public function addOnMappingChange(listener:Function):void

Default method for adding a mappingchanged event listener

Parameters
listener:Function — The listener function
addOnMaterialChange()method 
public function addOnMaterialChange(listener:Function):void

Default method for adding a materialchanged event listener

Parameters
listener:Function — The listener function
invert()method 
public function invert():void

Inverts the geometry of the face object by swapping the v1, v2 and uv1, uv2 points.

removeOnMappingChange()method 
public function removeOnMappingChange(listener:Function):void

Default method for removing a mappingchanged event listener

Parameters
listener:Function — The listener function
removeOnMaterialChange()method 
public function removeOnMaterialChange(listener:Function):void

Default method for removing a materialchanged event listener

Parameters
listener:Function — The listener function
Event detail
mappingchangedevent 
Event object type: away3d.events.FaceEvent

Dispatched when the uv mapping of the face changes.

materialchangedevent  
Event object type: away3d.events.FaceEvent

Dispatched when the material of the face changes.

Wiki link
Click to go to the wiki page for 'away3d.core.base.Face'

Code examples
There are currently no examples for this class

Comments
No comments found
Please leave a comment

Please leave a comment

security image