stim::signed_distance_field_sample struct

Holds the signed distance and the gradient of some signed distance field at some point.

Public variables

float distance
Signed distance from the object surface.
vec3 gradient
Field gradient.

Variable documentation

float stim::signed_distance_field_sample::distance

Signed distance from the object surface.

A negative value indicates the position is inside the object.

vec3 stim::signed_distance_field_sample::gradient

Field gradient.

A normalized direction vector pointing to the nearest point on the object's surface.