Packageaway3dlite.core.base
Classpublic class Face
InheritanceFace Inheritance Object

Face value object. Stores information on each face in a mesh.



Public Properties
 PropertyDefined By
  calculateScreenZ : Function
selected function for calculating the screen Z coordinate of the face.
Face
  faceIndex : int
Index value of the face.
Face
  i0 : int
Index value of the first vertex in the face.
Face
  i1 : int
Index value of the second vertex in the face.
Face
  i2 : int
Index value of the third vertex in the face.
Face
  i3 : int
Index value of the fourth vertex in the face.
Face
  material : Material
Material of the face.
Face
  mesh : Mesh
Mesh object to which the face belongs.
Face
  t0 : int
t index of the first mapping value.
Face
  t1 : int
t index of the second mapping value.
Face
  t2 : int
t index of the third mapping value.
Face
  t3 : int
t index of the fourth mapping value.
Face
  u0 : int
u index of the first mapping value.
Face
  u1 : int
u index of the second mapping value.
Face
  u2 : int
u index of the third mapping value.
Face
  u3 : int
u index of the fourth mapping value.
Face
  v0 : int
v index of the first mapping value.
Face
  v1 : int
v index of the second mapping value.
Face
  v2 : int
v index of the third mapping value.
Face
  v3 : int
v index of the fourth mapping value.
Face
  x0 : int
x index of the first screen vertex.
Face
  x1 : int
x index of the second screen vertex.
Face
  x2 : int
x index of the third screen vertex.
Face
  x3 : int
x index of the fourth screen vertex.
Face
  y0 : int
y index of the first screen vertex.
Face
  y1 : int
y index of the second screen vertex.
Face
  y2 : int
y index of the third screen vertex.
Face
  y3 : int
y index of the fourth screen vertex.
Face
Public Methods
 MethodDefined By
  
Face(mesh:Mesh, faceIndex:int, index:int, length:int)
Creates a new Face object.
Face
  
Returns the average screen Z coordinate of the face.
Face
  
Returns the furthest screen Z coordinate of the face.
Face
  
Returns the nearest screen Z coordinate of the face.
Face
  
calculateUVT(x:Number, y:Number):Vector3D
Returns the uvt coordinate of the face at the given screen coordinate.
Face
Property Detail
calculateScreenZproperty
public var calculateScreenZ:Function

selected function for calculating the screen Z coordinate of the face.

faceIndexproperty 
public var faceIndex:int

Index value of the face.

i0property 
public var i0:int

Index value of the first vertex in the face.

i1property 
public var i1:int

Index value of the second vertex in the face.

i2property 
public var i2:int

Index value of the third vertex in the face.

i3property 
public var i3:int

Index value of the fourth vertex in the face.

materialproperty 
public var material:Material

Material of the face.

meshproperty 
public var mesh:Mesh

Mesh object to which the face belongs.

t0property 
public var t0:int

t index of the first mapping value.

t1property 
public var t1:int

t index of the second mapping value.

t2property 
public var t2:int

t index of the third mapping value.

t3property 
public var t3:int

t index of the fourth mapping value.

u0property 
public var u0:int

u index of the first mapping value.

u1property 
public var u1:int

u index of the second mapping value.

u2property 
public var u2:int

u index of the third mapping value.

u3property 
public var u3:int

u index of the fourth mapping value.

v0property 
public var v0:int

v index of the first mapping value.

v1property 
public var v1:int

v index of the second mapping value.

v2property 
public var v2:int

v index of the third mapping value.

v3property 
public var v3:int

v index of the fourth mapping value.

x0property 
public var x0:int

x index of the first screen vertex.

x1property 
public var x1:int

x index of the second screen vertex.

x2property 
public var x2:int

x index of the third screen vertex.

x3property 
public var x3:int

x index of the fourth screen vertex.

y0property 
public var y0:int

y index of the first screen vertex.

y1property 
public var y1:int

y index of the second screen vertex.

y2property 
public var y2:int

y index of the third screen vertex.

y3property 
public var y3:int

y index of the fourth screen vertex.

Constructor Detail
Face()Constructor
public function Face(mesh:Mesh, faceIndex:int, index:int, length:int)

Creates a new Face object.

Parameters
mesh:Mesh — The Mesh object to which the face belongs.
 
faceIndex:int — The index of the face.
 
index:int — The start index of the indices.
 
length:int — The number of indices.
####INIT####
Method Detail
calculateAverageZ()method
public function calculateAverageZ():int

Returns the average screen Z coordinate of the face.

Returns
int
calculateFurthestZ()method 
public function calculateFurthestZ():int

Returns the furthest screen Z coordinate of the face.

Returns
int
calculateNearestZ()method 
public function calculateNearestZ():int

Returns the nearest screen Z coordinate of the face.

Returns
int
calculateUVT()method 
public function calculateUVT(x:Number, y:Number):Vector3D

Returns the uvt coordinate of the face at the given screen coordinate.

Parameters

x:Number — The x value of the screen coordinate.
 
y:Number — The y value of the screen coordinate.

Returns
Vector3D