diff options
Diffstat (limited to 'neofx')
-rw-r--r-- | neofx/collision.h | 2 | ||||
-rw-r--r-- | neofx/math.h | 2 | ||||
-rw-r--r-- | neofx/physics.h | 9 | ||||
-rw-r--r-- | neofx/types.h | 14 |
4 files changed, 21 insertions, 6 deletions
diff --git a/neofx/collision.h b/neofx/collision.h index ce5ff5f..5abe327 100644 --- a/neofx/collision.h +++ b/neofx/collision.h @@ -1,7 +1,7 @@ #ifndef NEOFX_COLLISION_H
#define NEOFX_COLLISION_H
-#include "types.h"
+#include <neofx/types.h>
int CollisionPointTriangle(VERTEX, TRIANGLE);
int CollisionRayTriangle(VERTEX, VECTOR, TRIANGLE, float*);
diff --git a/neofx/math.h b/neofx/math.h index f0f6550..9d6c37c 100644 --- a/neofx/math.h +++ b/neofx/math.h @@ -1,7 +1,7 @@ #ifndef NEOFX_MATH_H #define NEOFX_MATH_H -#include "types.h" +#include <neofx/types.h> float VectorDot(VECTOR, VECTOR); VECTOR VectorCross(VECTOR, VECTOR); diff --git a/neofx/physics.h b/neofx/physics.h new file mode 100644 index 0000000..4eee4c9 --- /dev/null +++ b/neofx/physics.h @@ -0,0 +1,9 @@ +#ifndef NEOFX_PHYSICS_H +#define NEOFX_PHYSICS_H + +#include <neofx/types.h> + +void SetGravitation(VECTOR); +void ApplyPhysics(OBJECT, float); + +#endif diff --git a/neofx/types.h b/neofx/types.h index add2c88..8586545 100644 --- a/neofx/types.h +++ b/neofx/types.h @@ -1,15 +1,14 @@ #ifndef NEOFX_TYPES_H
#define NEOFX_TYPES_H
-#pragma pack(push, 2)
typedef union _MATRIX {
float m[4][4];
float f[16];
} MATRIX;
-typedef struct _VECTOR_VERTEX {
+typedef struct _VECTOR_VERTEX_ROTATION {
float x, y, z;
-} VECTOR, VERTEX;
+} VECTOR, VERTEX, ROTATION;
typedef struct _TEXCOORDS {
float s, t;
@@ -19,6 +18,13 @@ typedef struct _TRIANGLE { VERTEX vertices[3];
VECTOR normal;
} TRIANGLE;
-#pragma pack(pop)
+
+typedef struct _OBJECT {
+ VERTEX pos;
+ VECTOR move;
+ ROTATION rot;
+ float air_resistance;
+ float bounce;
+} OBJECT;
#endif
|