X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=blobdiff_plain;f=src%2Fmatrix4.cpp;fp=src%2Fmatrix4.cpp;h=0000000000000000000000000000000000000000;hp=4506166cd138ef08cacbbf66f42806f3bb96eb8d;hb=d392bfc335713faab44275624d8fd78139880975;hpb=3bb58c2b45af12c0f9c9eac648e67ac6fa90e104 diff --git a/src/matrix4.cpp b/src/matrix4.cpp deleted file mode 100644 index 4506166..0000000 --- a/src/matrix4.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* 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 "matrix4.h" - -using namespace irr; - -SCM -scm_from_matrix4 (core::matrix4 cmatrix) -{ - return scm_list_4 (scm_list_4 (scm_from_double (cmatrix[0]), - scm_from_double (cmatrix[1]), - scm_from_double (cmatrix[2]), - scm_from_double (cmatrix[3])), - scm_list_4 (scm_from_double (cmatrix[4]), - scm_from_double (cmatrix[5]), - scm_from_double (cmatrix[6]), - scm_from_double (cmatrix[7])), - scm_list_4 (scm_from_double (cmatrix[8]), - scm_from_double (cmatrix[9]), - scm_from_double (cmatrix[10]), - scm_from_double (cmatrix[11])), - scm_list_4 (scm_from_double (cmatrix[12]), - scm_from_double (cmatrix[13]), - scm_from_double (cmatrix[14]), - scm_from_double (cmatrix[15]))); -} - -core::matrix4 -scm_to_matrix4 (SCM matrix) -{ - core::matrix4 cmatrix; - - cmatrix[0] = scm_to_double (scm_car (scm_car (matrix))); - cmatrix[1] = scm_to_double (scm_cadr (scm_car (matrix))); - cmatrix[2] = scm_to_double (scm_caddr (scm_car (matrix))); - cmatrix[3] = scm_to_double (scm_cadddr (scm_car (matrix))); - - cmatrix[4] = scm_to_double (scm_car (scm_cadr (matrix))); - cmatrix[5] = scm_to_double (scm_cadr (scm_cadr (matrix))); - cmatrix[6] = scm_to_double (scm_caddr (scm_cadr (matrix))); - cmatrix[7] = scm_to_double (scm_cadddr (scm_cadr (matrix))); - - cmatrix[8] = scm_to_double (scm_car (scm_caddr (matrix))); - cmatrix[9] = scm_to_double (scm_cadr (scm_caddr (matrix))); - cmatrix[10] = scm_to_double (scm_caddr (scm_caddr (matrix))); - cmatrix[11] = scm_to_double (scm_cadddr (scm_caddr (matrix))); - - cmatrix[12] = scm_to_double (scm_car (scm_cadddr (matrix))); - cmatrix[13] = scm_to_double (scm_cadr (scm_cadddr (matrix))); - cmatrix[14] = scm_to_double (scm_caddr (scm_cadddr (matrix))); - cmatrix[15] = scm_to_double (scm_cadddr (scm_cadddr (matrix))); - - return cmatrix; -}