luvcraft/world-quantities.lisp
in-package#:luvcraft.world.quantities
math:define-quantity-kind:lattice-velocity:dimension
:duration-1
math:define-quantity-kind:lattice-acceleration:dimension
:duration-2
math:define-quantity:world-direction:kind:unit-direction:components
:world-x-direction:world-y-direction:world-z-direction
math:define-quantity:world-position:kind:lattice-coordinate:character:point:components
:world-x-position:world-y-position:world-z-position
math:define-quantity:world-velocity:kind:lattice-velocity:components
:world-x-velocity:world-y-velocity:world-z-velocity
defmacro define-quantity-kind
(name &key dimension parent)defmacro define-unit
(name &rest options)defmacro define-quantity
(name &key kind components non-negative-p
(character nil character-supplied-p))Define quantity NAME and any homogeneous COMPONENTS as members of KIND. NON-NEGATIVE-P declares a non-negative amount and defaults its character to :ABSOLUTE. CHARACTER may state :POINT, :ABSOLUTE, or :DIFFERENCE explicitly. Components inherit both.
Quantities owned by the world model rather than the luvcraft application.
A continuous lattice coordinate is measured in
cell.cellis dimensionless but deliberately not the identity unit: one cell is not one metre unless a particularvoxel-spacesays so through its CELL-EXTENT.