Packageorg.papervision3d.core.geom.renderables
Classpublic class Triangle3D
ImplementsIRenderable

The Face3D class lets you render linear textured triangles. It also supports solid colour fill and hairline outlines.



Public Properties
 PropertyDefined by
  face3DInstance : Triangle3DInstance
The transformed Face3DInstance
Triangle3D
  faceNormal : Number3D
The face normal
Triangle3D
  id : Number
The object where the face belongs.
Triangle3D
  instance : DisplayObject3D
The do3d instance this triangle belongs too.
Triangle3D
  material : MaterialObject3D
stores the material for this face.
Triangle3D
  _materialName : String
A material id TODO
Triangle3D
  renderCommand : RenderTriangle
Triangle3D
  screenZ : Number
[read-only] The average depth (z coordinate) of the transformed triangle.
Triangle3D
  uv : Array
Triangle3D
  uv0 : NumberUV
A MaterialObject3D object that contains the material properties of the back of a single sided triangle.
Triangle3D
  uv1 : NumberUV
Triangle3D
  uv2 : NumberUV
Triangle3D
  v0 : Vertex3D
Used to store references to the vertices.
Triangle3D
  v1 : Vertex3D
Triangle3D
  v2 : Vertex3D
Triangle3D
  vertices : Array
An array of Vertex3D objects for the three vertices of the triangle.
Triangle3D
  visible : Boolean
[read-only] A Boolean value that indicates that the face is visible, i.e.
Triangle3D
Public Methods
 MethodDefined by
  
Triangle3D(do3dInstance:DisplayObject3D, vertices:Array, material:MaterialObject3D = null, uv:Array = null)
The Face3D constructor lets you create linear textured or solid colour triangles.
Triangle3D
  
createNormal():void
Triangle3D
  
Triangle3D
Property detail
face3DInstanceproperty
public var face3DInstance:Triangle3DInstance

The transformed Face3DInstance

faceNormalproperty 
public var faceNormal:Number3D

The face normal

idproperty 
public var id:Number

The object where the face belongs.

instanceproperty 
public var instance:DisplayObject3D

The do3d instance this triangle belongs too.

materialproperty 
public var material:MaterialObject3D

stores the material for this face.

_materialNameproperty 
public var _materialName:String

A material id TODO

renderCommandproperty 
public var renderCommand:RenderTriangle
screenZproperty 
public var screenZ:Number

[read-only] The average depth (z coordinate) of the transformed triangle. Also known as the distance from the camera. Used internally for z-sorting.

uvproperty 
uv:Array  [read-write]Implementation
    public function get uv():Array
    public function set uv(value:Array):void
uv0property 
public var uv0:NumberUV

A MaterialObject3D object that contains the material properties of the back of a single sided triangle.

uv1property 
public var uv1:NumberUV
uv2property 
public var uv2:NumberUV
v0property 
public var v0:Vertex3D

Used to store references to the vertices.

v1property 
public var v1:Vertex3D
v2property 
public var v2:Vertex3D
verticesproperty 
public var vertices:Array

An array of Vertex3D objects for the three vertices of the triangle.

visibleproperty 
public var visible:Boolean

[read-only] A Boolean value that indicates that the face is visible, i.e. it's vertices are in front of the camera.

Constructor detail
Triangle3D()constructor
public function Triangle3D(do3dInstance:DisplayObject3D, vertices:Array, material:MaterialObject3D = null, uv:Array = null)

The Face3D constructor lets you create linear textured or solid colour triangles.

Parameters
do3dInstance:DisplayObject3D — An array of Vertex3D objects for the three vertices of the triangle.
 
vertices:Array — A MaterialObject3D object that contains the material properties of the triangle.
 
material:MaterialObject3D (default = null) — An array of {x,y} objects for the corresponding UV pixel coordinates of each triangle vertex.
 
uv:Array (default = null)
Method detail
createNormal()method
public function createNormal():void
getRenderListItem()method 
public function getRenderListItem():IRenderListItem

Returns
IRenderListItem