couch/scripting/couch.i

78 lines
1.3 KiB
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-23 11:54:34 -06:00
#include "Skybox.h"
2021-01-24 22:55:36 -06:00
#include "Rigidbody.h"
#include "CollisionShape.h"
2021-08-02 14:34:49 -05:00
#include "Input.h"
2021-04-21 18:27:30 -05:00
struct RaycastResult {
bool hit;
Vector3 position;
Vector3 normal;
Rigidbody *object;
};
class World {
public:
static World* GetWorld();
RaycastResult Raycast(const Vector3 &from, const Vector3 &to);
};
2021-01-15 20:33:25 -06:00
%}
2021-01-15 17:51:19 -06:00
class Vector3 {
public:
2021-01-15 20:33:25 -06:00
Vector3();
Vector3(float x, float y, float z);
float 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 float &o) const {
2021-01-15 20:33:25 -06:00
return *$self * o;
}
}
2021-01-15 17:51:19 -06:00
%ignore "Vector3";
2021-04-21 18:27:30 -05:00
struct RaycastResult {
bool hit;
Vector3 position;
Vector3 normal;
Rigidbody *object;
};
class World {
public:
static World* GetWorld();
RaycastResult Raycast(const Vector3 &from, const Vector3 &to);
};
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-23 11:54:34 -06:00
%include "Skybox.h"
2021-01-24 22:55:36 -06:00
%include "Rigidbody.h"
%include "CollisionShape.h"
2021-08-02 14:34:49 -05:00
%include "Input.h"