]> git.jsancho.org Git - guile-irrlicht.git/blobdiff - src/box3d.cpp
Some doc
[guile-irrlicht.git] / src / box3d.cpp
index 71571b1013b9e59772ca4ac1b02e20e787039fd3..e254bc23cf2372a08efc8f18773e8302787e53b7 100644 (file)
 #include "box3d.h"
 #include "gsubr.h"
 #include "vector3d.h"
-
+#include "wrapped.h"
 
 using namespace irr;
 
-
 SCM
 aabbox3d_addInternalPoint (SCM box3d,
                            SCM point)
 {
-  ((core::aabbox3df*)scm_to_pointer (box3d))->addInternalPoint (scm_to_vector3df (point));
+  ((core::aabbox3df*)scm_to_irr_pointer (box3d))->addInternalPoint (scm_to_vector3df (point));
   return SCM_UNSPECIFIED;
 }
 
-
 SCM
 aabbox3d_make ()
 {
   core::aabbox3df* aabbox = new core::aabbox3df ();
-  return scm_from_pointer ((void*)aabbox, NULL);
+  return scm_from_irr_pointer ("<box3d>", (void*) aabbox);
 }
 
-
 SCM
 aabbox3d_reset (SCM box3d,
                 SCM init_value)
 {
-  ((core::aabbox3df*)scm_to_pointer (box3d))->reset (scm_to_vector3df (init_value));
+  ((core::aabbox3df*)scm_to_irr_pointer (box3d))->reset (scm_to_vector3df (init_value));
   return SCM_UNSPECIFIED;
 }
 
-
-extern "C" {
-
-  void
-  init_box3d (void)
-  {
-    DEFINE_GSUBR ("aabbox3d_addInternalPoint", 2, 0, 0, aabbox3d_addInternalPoint);
-    DEFINE_GSUBR ("aabbox3d_make", 0, 0, 0, aabbox3d_make);
-    DEFINE_GSUBR ("aabbox3d_reset", 2, 0, 0, aabbox3d_reset);
-  }
-
+void
+init_box3d (void)
+{
+  DEFINE_GSUBR ("aabbox3d_addInternalPoint", 2, 0, 0, aabbox3d_addInternalPoint);
+  DEFINE_GSUBR ("aabbox3d_make", 0, 0, 0, aabbox3d_make);
+  DEFINE_GSUBR ("aabbox3d_reset", 2, 0, 0, aabbox3d_reset);
 }