Packageaway3d.core.base.data
Classpublic class Face
InheritanceFace Inheritance Object

Face value object.



Public Properties
 PropertyDefined By
  faceIndex : uint
To store a temp index of a face during a loop
Face
  uv0Index : uint
the index set for uv0 in this Face value object
Face
  uv0u : Number
[read-only]
Face
  uv0v : Number
[read-only]
Face
  uv1Index : uint
the index set for uv1 in this Face value object
Face
  uv1u : Number
[read-only]
Face
  uv1v : Number
[read-only]
Face
  uv2Index : uint
the index set for uv2 in this Face value object
Face
  uv2u : Number
[read-only]
Face
  uv2v : Number
[read-only]
Face
  v0 : Vector.<Number>
[read-only]
Face
  v0Index : uint
set the index value for v0
Face
  v0x : Number
[read-only]
Face
  v0y : Number
[read-only]
Face
  v0z : Number
[read-only]
Face
  v1 : Vector.<Number>
[read-only]
Face
  v1Index : uint
set the index value for v1
Face
  v1x : Number
[read-only]
Face
  v1y : Number
[read-only]
Face
  v1z : Number
[read-only]
Face
  v2 : Vector.<Number>
[read-only]
Face
  v2Index : uint
set the index value for v2
Face
  v2x : Number
[read-only]
Face
  v2y : Number
[read-only]
Face
  v2z : Number
[read-only]
Face
Public Methods
 MethodDefined By
  
Face(vertices:Vector.<Number> = null, uvs:Vector.<Number> = null)
Creates a new Face value object.
Face
  
returns a new Face value Object
Face
  
containsPoint(point:Vector3D, maxDistanceToPlane:Number = .007):Boolean
Tests whether a given point is inside the triangle
Face
  
getBarycentricCoords(point:Vector3D, target:Point = null):Point
Returns the first two barycentric coordinates for a point on (or outside) the triangle.
Face
  
getUVAtPoint(point:Vector3D, target:UV = null):UV
Returns the target coordinates for a point on a triangle
Face
  
setUv0Value(u:Number, v:Number):void
uv0 u and v values
Face
  
setUv1Value(u:Number, v:Number):void
uv1 u and v values
Face
  
setUv2Value(u:Number, v:Number):void
uv2 u and v values
Face
  
setUVat(index:uint, u:Number, v:Number):void
To set uv values for either uv0, uv1 or uv2.
Face
  
setVertexAt(index:uint, x:Number, y:Number, z:Number):void
To set uv values for either v0, v1 or v2.
Face
Property Detail
faceIndexproperty
faceIndex:uint

To store a temp index of a face during a loop


Implementation
    public function get faceIndex():uint
    public function set faceIndex(value:uint):void
uv0Indexproperty 
uv0Index:uint

the index set for uv0 in this Face value object


Implementation
    public function get uv0Index():uint
    public function set uv0Index(value:uint):void
uv0uproperty 
uv0u:Number  [read-only]


Implementation
    public function get uv0u():Number
uv0vproperty 
uv0v:Number  [read-only]


Implementation
    public function get uv0v():Number
uv1Indexproperty 
uv1Index:uint

the index set for uv1 in this Face value object


Implementation
    public function get uv1Index():uint
    public function set uv1Index(value:uint):void
uv1uproperty 
uv1u:Number  [read-only]


Implementation
    public function get uv1u():Number
uv1vproperty 
uv1v:Number  [read-only]


Implementation
    public function get uv1v():Number
uv2Indexproperty 
uv2Index:uint

the index set for uv2 in this Face value object


Implementation
    public function get uv2Index():uint
    public function set uv2Index(value:uint):void
uv2uproperty 
uv2u:Number  [read-only]


Implementation
    public function get uv2u():Number
uv2vproperty 
uv2v:Number  [read-only]


Implementation
    public function get uv2v():Number
v0property 
v0:Vector.<Number>  [read-only]


Implementation
    public function get v0():Vector.<Number>
v0Indexproperty 
v0Index:uint

set the index value for v0


Implementation
    public function get v0Index():uint
    public function set v0Index(value:uint):void
