Added 3d util functions.