Pass:polygon

Edit

Draws a polygon. The 3D vertices must be coplanar (all lie on the same plane), and the polygon must be convex (does not intersect itself or have any angles between vertices greater than 180 degrees), otherwise rendering artifacts may occur.




Arguments

NameTypeDescription
x1number The x coordinate of the first vertex.
y1number The y coordinate of the first vertex.
z1number The z coordinate of the first vertex.
x2number The x coordinate of the next vertex.
y2number The y coordinate of the next vertex.
z2number The z coordinate of the next vertex.
...* More vertices to add to the polygon.

Returns

Nothing

Arguments

NameTypeDescription
ttable A table of numbers or Vec3 objects (not a mix) representing vertices of the polygon.

Returns

Nothing

Arguments

NameTypeDescription
v1Vec3 A vector containing the position of the first vertex of the polygon.
v2Vec3 A vector containing the position of the next vertex on the polygon.
...* More vertices to add to the polygon.

Returns

Nothing

Notes

Currently, the polygon will not have normal vectors.

Mesh objects can also be used to draw arbitrary triangle meshes.

See also