X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fvector3d.cpp;fp=src%2Fvector3d.cpp;h=85f5bf86223c18cca32660e5d8046cba0c8ce99e;hb=21f12bf4ba8c031b36784e1e0a479535f477cc59;hp=0000000000000000000000000000000000000000;hpb=56de371557044d3b7acc14cb94cc46641be906d9;p=guile-irrlicht.git diff --git a/src/vector3d.cpp b/src/vector3d.cpp new file mode 100644 index 0000000..85f5bf8 --- /dev/null +++ b/src/vector3d.cpp @@ -0,0 +1,37 @@ +/* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine + + Copyright (C) 2020 Javier Sancho + + This file is part of guile-irrlicht. + + guile-irrlicht is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + guile-irrlicht is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with guile-irrlicht. If not, see + . +*/ + +#include +#include +#include "vector3d.h" + +extern "C" { + + irr::core::vector3df + scm_to_vector3df (SCM vector3d) + { + return irr::core::vector3df + (scm_to_double (scm_car (vector3d)), + scm_to_double (scm_cadr (vector3d)), + scm_to_double (scm_caddr (vector3d))); + } + +}