chore(binana): add files

This commit is contained in:
phaneron 2024-07-07 03:00:06 -04:00
commit aa605d1aef
14 changed files with 305 additions and 0 deletions

View file

@ -0,0 +1,21 @@
#ifndef TEMPEST_BOX_H
#define TEMPEST_BOX_H
#include "tempest/vector.h"
#include "tempest/range.h"
typedef struct CAaBox CAaBox;
typedef struct CBoundingBox CBoundingBox;
struct CAaBox {
C3Vector b;
C3Vector t;
};
struct CBoundingBox {
CRange x;
CRange y;
CRange z;
};
#endif

View file

@ -0,0 +1,55 @@
#ifndef TEMPEST_MATRIX_H
#define TEMPEST_MATRIX_H
typedef struct C33Matrix C33Matrix;
typedef struct C34Matrix C34Matrix;
typedef struct C44Matrix C44Matrix;
struct C33Matrix {
float a0;
float a1;
float a2;
float b0;
float b1;
float b2;
float c0;
float c1;
float c2;
};
struct C34Matrix {
float a0;
float a1;
float a2;
float b0;
float b1;
float b2;
float c0;
float c1;
float c2;
float d0;
float d1;
float d2;
};
struct C44Matrix {
float a0;
float a1;
float a2;
float a3;
float b0;
float b1;
float b2;
float b3;
float c0;
float c1;
float c2;
float c3;
float d0;
float d1;
float d2;
float d3;
};
#endif

View file

@ -0,0 +1,13 @@
#ifndef TEMPEST_PLANE_H
#define TEMPEST_PLANE_H
#include "tempest/vector.h"
typedef struct C4Plane C4Plane;
struct C4Plane {
C3Vector n;
float d;
};
#endif

View file

@ -0,0 +1,13 @@
#ifndef TEMPEST_QUATERNION_H
#define TEMPEST_QUATERNION_H
typedef struct C4Quaternion C4Quaternion;
struct C4Quaternion {
float x;
float y;
float z;
float w;
};
#endif

View file

@ -0,0 +1,19 @@
#ifndef TEMPEST_RANGE_H
#define TEMPEST_RANGE_H
#include <stdint.h>
typedef struct CRange CRange;
typedef struct CiRange CiRange;
struct CRange {
float l;
float h;
};
struct CiRange {
int32_t l;
int32_t h;
};
#endif

View file

@ -0,0 +1,20 @@
#ifndef TEMPEST_RECT_H
#define TEMPEST_RECT_H
#include <stdint.h>
struct CRect {
float minY; // t
float minX; // l
float maxY; // b
float maxX; // r
};
struct CiRect {
int32_t minY;
int32_t minX;
int32_t maxY;
int32_t maxX;
};
#endif

View file

@ -0,0 +1,11 @@
#ifndef TEMPEST_SPHERE_H
#define TEMPEST_SPHERE_H
#include "tempest/vector.h"
struct CAaSphere {
C3Vector n;
float d;
};
#endif

View file

@ -0,0 +1,42 @@
#ifndef TEMPEST_VECTOR_H
#define TEMPEST_VECTOR_H
#include <stdint.h>
typedef struct C2Vector C2Vector;
typedef struct C3Vector C3Vector;
typedef struct C4Vector C4Vector;
typedef struct CImVector CImVector;
struct C2Vector {
float x;
float y;
};
struct C2iVector {
int32_t x;
int32_t y;
};
struct C3Vector {
float x;
float y;
float z;
};
struct C4Vector {
float x;
float y;
float z;
float w;
};
struct CImVector {
uint8_t b;
uint8_t g;
uint8_t r;
uint8_t a;
};
#endif