A model made of textured triangles, posed by keyframes.
frames— a tuple of%{vertices: tuple of Vec, normals: tuple of Vec}, every frame with the same vertices in the same ordertriangles— a list of{{i0, i1, i2}, {uv0, uv1, uv2}}: three vertex indices and where each corner lies on the skin, in its pixelsskins— a list ofCauldron3D.Texture
The model's own axes are x forward, y left and z up; placed in the world it is
turned by yaw, pitch and roll as Cauldron3D.Camera turns.
Cauldron3D.Mesh.polygons(mesh, frame: 3, origin: {64.0, 0.0, 24.0}, yaw: 1.2)
Summary
Functions
The mesh's triangles as polygons in the world.
Types
@type t() :: %Cauldron3D.Mesh{ frames: tuple(), skins: [Cauldron3D.Texture.t()], triangles: [ {{non_neg_integer(), non_neg_integer(), non_neg_integer()}, tuple()} ] }
Functions
@spec polygons(t(), keyword()) :: [Cauldron3D.Polygon.t()]
The mesh's triangles as polygons in the world.
Options
:frame— the frame index, or{from, to, t}to blendtof the way between two frames; default 0:origin,:yaw,:pitch,:roll— where it stands and how it is turned:scale— a number, default 1.0:skin— the skin index, default 0:light— a number (0 to 255) for even light, or{ambient, directional, toward}: each vertex litambientplusdirectionaltimes how squarely its normal faces the directiontoward; default 128:cull,:clear,:depth— asCauldron3D.Polygon's, default:none,niland:test