Skip to content

Commit f507c06

Browse files
committed
::Math + ::Games FFI
1 parent 67d4520 commit f507c06

4 files changed

Lines changed: 7 additions & 53 deletions

File tree

3DRadSpace/Engine3DRadSpace/FFI/Game.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ typedef void* E3DRSP_Game;
1111
extern "C"
1212
{
1313
#endif
14-
E3DRSP_GAMES_EXPORT E3DRSP_Game E3DRSP_Game_Create(const char* title, size_t width, size_t height);
14+
E3DRSP_FFI_EXPORT E3DRSP_Game E3DRSP_Game_Create(const char* title, size_t width, size_t height);
1515

16-
E3DRSP_GAMES_EXPORT void E3DRSP_Game_Run(E3DRSP_Game game);
17-
E3DRSP_GAMES_EXPORT void E3DRSP_Game_RunOneFrame(E3DRSP_Game game);
16+
E3DRSP_FFI_EXPORT void E3DRSP_Game_Run(E3DRSP_Game game);
17+
E3DRSP_FFI_EXPORT void E3DRSP_Game_RunOneFrame(E3DRSP_Game game);
1818

19-
E3DRSP_GAMES_EXPORT E3DRSP_Ray E3DRSP_Game_GetMouseRay(
19+
E3DRSP_FFI_EXPORT E3DRSP_Ray E3DRSP_Game_GetMouseRay(
2020
E3DRSP_Game game,
2121
E3DRSP_Vector2 mousePos,
2222
const E3DRSP_Matrix4x4* view,

3DRadSpace/Engine3DRadSpace/FFI/Math/BoundingBox.h

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,4 @@ typedef struct E3DRSP_BoundingBox
1010

1111
struct E3DRSP_BoundingSphere;
1212
struct E3DRSP_BoundingPlane;
13-
struct E3DRSP_Ray;
14-
15-
#ifdef __cplusplus
16-
extern "C"
17-
{
18-
#endif
19-
E3DRSP_Vector3 E3DRSP_BoundingBox_Min(E3DRSP_BoundingBox* box);
20-
E3DRSP_Vector3 E3DRSP_BoundingBox_Center(E3DRSP_BoundingBox* box);
21-
E3DRSP_Vector3 E3DRSP_BoundingBox_Max(E3DRSP_BoundingBox* box);
22-
23-
bool E3DRSP_BoundingBox_IntersectsBox(E3DRSP_BoundingBox* box1, const E3DRSP_BoundingBox *box2);
24-
bool E3DRSP_BoundingBox_IntersectsSphere(E3DRSP_BoundingBox* box, const E3DRSP_BoundingSphere *sphere);
25-
bool E3DRSP_BoundingBox_IntersectsPlane(E3DRSP_BoundingBox* box, const E3DRSP_BoundingPlane *plane);
26-
bool E3DRSP_BoundingBox_IntersectsRay(E3DRSP_BoundingBox* box, const E3DRSP_Ray *ray);
27-
28-
bool E3DRSP_BoundingBox_ContainsPoint(E3DRSP_BoundingBox* box, const E3DRSP_Vector3* point);
29-
30-
E3DRSP_Vector3 E3DRSP_BoundingBox_GetCorner(E3DRSP_BoundingBox* box, int index);
31-
#ifdef __cplusplus
32-
}
33-
#endif
13+
struct E3DRSP_Ray;

3DRadSpace/Engine3DRadSpace/FFI/Math/BoundingPlane.h

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,4 @@ typedef struct E3DRSP_BoundingPlane
99
{
1010
E3DRSP_Vector3 Normal;
1111
float D;
12-
} E3DRSP_BoundingPlane;
13-
14-
#ifdef __cplusplus
15-
extern "C"
16-
{
17-
#endif
18-
E3DRSP_MATH_EXPORT bool E3DRSP_BoundingPlane_IntersectsBox(E3DRSP_BoundingPlane* plane, const E3DRSP_BoundingBox* box);
19-
E3DRSP_MATH_EXPORT bool E3DRSP_BoundingPlane_IntersectsSphere(E3DRSP_BoundingPlane* plane, const E3DRSP_BoundingSphere* sphere);
20-
E3DRSP_MATH_EXPORT bool E3DRSP_BoundingPlane_IntersectsRay(E3DRSP_BoundingPlane* plane, const E3DRSP_Ray* ray);
21-
22-
E3DRSP_MATH_EXPORT bool E3DRSP_BoundingPlane_ContainsPoint(E3DRSP_BoundingPlane* plane, const E3DRSP_Vector3* p);
23-
24-
#ifdef __cplusplus
25-
}
26-
#endif
12+
} E3DRSP_BoundingPlane;

3DRadSpace/Engine3DRadSpace/FFI/Math/BoundingSphere.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,4 @@ typedef struct E3DRSP_BoundingSphere
99
{
1010
E3DRSP_Vector3 Center;
1111
float Radius;
12-
} E3DRSP_BoundingSphere;
13-
14-
#ifdef __cplusplus
15-
extern "C"
16-
{
17-
#endif
18-
E3DRSP_MATH_EXPORT bool E3DRSP_BoundingSphere_IntersectsBox(E3DRSP_BoundingSphere* sphere, const E3DRSP_BoundingBox* box);
19-
E3DRSP_MATH_EXPORT bool E3DRSP_BoundingSphere_IntersectsSphere(E3DRSP_BoundingSphere* sphere1, const E3DRSP_BoundingSphere* sphere2);
20-
E3DRSP_MATH_EXPORT bool E3DRSP_BoundingSphere_IntersectsPlane(E3DRSP_BoundingSphere* sphere, const E3DRSP_BoundingPlane* plane);
21-
E3DRSP_MATH_EXPORT bool E3DRSP_BoundingSphere_ContainsPoint(E3DRSP_BoundingSphere* sphere, const E3DRSP_Vector3* point);
22-
#ifdef __cplusplus
23-
}
24-
#endif
12+
} E3DRSP_BoundingSphere;

0 commit comments

Comments
 (0)