X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fbox3d.cpp;h=9b78836f1a25165fc2bf5d8b9c7ef71693217960;hb=69ed7f57e6295034fa64ab2bf6d10da6882860ef;hp=ee5c65bd312dbbe5b662b1695345a64909db61ef;hpb=37217d692d4ead81cfed829395a9a7a5caf9325c;p=guile-irrlicht.git diff --git a/src/box3d.cpp b/src/box3d.cpp index ee5c65b..9b78836 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -22,6 +22,7 @@ #include #include #include "box3d.h" +#include "gsubr.h" #include "vector3d.h" #include "wrapped.h" @@ -31,15 +32,24 @@ extern "C" { init_box3d (void) { init_box3d_type (); - scm_c_define_gsubr ("box3d-reset!", 2, 0, 0, (scm_t_subr)box3d_reset); - scm_c_define_gsubr ("make-box3d", 0, 0, 0, (scm_t_subr)make_box3d); - scm_c_export ("box3d-reset!", "make-box3d", NULL); + DEFINE_GSUBR ("box3d-add-internal-point!", 2, 0, 0, box3d_add_internal_point); + DEFINE_GSUBR ("box3d-reset!", 2, 0, 0, box3d_reset); + DEFINE_GSUBR ("make-box3d", 0, 0, 0, make_box3d); } DEFINE_WRAPPED_TYPE (irr::core::aabbox3df*, "box3d", init_box3d_type, box3d_p, wrap_box3d, unwrap_box3d); + SCM + box3d_add_internal_point (SCM box3d, + SCM point) + { + irr::core::aabbox3df* aabbox = unwrap_box3d (box3d); + aabbox->addInternalPoint (scm_to_vector3df (point)); + return SCM_UNSPECIFIED; + } + SCM box3d_reset (SCM box3d, SCM init_value)