| Package | org.papervision3d.core.geom |
| Class | public class Face3D |
| Property | Defined by | ||
|---|---|---|---|
| id : Number
The object where the face belongs.
| Face3D | ||
| id : Number
[read-only] Unique id of this instance.
| Face3D | ||
| materialName : String
A material id TODO
| Face3D | ||
| screenZ : Number
[read-only] The average depth (z coordinate) of the transformed triangle.
| Face3D | ||
| uv : Array
A MaterialObject3D object that contains the material properties of the back of a single sided triangle.
| Face3D | ||
| uv : Array
An array of {x,y} objects for the corresponding UV pixel coordinates of each triangle vertex.
| Face3D | ||
| vertices : Array
An array of Vertex3D objects for the three vertices of the triangle.
| Face3D | ||
| visible : Boolean
[read-only] A Boolean value that indicates that the face is visible, i.e.
| Face3D | ||
| Method | Defined by | ||
|---|---|---|---|
|
Face3D(vertices:Array, materialName:String = null, uv:Array = null)
The Face3D constructor lets you create linear textured or solid colour triangles.
| Face3D | ||
|
render(instance:DisplayObject3D, container:Sprite):Number
Draws the triangle into its MovieClip container.
| Face3D | ||
|
transformUV(instance:DisplayObject3D = null):Object
Applies the updated UV texture mapping values to the triangle.
| Face3D | ||
| id | property |
public var id:NumberThe object where the face belongs.
| id | property |
public var id:Number[read-only] Unique id of this instance.
| materialName | property |
public var materialName:StringA material id TODO
| screenZ | property |
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.
| uv | property |
public var uv:ArrayA MaterialObject3D object that contains the material properties of the back of a single sided triangle.
| uv | property |
public var uv:ArrayAn array of {x,y} objects for the corresponding UV pixel coordinates of each triangle vertex.
| vertices | property |
public var vertices:ArrayAn array of Vertex3D objects for the three vertices of the triangle.
| visible | property |
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.
| Face3D | () | constructor |
public function Face3D(vertices:Array, materialName:String = null, uv:Array = null)The Face3D constructor lets you create linear textured or solid colour triangles.
Parametersvertices:Array — An array of Vertex3D objects for the three vertices of the triangle.
|
|
materialName:String (default = null) — A MaterialObject3D object that contains the material properties of the triangle.
|
|
uv:Array (default = null) — An array of {x,y} objects for the corresponding UV pixel coordinates of each triangle vertex.
|
| render | () | method |
public function render(instance:DisplayObject3D, container:Sprite):NumberDraws the triangle into its MovieClip container.
Parametersinstance:DisplayObject3D — The default MovieClip that you draw into when rendering.
|
|
container:Sprite — A Boolean value that indicates whether random coloring is enabled. Typically used for debug purposes. Defaults to false.
|
Number — The number of triangles drawn. Either one if it is double sided or visible, or zero if it single sided and not visible.
|
| transformUV | () | method |
public function transformUV(instance:DisplayObject3D = null):ObjectApplies the updated UV texture mapping values to the triangle. This is required to speed up rendering.
Parametersinstance:DisplayObject3D (default = null) |
Object |