Somewhat improved wrapping

This commit is contained in:
Dane Johnson
2021-01-15 17:51:19 -06:00
parent 2a12a1f119
commit 7651923ee8
5 changed files with 34 additions and 6 deletions

4
scripting/.dir-locals.el Normal file
View File

@@ -0,0 +1,4 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((c-mode . ((mode . c++))))

View File

@@ -1,9 +1,9 @@
%module couch
%typemap(in) cfloat {
$1 = (cfloat) lua_tonumber(L, $input);
}
%include "typemaps.i"
%{
#include "types.h"
#include "Node.h"
#include "Transform.h"
#include "Spatial.h"
@@ -11,11 +11,18 @@
#include "Mesh.h"
#include "Ball.h"
#include "Camera.h"
%}
%}
typedef float cfloat;
struct Vector3 {
%ignore "cfloat";
class Vector3 {
public:
cfloat x, y, z;
};
%ignore "Vector3";
%include "types.h"
%include "Node.h"
%include "Spatial.h"
%include "Transform.h"
@@ -23,3 +30,4 @@ struct Vector3 {
%include "Mesh.h"
%include "Ball.h"
%include "Camera.h"