Crate saft

Source
Expand description

Signed distance field function compiler/interpreter/discretizer/mesher.

Modules§

sphere_tracing

Structs§

BoundingBox
A 3-dimensional axis-aligned bounding box
CodeGen
CodeGenContext
ConstantEditor
ConstantReader
ExampleParams
Allows you to animate and play with the example scene.
Graph
A high-level definition of a signed distance field function
Grid3
Stores values on a 3D cube lattice on the coordinates [0,0,0] - [w-1, h-1, d-1]. A 3D tensor, basically.
Interpreter
InterpreterContext
MarchingCubes
Material
MeshOptions
NodeId
Program
Represents a signed distance field function as a program with a constant pool and opcodes.
RgbWithDistance
r, g, b, distance
TriangleMesh
Vertex

Enums§

Backend
CsgOp
Error
Node
Opcode
Assembly. Lower level representation.
OutputType

Traits§

SignedDistance

Functions§

compile
constants_hash
decompile
disassemble
gather_colors_in_place
get_glsl_sdf_interpreter_code
get_glsl_sdf_library_code
march
Marches a ray from t_range.start() until t_range.end(), returning the first hit, or the place where the trace got closest to the surface.
mesh_from_sdf
mesh_from_sdf_func
mesh_from_sdf_program
opcodes_hash
sd_biconvex_lens
sd_capsule
sd_cone
sd_cone_f
Base at origin, with height h along positive Y.
sd_material
sd_op_intersect
sd_op_intersect_smooth
sd_op_subtract
sd_op_subtract_smooth
sd_op_union
sd_op_union_smooth
sd_plane
sd_rounded_box
sd_rounded_cylinder
sd_rounded_cylinder_f
sd_sphere
sd_tapered_capsule
sd_tapered_capsule_f
sd_torus
sd_torus_sector
sdf_bb_and_resolution
Pick a good expanded bounding box and grid size from the given tight bounding box
surface_distance_to
to_sd_func
transform_positions_in_place

Type Aliases§

Index3