couch/scripting/couch.i

59 lines
944 B
OpenEdge ABL
Raw Normal View History

2021-01-13 16:47:16 -06:00
%module couch
2021-01-15 17:51:19 -06:00
%include "typemaps.i"
#ifdef SWIGLUA
%include "lua/helpers.i"
#endif // SWIGLUA
2021-01-15 17:51:19 -06:00
2021-01-13 16:47:16 -06:00
%{
2021-01-15 17:51:19 -06:00
#include "types.h"
2021-01-20 21:42:14 -06:00
#include "constants.h"
2021-01-14 11:52:01 -06:00
#include "Node.h"
2021-01-13 16:47:16 -06:00
#include "Transform.h"
2021-01-14 11:52:01 -06:00
#include "Spatial.h"
2021-01-13 16:47:16 -06:00
#include "Mesh.h"
2021-01-20 14:54:54 -06:00
#include "Material.h"
2021-01-13 16:47:16 -06:00
#include "Camera.h"
2021-01-21 15:26:39 -06:00
#include "Light.h"
2021-01-15 20:33:25 -06:00
%}
2021-01-15 17:51:19 -06:00
2021-01-20 14:54:54 -06:00
%rename("%(strip:[script_])s") "";
2021-01-14 11:52:01 -06:00
typedef float cfloat;
2021-01-15 17:51:19 -06:00
%ignore "cfloat";
class Vector3 {
public:
2021-01-15 20:33:25 -06:00
Vector3();
2021-01-21 15:26:39 -06:00
Vector3(cfloat x, cfloat y, cfloat z);
2021-01-14 11:52:01 -06:00
cfloat x, y, z;
2021-01-13 18:51:58 -06:00
};
2021-01-20 14:54:54 -06:00
2021-01-15 20:33:25 -06:00
%extend Vector3 {
Vector3 operator+(const Vector3 &o) const {
return *$self + o;
}
Vector3 operator*(const cfloat &o) const {
return *$self * o;
}
}
2021-01-15 17:51:19 -06:00
%ignore "Vector3";
2021-01-21 15:26:39 -06:00
%extend DirectionalLight {
static DirectionalLight* script_new() {
return new DirectionalLight();
}
}
2021-01-15 17:51:19 -06:00
%include "types.h"
2021-01-20 21:42:14 -06:00
%include "constants.h"
2021-01-14 11:52:01 -06:00
%include "Node.h"
%include "Spatial.h"
2021-01-13 16:47:16 -06:00
%include "Mesh.h"
2021-01-20 14:54:54 -06:00
%include "Transform.h"
%include "Material.h"
2021-01-13 16:47:16 -06:00
%include "Camera.h"
2021-01-21 15:26:39 -06:00
%include "Light.h"
2021-01-15 17:51:19 -06:00