diff options
| author | raysan5 <raysan5@gmail.com> | 2016-01-20 18:20:05 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-01-20 18:20:05 +0100 |
| commit | efa1c96d19095c801a01dbf9b0214a82b7ae8c11 (patch) | |
| tree | 7fedcc9545ef4277ea49dd9e54e150591d458a76 /src/models.c | |
| parent | c8e8c0a0024a2301bbcc940233cbc4e82116242c (diff) | |
| download | raylib-efa1c96d19095c801a01dbf9b0214a82b7ae8c11.tar.gz raylib-efa1c96d19095c801a01dbf9b0214a82b7ae8c11.zip | |
Adapted raymath as single header library
Added support for single header implementation and also inline functions
support
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/models.c b/src/models.c index 06044820..3d228a30 100644 --- a/src/models.c +++ b/src/models.c @@ -34,8 +34,8 @@ #include <string.h> // Required for strcmp() #include <math.h> // Used for sin, cos, tan -#include "raymath.h" // Required for data type Matrix and Matrix functions #include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2 +#include "raymath.h" // Required for data type Matrix and Matrix functions //---------------------------------------------------------------------------------- // Defines and Macros @@ -1373,8 +1373,8 @@ bool CheckCollisionRayBox(Ray ray, Vector3 minBBox, Vector3 maxBBox) BoundingBox CalculateBoundingBox(Mesh mesh) { // Get min and max vertex to construct bounds (AABB) - Vector3 minVertex = mesh.vertices[0]; - Vector3 maxVertex = mesh.vertices[0]; + Vector3 minVertex = (Vector3){ mesh.vertices[0], mesh.vertices[1], mesh.vertices[2] }; + Vector3 maxVertex = (Vector3){ mesh.vertices[0], mesh.vertices[1], mesh.vertices[2] }; for (int i = 1; i < mesh.vertexCount; i++) { |
