Solves 2D and 3D math problems, including, closest point
, intersection
, line of sight
and reflection vector
.
This project aims to teach 3D math. Everything can be found in the header file GeometricTestLibrary.h
.
Since these tests are commonly used in video games, this repository includes the Unreal Engine 4 project GeometricTests.uproject
.
These tests are designed to be used with any C++
application or game engine, however. The project is released under the Apache 2.0 License.
Examples:
-
- Closest Point in AABB
-
- Closest Point on a Ray
-
- Closest Point on a Plane
-
- Closest Point on a Sphere
-
- Intersection AABB-Plane
-
- Intersection of Two Lines in 2D
-
- Intersection Ray-AABB
-
- Intersection Ray-Plane
-
- Intersection Ray-Triangle
-
- Intersection of Two Rays in 3D
-
- Dynamic Intersection Sphere-Plane
-
- Static Intersection Sphere-Plane
-
- Dynamic Intersection of Two Spheres
-
- Static Intersection of Two Spheres
-
- Intersection of Three Planes
-
- Intersection of Two AABBs
-
- Reflection Vector
-
- Barycentric Coordinates of Triangle in 3D
Files and Folders | Description |
---|---|
Config |
UE4 project configuration files |
Content |
UE4 project files |
Source |
Project source |
CHANGELOG |
Log to track changes in respository |
LICENSE |
Apache 2.0 License |
GeometricTests.uproject |
UE4 project |
README |
This file |
Files | Description |
---|---|
DefaultEditor.ini |
UE4 Config File |
DefaultEngine.ini |
UE4 Config File |
DefaultGame.ini |
UE4 Config File |
Files | Description |
---|---|
EmptyLevel.umap |
UE4 Level |
Files and Folders | Description |
---|---|
GeometricTests |
Geometric Tests Source |
GeometricTests.Target.cs |
UE4 Build System |
GeometricTestsEditor.Target.cs |
UE4 Build System |
Files and Folders | Description |
---|---|
Math |
Math Directory |
Primitives |
Geometric Primitives Directory |
GeometricTestLibrary.h |
Geometric Test Library |
GeometricTest.Build.cs |
UE4 Build System |
GeometricTests.h |
Header: Module implementation for UE4 Project |
GeometricTests.cpp |
Source: Module implementation for UE4 Project |
GeometricTestsGameModeBase.h |
Header: UE4 Game Mode Base |
GeometricTestsGameModeBase.cpp |
Source: UE4 Game Mode Base |
Files | Description |
---|---|
Quaternion.h |
Templated struct that handles quaternions |
Vector.h |
Templated struct that handles vector math |
Files | Description |
---|---|
MathOperations.h |
Common math functions |
Files | Description |
---|---|
AABB.h |
Axis-Aligned Bounding Box Data |
Circle.h |
Circle Data |
Plane.h |
Plane Data |
Ray.h |
Ray Data |
Triangle.h |
Triangle Data |
Apache 2.0 License
Copyright (c) 2018-2019 Robert Slattery
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.