GithubHelp home page GithubHelp logo

godlike / arion Goto Github PK

View Code? Open in Web Editor NEW
3.0 8.0 1.0 108 KB

Real-time oriented 3d collision detection library

License: MIT License

CMake 8.53% C++ 91.20% Shell 0.27%
collision collision-detection gjk epa cso bounding-volume-hierarchy real-time

arion's Introduction

Arion

Join discord chat.

Linux Build Status

Windows Build status

arion's People

Contributors

ilia-glushchenko avatar mrdmitry avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mortal2000

arion's Issues

Ray-casting API

Move all the related functions and classes into separate API

EPA endless loops

Create a scene with only two following bodies:

Position:
x	9.3000000000000007	
y	6.7000000000000002	
z	6	
Size vectors:
x	0.40000000596046448	
y	0.20000000298023224	
z	0.69999998807907104	
Sphere
Position:
x	8.9000000000000004	
y	6.9000000000000004	
z	6.7000000000000002	
Radius	1	

EPA will fall into the endless loop.

GJK endless loops

With sphere-box collision with the precision of 1e-4 and box-box collision with the precision of 1e-10 GJK sometimes gets itself into the endless loop.
Currently, there is an endless loop detection workaround. However, an investigation is needed, in order to remove the source of the problem, or otherwise find and describe the precise reason for it.

Bounding volumes refactoring

Bounding volumes classes over at Arion/include/Arion/BoundingVolumes.hpp and Arion/sources/BoundingVolumes.cpp need some refactorings and optimizations:

  1. Rename indices to faces in Mesh struct -- this just makes more sense for that field;
  2. Introduce POD with with Mesh mesh and std::set<std::size_t> indices fields -- they are very often passed around in tandem, so that would be convenient;
  3. Make auxiliary structs, which store calculation data for bounding volume algorithms (see, for instance, OrientedBoundingBox::Box), private and rename them to something more sensible (like OBBData in the case of OrientedBoundingBox) -- they are only used inside those classes;
  4. Refactor bounding volumes classes in order to not store calculation data after the calculations are over (for instance, all fields in OrientedBoundingBox except m_boxShape are not used anywhere outside the constructor) -- right now this calculation data is still stored after constructor finishes execution.

Note: this issue was carried over from here in Pegasus repo.

Use modern CMake features

Move add_library block to the beginning of the file, unify add_library blocks by using ${PROJECT_NAME}
Add library aliases for configuration-level library checking
Use PUBLIC, INTERFACE and PRIVATE sections of target_ directives to allow CMake inherit options from linked libraries

Overall using modern CMake features reduces amount of boilerplate user code required to use the library and makes it easier to read CMake files when looking for some specific library options.

GJK Does not detect collision

In the scene where there are two boxes, one of which is static and axis aligned, another is oriented by the {1, 1, 1} axis and moves towards the first one, the collision is not registered and not resolved.

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.