[][src]Module sdfu::primitives

A collection of primitive SDFs that may the modified using functions in mods or combined using functions in ops. Note that these primitives are always centered around the origin and that you must transform the point you are sampling into 'primitive-local' space. Functions are provided in mods to do this easier.

Also note that while all translation and rotation transformations of the input point will work properly, scaling modifies the Euclidian space and therefore does not work normally. Utility function shave been provided to Translate, Rotate, and Scale in the SDF trait and the mods module.

Structs

Box

A box centered at origin with axis-aligned dimensions.

CappedCylinder

A capped cylinder extending along an axis.

Circle

A circle centered at origin with a radius.

Cylinder

An infinite cylinder extending along an axis.

Line

A capsule extending from a to b with thickness thickness.

Sphere

A shere centered at origin with a radius.

Torus

A torus that sits on the XZ plane. Thickness is the radius of the wrapped cylinder while radius is the radius of the donut shape.

Enums

Axis