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