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 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 * implied. See the License for the specific language governing
15 * permissions and limitations under the License.
16 *
17 * SPDX-License-Identifier: Apache-2.0
18 */
19
28#ifndef __NILOREA_AABB3D__
29#define __NILOREA_AABB3D__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "nilorea/n_common.h"
36#include "nilorea/n_str.h"
37#include "nilorea/n_log.h"
38
45typedef double AABB_VALUE;
46
62
65
68
70bool doAABB3DsIntersect(AABB3D box1, AABB3D box2);
71
72#ifdef __cplusplus
73}
74#endif
79#endif // header guard
AABB_VALUE yMin
first edge y coordinate
Definition n_aabb.h:52
AABB_VALUE yMax
second edge y coordinate
Definition n_aabb.h:58
AABB_VALUE zMax
second edge z coordinate
Definition n_aabb.h:60
AABB_VALUE xMax
second edge x coordinate
Definition n_aabb.h:56
AABB_VALUE xMin
first edge x coordinate
Definition n_aabb.h:50
AABB_VALUE zMin
first edge z coordinate
Definition n_aabb.h:54
bool doAABB3DsIntersect(AABB3D box1, AABB3D box2)
check if two 3D AABBs intersect
Definition n_aabb.c:74
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:62
double AABB_VALUE
type of a AABB component
Definition n_aabb.h:45
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:43
Axis-Aligned Bounding Box (AABB) algorithm.
Definition n_aabb.h:48
Common headers and low-level functions & define.
Generic log system.
N_STR and string function declaration.