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
- vertices : Array
- An array of Vertex3D objects for the three vertices of the triangle.
- _materialName : String
- A material id TODO
- uv0 : NumberUV
- A MaterialObject3D object that contains the material properties of the back of a single sided triangle.
- uv1 : NumberUV
- uv2 : NumberUV
- uv (uv:Array) : Array
- An array of {x,y} objects for the corresponding UV pixel coordinates of each triangle vertex.
- screenZ : Number
- [read-only] The average depth (z coordinate) of the transformed triangle.
- visible : Boolean
- [read-only] A Boolean value that indicates that the face is visible, i.e.
- id : Number
- The object where the face belongs.
- v0 : Vertex3D
- Used to store references to the vertices.
- v1 : Vertex3D
- v2 : Vertex3D
- faceNormal : Number3D
- The face normal
- face3DInstance : Triangle3DInstance
- The transformed Face3DInstance
- instance : DisplayObject3D
- The do3d instance this triangle belongs too.
- material : MaterialObject3D
- stores the material for this face.
- renderCommand : RenderTriangle
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
id
public id:Number
(read,write)
The object where the face belongs.
renderCommand
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
A MaterialObject3D object that contains the material properties of the back of a single sided triangle.
uv1
uv2
v1
v2
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
Overrides:
Specified by: