No matching definitions.

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

evaluate an SdfExpr at point (px, py, pz).

eSdfExpr handle
px py pz -- query point components

Signed distance: negative inside the surface, zero on it, positive outside.

(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] :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] :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] :float)

z component of the surface normal at (px,py,pz). Since: Phase 1

Internal definitions
sdf--sphere-eval
sdf--box-eval
sdf--cylinder-eval
sdf--plane-eval
sdf--smooth-union-eval
sdf--fabs