Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added the aabb struct

  • Loading branch information...
commit ed536404ebb5d68945da56c8e3efdc7b9f3ae21d 1 parent 5f4fc84
@Kazade authored
View
2  CMakeLists.txt
@@ -1,3 +1,5 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
PROJECT(Kazmath)
SET(CMAKE_C_FLAGS "-std=c99")
View
8 build-linux/kazmath.cbp
@@ -36,6 +36,14 @@
<Add option="-Wall" />
<Add option="-std=c99" />
</Compiler>
+ <Unit filename="../src/aabb.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Unit filename="../src/aabb.h" />
+ <Unit filename="../src/mat3.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Unit filename="../src/mat3.h" />
<Unit filename="../src/mat4.c">
<Option compilerVar="CC" />
</Unit>
View
12 build-linux/kazmath.layout
@@ -1,11 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Debug" />
- <File name="../src/mat4.c" open="1" top="0" tabpos="4">
- <Cursor position="9261" topLine="288" />
+ <File name="../src/aabb.c" open="1" top="0" tabpos="6">
+ <Cursor position="686" topLine="0" />
+ </File>
+ <File name="../src/aabb.h" open="1" top="0" tabpos="5">
+ <Cursor position="663" topLine="0" />
+ </File>
+ <File name="../src/mat4.c" open="1" top="1" tabpos="4">
+ <Cursor position="748" topLine="249" />
</File>
<File name="../src/mat4.h" open="1" top="0" tabpos="3">
- <Cursor position="1945" topLine="3" />
+ <Cursor position="0" topLine="0" />
</File>
<File name="../src/plane.c" open="1" top="0" tabpos="1">
<Cursor position="3334" topLine="93" />
View
22 src/aabb.h
@@ -18,17 +18,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef AABB_H_INCLUDED
-#define AABB_H_INCLUDED
+#ifndef KAZMATH_AABB_H_INCLUDED
+#define KAZMATH_AABB_H_INCLUDED
+
+#include "vec3.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
typedef struct kmAABB {
- kmVec3 m_Min; /** The max corner of the box */
- kmVec3 m_Max; /** The min corner of the box */
+ kmVec3 min; /** The max corner of the box */
+ kmVec3 max; /** The min corner of the box */
} kmAABB;
-bool kmAABBPointInBox(const kmVec3* point);
+int kmAABBPointInBox(const kmVec3* point);
kmAABB* kmAABBAssign(kmAABB* pOut, const kmAABB* pIn);
kmAABB* kmAABBScale(kmAABB* pOut, const kmAABB* pIn, kmScalar s);
-
-#endif AABB_H_INCLUDED
+#ifdef __cplusplus
+}
+#endif
+#endif
Please sign in to comment.
Something went wrong with that request. Please try again.