|
HighMap library (C++)
|
Per-vertex penalty term used by sls_deformation. More...
#include <authoring.hpp>

Public Attributes | |
| Array | target |
| desired height field | |
| Array | weight |
| per-vertex weight (0 = free) | |
| DeformationConstraintType | type = MATCH |
| penalty type | |
| float | scale = 1.f |
| global weight of the term | |
Per-vertex penalty term used by sls_deformation.
Each constraint contributes scale * weight(x, y) * (z(x, y) - target(x, y))^2 to the fitness of a vertex, gated by its type: for MATCH the penalty always applies, for ABOVE only where z < target, for BELOW only where z > target. Vertices with a zero weight are unconstrained by that term. Several constraints are summed, so the scale factor can be used to normalize competing terms.
Typical uses (after Stachniak & Stuerzlinger, 2005):
| Array hmap::DeformationConstraint::target |
desired height field
| Array hmap::DeformationConstraint::weight |
per-vertex weight (0 = free)
| DeformationConstraintType hmap::DeformationConstraint::type = MATCH |
penalty type
| float hmap::DeformationConstraint::scale = 1.f |
global weight of the term