Triangle3D

Kind of class:public class
Package:org.papervision3d.core.geom.renderables
Inherits from:AbstractRenderable
Implements:
Classpath:org.papervision3d.core.geom.renderables.Triangle3D
File last modified:Sunday, 02 March 2008, 15:23:38
The Face3D class lets you render linear textured triangles. It also supports solid colour fill and hairline outlines.

Summary


Constructor
  • Triangle3D (do3dInstance:DisplayObject3D = null, uv:Array = null)
    • The Face3D constructor lets you create linear textured or solid colour triangles.
Instance properties
Instance properties inherited from AbstractRenderable
Instance methods
Instance methods inherited from AbstractRenderable

Constructor

Triangle3D

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:
vertices:
An array of Vertex3D objects for the three vertices of the triangle.
material:
A MaterialObject3D object that contains the material properties of the triangle.
uv :
An array of {x,y} objects for the corresponding UV pixel coordinates of each triangle vertex.

Instance properties

_materialName

public _materialName:String
(read,write)

A material id TODO

face3DInstance

public face3DInstance:Triangle3DInstance
(read,write)

The transformed Face3DInstance

faceNormal

public faceNormal:Number3D
(read,write)

The face normal

id

public id:Number
(read,write)

The object where the face belongs.

instance

public instance:DisplayObject3D
(read,write)

The do3d instance this triangle belongs too.

material

public material:MaterialObject3D
(read,write)

stores the material for this face.

renderCommand

public renderCommand:RenderTriangle
(read,write)

screenZ

public screenZ:Number
(read,write)

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

uv

public uv:Array
(read,write)

An array of {x,y} objects for the corresponding UV pixel coordinates of each triangle vertex.

uv0

public uv0:NumberUV
(read,write)

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

uv1

public uv1:NumberUV
(read,write)

uv2

public uv2:NumberUV
(read,write)

v0

public v0:Vertex3D
(read,write)

Used to store references to the vertices.

v1

public v1:Vertex3D
(read,write)

v2

public v2:Vertex3D
(read,write)

vertices

public vertices:Array
(read,write)

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

visible

public visible:Boolean
(read,write)

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

Instance methods

createNormal

public function createNormal (
) : void

getRenderListItem

override public function getRenderListItem (