Collision.hpp
Go to the documentation of this file.
1 /*
2  * Original work Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
3  * Modified work Copyright (c) 2017 Louis Langholtz https://github.com/louis-langholtz/PlayRho
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  * Permission is granted to anyone to use this software for any purpose,
9  * including commercial applications, and to alter it and redistribute it
10  * freely, subject to the following restrictions:
11  * 1. The origin of this software must not be misrepresented; you must not
12  * claim that you wrote the original software. If you use this software
13  * in a product, an acknowledgment in the product documentation would be
14  * appreciated but is not required.
15  * 2. Altered source versions must be plainly marked as such, and must not be
16  * misrepresented as being the original software.
17  * 3. This notice may not be removed or altered from any source distribution.
18  */
19 
20 #ifndef PLAYRHO_COLLISION_COLLISION_HPP
21 #define PLAYRHO_COLLISION_COLLISION_HPP
22 
26 
27 #include <PlayRho/Common/Math.hpp>
30 
31 #include <array>
32 #include <type_traits>
33 
34 namespace playrho {
35 
38 enum class PointState
39 {
40  NullState,
41  AddState,
42  PersistState,
44 };
45 
50 {
53 
56 };
57 
58 namespace d2 {
59 
60 class Manifold;
61 
63 PointStates GetPointStates(const Manifold& manifold1, const Manifold& manifold2) noexcept;
64 
68 struct ClipVertex
69 {
72 };
73 
78 
87 ClipList ClipSegmentToLine(const ClipList& vIn, const UnitVec& normal, Length offset,
88  ContactFeature::Index indexA);
89 
90 } // namespace d2
91 } // namespace playrho
92 
93 #endif // PLAYRHO_COLLISION_COLLISION_HPP