1# llimphi-mesh23Rendering of deformable meshes to a `vello::Scene`.
45The bone and skinning maths live in `llimphi_anim::skel`; this crate only
6**paints** the already-deformed mesh. It receives the mesh (`Mesh`) plus the
7deformed positions of its vertices (what `Mesh::deform` returns) and a
8model→screen `xform`, and offers the two routes the spike validated against
9vello 0.7:
1011- `paint_solid` — fills each deformed triangle with a colour (vector mesh /
12 debug). Trivial.
13- `paint_textured` — a **textured** mesh: per triangle, it clips to the deformed
14 triangle and draws the image with the affine mapping its UVs to the deformed
15 position (piecewise-affine warp). Cost = one clip layer per triangle; careful
16 with meshes of thousands of triangles.
17- `paint_wireframe` — strokes the triangle edges (to see the deformation; ideal
18 for demos and debugging).
1920Framing helpers: `rest_bounds` (the mesh's bbox at rest) and `fit_transform` (the
21affine fitting those bounds, centred, into a `PaintRect`).
2223---
2425Part of **llimphi** — see [llimphi](../README.md).
README.md
llimphi-mesh
Rendering of deformable meshes to a vello::Scene.
The bone and skinning maths live in llimphi_anim::skel; this crate only
paints the already-deformed mesh. It receives the mesh (Mesh) plus the
deformed positions of its vertices (what Mesh::deform returns) and a
model→screen xform, and offers the two routes the spike validated against
vello 0.7:
paint_solid — fills each deformed triangle with a colour (vector mesh /
debug). Trivial.
paint_textured — a textured mesh: per triangle, it clips to the deformed
triangle and draws the image with the affine mapping its UVs to the deformed
position (piecewise-affine warp). Cost = one clip layer per triangle; careful
with meshes of thousands of triangles.
paint_wireframe — strokes the triangle edges (to see the deformation; ideal
for demos and debugging).
Framing helpers: rest_bounds (the mesh's bbox at rest) and fit_transform (the
affine fitting those bounds, centred, into a PaintRect).