Skip to content

Commit

Permalink
Added the aabb struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazade committed Aug 14, 2008
1 parent 5f4fc84 commit ed53640
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,5 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(Kazmath) PROJECT(Kazmath)


SET(CMAKE_C_FLAGS "-std=c99") SET(CMAKE_C_FLAGS "-std=c99")
Expand Down
8 changes: 8 additions & 0 deletions build-linux/kazmath.cbp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
<Add option="-Wall" /> <Add option="-Wall" />
<Add option="-std=c99" /> <Add option="-std=c99" />
</Compiler> </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"> <Unit filename="../src/mat4.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
Expand Down
12 changes: 9 additions & 3 deletions build-linux/kazmath.layout
Original file line number Original file line Diff line number Diff line change
@@ -1,11 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file> <CodeBlocks_layout_file>
<ActiveTarget name="Debug" /> <ActiveTarget name="Debug" />
<File name="../src/mat4.c" open="1" top="0" tabpos="4"> <File name="../src/aabb.c" open="1" top="0" tabpos="6">
<Cursor position="9261" topLine="288" /> <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>
<File name="../src/mat4.h" open="1" top="0" tabpos="3"> <File name="../src/mat4.h" open="1" top="0" tabpos="3">
<Cursor position="1945" topLine="3" /> <Cursor position="0" topLine="0" />
</File> </File>
<File name="../src/plane.c" open="1" top="0" tabpos="1"> <File name="../src/plane.c" open="1" top="0" tabpos="1">
<Cursor position="3334" topLine="93" /> <Cursor position="3334" topLine="93" />
Expand Down
22 changes: 15 additions & 7 deletions src/aabb.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,17 +18,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */


#ifndef AABB_H_INCLUDED #ifndef KAZMATH_AABB_H_INCLUDED
#define AABB_H_INCLUDED #define KAZMATH_AABB_H_INCLUDED

#include "vec3.h"

#ifdef __cplusplus
extern "C" {
#endif


typedef struct kmAABB { typedef struct kmAABB {
kmVec3 m_Min; /** The max corner of the box */ kmVec3 min; /** The max corner of the box */
kmVec3 m_Max; /** The min corner of the box */ kmVec3 max; /** The min corner of the box */
} kmAABB; } kmAABB;


bool kmAABBPointInBox(const kmVec3* point); int kmAABBPointInBox(const kmVec3* point);


kmAABB* kmAABBAssign(kmAABB* pOut, const kmAABB* pIn); kmAABB* kmAABBAssign(kmAABB* pOut, const kmAABB* pIn);
kmAABB* kmAABBScale(kmAABB* pOut, const kmAABB* pIn, kmScalar s); kmAABB* kmAABBScale(kmAABB* pOut, const kmAABB* pIn, kmScalar s);

#ifdef __cplusplus
#endif AABB_H_INCLUDED }
#endif
#endif

0 comments on commit ed53640

Please sign in to comment.