(bind-func fluid-cube-add-density
(lambda (cube:fluidcube* x y z amount:double)
(let ((N (tref cube 0))
(idx (fluid-ix x y z N))
(density-ptr:double* (tref cube 5))
(density (pref density-ptr idx)))
(pset! density-ptr idx (+ density amount))
(+ density amount))))