private float NodeCost(Vec3i node, Vec3i destination) { float distCost = node.SquareDist(destination); float voxCost = Densities[node.x, node.y, node.z] * 32; return(distCost + voxCost); }