sdf/eval
src/sdf/eval.tur
CPU evaluator for SdfExpr trees.
Since: Phase 1
defn
sdf-eval
(sdf-eval [e : int px : float py : float pz : float] :)
evaluate an SdfExpr at point (px, py, pz).
Parameters
| e | SdfExpr handle | |
| px py pz -- query point components |
Returns
Signed distance: negative inside the surface, zero on it, positive outside.
Example
(sdf-eval (sdf-sphere 0.0 0.0 0.0 1.0) 0.5 0.0 0.0) ; => -0.5
Since: Phase 1
defn
sdf-normal-x
(sdf-normal-x [e : int px : float py : float pz : float] :)
x component of the surface normal at (px,py,pz).
Since: Phase 1
defn
sdf-normal-y
(sdf-normal-y [e : int px : float py : float pz : float] :)
y component of the surface normal at (px,py,pz). Since: Phase 1
defn
sdf-normal-z
(sdf-normal-z [e : int px : float py : float pz : float] :)
z component of the surface normal at (px,py,pz). Since: Phase 1