HighMap library (C++)
Loading...
Searching...
No Matches
hmap::DeformationConstraint Struct Reference

Per-vertex penalty term used by sls_deformation. More...

#include <authoring.hpp>

Collaboration diagram for hmap::DeformationConstraint:

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

Detailed Description

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):

Member Data Documentation

◆ target

Array hmap::DeformationConstraint::target

desired height field

◆ weight

Array hmap::DeformationConstraint::weight

per-vertex weight (0 = free)

◆ type

DeformationConstraintType hmap::DeformationConstraint::type = MATCH

penalty type

◆ scale

float hmap::DeformationConstraint::scale = 1.f

global weight of the term


The documentation for this struct was generated from the following file: