Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
n_aabb.h
Go to the documentation of this file.
1/*
2 * Nilorea Library
3 * Copyright (C) 2005-2026 Castagnier Mickael
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
27#ifndef __NILOREA_AABB3D__
28#define __NILOREA_AABB3D__
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#include "nilorea/n_common.h"
35#include "nilorea/n_str.h"
36#include "nilorea/n_log.h"
37
44typedef double AABB_VALUE;
45
61
64
67
69bool doAABB3DsIntersect(AABB3D box1, AABB3D box2);
70
71#ifdef __cplusplus
72}
73#endif
78#endif // header guard
AABB_VALUE yMin
first edge y coordinate
Definition n_aabb.h:51
AABB_VALUE yMax
second edge y coordinate
Definition n_aabb.h:57
AABB_VALUE zMax
second edge z coordinate
Definition n_aabb.h:59
AABB_VALUE xMax
second edge x coordinate
Definition n_aabb.h:55
AABB_VALUE xMin
first edge x coordinate
Definition n_aabb.h:49
AABB_VALUE zMin
first edge z coordinate
Definition n_aabb.h:53
bool doAABB3DsIntersect(AABB3D box1, AABB3D box2)
check if two 3D AABBs intersect
Definition n_aabb.c:73
bool isPointInsideAABB3D(AABB3D box, AABB_VALUE x, AABB_VALUE y, AABB_VALUE z)
check if a point is inside a 3D AABB
Definition n_aabb.c:61
double AABB_VALUE
type of a AABB component
Definition n_aabb.h:44
AABB3D createAABB3D(AABB_VALUE xMin, AABB_VALUE yMin, AABB_VALUE zMin, AABB_VALUE xMax, AABB_VALUE yMax, AABB_VALUE zMax)
create a 3D AABB
Definition n_aabb.c:42
Axis-Aligned Bounding Box (AABB) algorithm.
Definition n_aabb.h:47
Common headers and low-level functions & define.
Generic log system.
N_STR and string function declaration.