GithubHelp home page GithubHelp logo

1robertslattery / geometrictestlibrary Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 5.0 116 KB

Solves 2D and 3D math problems, including, closest point, intersection, line of sight, and reflection vector:

Home Page: https://youtu.be/Sh8Vs4nfOLc

License: Apache License 2.0

C# 3.36% C++ 95.94% C 0.70%
geometry cpp intersection plane aabb rays projection sphere triangle reflection-vector ue4 3d-math dot-product vector-math primitives

geometrictestlibrary's Introduction

Geometric Test Library

Solves 2D and 3D math problems, including, closest point, intersection, line of sight and reflection vector.

OVERVIEW

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:

    1. Closest Point in AABB
    1. Closest Point on a Ray
    1. Closest Point on a Plane
    1. Closest Point on a Sphere
    1. Intersection AABB-Plane
    1. Intersection of Two Lines in 2D
    1. Intersection Ray-AABB
    1. Intersection Ray-Plane
    1. Intersection Ray-Triangle
    1. Intersection of Two Rays in 3D
    1. Dynamic Intersection Sphere-Plane
    1. Static Intersection Sphere-Plane
    1. Dynamic Intersection of Two Spheres
    1. Static Intersection of Two Spheres
    1. Intersection of Three Planes
    1. Intersection of Two AABBs
    1. Reflection Vector
    1. Barycentric Coordinates of Triangle in 3D

FILES AND FOLDERS

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

Config

Files Description
DefaultEditor.ini UE4 Config File
DefaultEngine.ini UE4 Config File
DefaultGame.ini UE4 Config File

Content/Maps

Files Description
EmptyLevel.umap UE4 Level

Source

Files and Folders Description
GeometricTests Geometric Tests Source
GeometricTests.Target.cs UE4 Build System
GeometricTestsEditor.Target.cs UE4 Build System

Source/GeometricTests

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

Source/GeometricTests/Math/LinearAlgebra

Files Description
Quaternion.h Templated struct that handles quaternions
Vector.h Templated struct that handles vector math

Source/GeometricTests/Math/Operations

Files Description
MathOperations.h Common math functions

Source/GeometricTests/Primitives

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

LICENSE

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.

geometrictestlibrary's People

Contributors

1robertslattery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.