-
Notifications
You must be signed in to change notification settings - Fork 103
Face
cjcliffe edited this page Oct 15, 2011
·
3 revisions
The Face class is used to represent a triangle or quad as part of a Mesh. It can be used for higher level polygons but they are not currently supported for compiling and rendering.
- Face
-
points[]
: Array of point indices from the related Mesh -
point_normals[]
: Array of normals for each point [X,Y,Z] -
uvs[]
: Array of [U,V] pairs for each point -
normal
: Normal for this face [X,Y,Z] -
material
: Material ID (Material.mat_id
reference) for this face -
segment
: Mesh segment this face belongs to
-
Set the UV coordinates for this face.
Parameters:
-
uvs
: A single pair or array of U,V coordinates. If single pair[0,0]
provided without point_num it will be appended toFace.uvs[]
, otherwise it will be applied to the specified point_num. If multiple U,V pairs are supplied[ [0,1], [0,0], [1,0] ]
they will replace the face'sFace.uvs[]
array directly. -
point_num
: The point index for the supplied U,V pair.
Returns:
none
Flip the face point winding so that the normal is facing in the opposite direction when calculated.
Returns:
none