Module rustic_zen::geom

source ·
Expand description

Rustic Zen’s native geometry primitives.

Comment at https://gitlab.com/IGBC/rustic-zen/-/issues/17 what your favourite geometry interoperablity library is and why we should port to it.

Until a succesful port to a math interoperabilty library happens a scene must be constructed using these primitives. Sorry. Thankfully 2D points, vectors, and 2x2 matricies are available, with quite a few helper functions. The raytracer core is written with these primitives so they are pretty fast too, leveraging matrix operations wherever it makes sense.

Points and Vectors are structurally identical, and can be freely cast between, however in the rustic zen api Points and Vectors are used to distingish between coordinates in the scene, and other vectors such as directions or normals.

Structs§

  • A standard 2x2 matrix implmentation
  • A meaningful spacial coordinate.
  • A standard 2D vector implementaion.