v0xproperty 
v0x:Number  [read-only]


Implementation
    public function get v0x():Number
v0yproperty 
v0y:Number  [read-only]


Implementation
    public function get v0y():Number
v0zproperty 
v0z:Number  [read-only]


Implementation
    public function get v0z():Number
v1property 
v1:Vector.<Number>  [read-only]


Implementation
    public function get v1():Vector.<Number>
v1Indexproperty 
v1Index:uint

set the index value for v1


Implementation
    public function get v1Index():uint
    public function set v1Index(value:uint):void
v1xproperty 
v1x:Number  [read-only]


Implementation
    public function get v1x():Number
v1yproperty 
v1y:Number  [read-only]


Implementation
    public function get v1y():Number
v1zproperty 
v1z:Number  [read-only]


Implementation
    public function get v1z():Number
v2property 
v2:Vector.<Number>  [read-only]


Implementation
    public function get v2():Vector.<Number>
v2Indexproperty 
v2Index:uint

set the index value for v2


Implementation
    public function get v2Index():uint
    public function set v2Index(value:uint):void
v2xproperty 
v2x:Number  [read-only]


Implementation
    public function get v2x():Number
v2yproperty 
v2y:Number  [read-only]


Implementation
    public function get v2y():Number
v2zproperty 
v2z:Number  [read-only]


Implementation
    public function get v2z():Number
Constructor Detail
Face()Constructor
public function Face(vertices:Vector.<Number> = null, uvs:Vector.<Number> = null)

Creates a new Face value object.

Parameters
vertices:Vector.<Number> (default = null) — [optional] 9 entries long Vector.<Number> representing the x, y and z of v0, v1, and v2 of a face
 
uvs:Vector.<Number> (default = null) — [optional] 6 entries long Vector.<Number> representing the u and v of uv0, uv1, and uv2 of a face
Method Detail
clone()method
public function clone():Face

returns a new Face value Object

Returns
Face
containsPoint()method 
public function containsPoint(point:Vector3D, maxDistanceToPlane:Number = .007):Boolean

Tests whether a given point is inside the triangle

Parameters

point:Vector3D — The point to test against
 
maxDistanceToPlane:Number (default = .007) — The minimum distance to the plane for the point to be considered on the triangle. This is usually used to allow for rounding error, but can also be used to perform a volumetric test.

Returns
Boolean
getBarycentricCoords()method 
public function getBarycentricCoords(point:Vector3D, target:Point = null):Point

Returns the first two barycentric coordinates for a point on (or outside) the triangle. The third coordinate is 1 - x - y

Parameters

point:Vector3D — The point for which to calculate the new target
 
target:Point (default = null) — An optional Point object to store the calculation in order to prevent creation of a new object

Returns
Point
getUVAtPoint()method 
public function getUVAtPoint(point:Vector3D, target:UV = null):UV

Returns the target coordinates for a point on a triangle

Parameters

point:Vector3D — The triangle's first vertex
 
target:UV (default = null) — The triangle's second vertex

Returns
UV
setUv0Value()method 
public function setUv0Value(u:Number, v:Number):void

uv0 u and v values

Parameters

u:Number — The u value
 
v:Number — The v value

setUv1Value()method 
public function setUv1Value(u:Number, v:Number):void

uv1 u and v values

Parameters

u:Number — The u value
 
v:Number — The v value

setUv2Value()method 
public function setUv2Value(u:Number, v:Number):void

uv2 u and v values

Parameters

u:Number — The u value
 
v:Number — The v value

setUVat()method 
public function setUVat(index:uint, u:Number, v:Number):void

To set uv values for either uv0, uv1 or uv2.

Parameters

index:uint — The id of the uv (0, 1 or 2)
 
u:Number — The horizontal coordinate of the texture value.
 
v:Number — The vertical coordinate of the texture value.

setVertexAt()method 
public function setVertexAt(index:uint, x:Number, y:Number, z:Number):void

To set uv values for either v0, v1 or v2.

Parameters

index:uint — The id of the uv (0, 1 or 2)
 
x:Number — The x value of the vertex.
 
y:Number — The y value of the vertex.
 
z:Number — The z value of the vertex.