Expand description
Brush deformation: moving vertices along their normals under a falloff.
inflate pushes the vertices under a Brush along their smooth
normals (compute_vertex_normals),
scaled by the brush strength and the
falloff weight of their distance from the brush
center. A negative strength pulls instead of pushing.
inflate, smooth and grab cost O(mesh) per call: they scan every
vertex, and the first two compute over the whole mesh. inflate_region,
smooth_region and grab_region move the same vertices to the same
positions, bit for bit, from a candidate list and the mesh’s incidence
index, so that their cost follows the brush region. Scene::dab in
fast-mesh-scene finds the candidates through the BVH.
Structs§
- Brush
- A deform brush: a sphere of influence with a falloff and a strength.
- Grab
Options - Options for
grab. - Grab
Options Builder - A builder for
GrabOptions, seeGrabOptions::builder. - Grab
Report - What
grabdid. - Inflate
Options - Options for
inflate. - Inflate
Options Builder - A builder for
InflateOptions, seeInflateOptions::builder. - Inflate
Report - What
inflatedid. - Smooth
Options - Options for
smooth. - Smooth
Options Builder - A builder for
SmoothOptions, seeSmoothOptions::builder. - Smooth
Report - What
smoothdid.
Enums§
- Falloff
- How a brush’s effect fades from its center (
t = 0) to its rim (t = 1). - Smooth
Method - How
smoothrelaxes: volume-preserving Taubin λ/μ cycles, or plain Laplacian passes that melt toward the centroid (sculpt smoothing).
Constants§
- TAUBIN_
LAMBDA - The shrinking Taubin step: each pass moves a vertex
w * λof the way from its position toward its neighbors’ centroid. - TAUBIN_
MU - The inflating Taubin step: each pass moves a vertex
w * μof the way from its position toward its neighbors’ centroid, which with the negativeμpushes it back out past where the λ pass left it.
Functions§
- grab
- Drags the vertices under the brush along one vector.
- grab_
region grabover the candidates inregion, with its cost following them instead of the mesh; seeinflate_regionfor whatregionmust hold. Grab needs no incidence index. A vertex no triangle uses moves only if it is listed.- inflate
- Pushes the vertices under the brush along their smooth normals.
- inflate_
region inflateover the candidates inregion, with its cost following them instead of the mesh: the same vertices move to the same positions, bit for bit, as long asregionis ascending and holds every vertex under the brush that is used by a triangle. Candidates outside the brush, or dead, are ignored.- smooth
- Smooths the vertices under the brush, Taubin λ/μ or plain Laplacian.
- smooth_
region smoothover the candidates inregion, with its cost following them instead of the mesh; seeinflate_regionfor whatregionmust hold.