-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(collisions): replace broadphase resource with relations to i…
…dentify a pair of potentially colliding entities
- Loading branch information
1 parent
c7d9aeb
commit a7827b6
Showing
9 changed files
with
60 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 0 additions & 61 deletions
61
engine/include/cubos/engine/collisions/broad_phase/candidates.hpp
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
engine/include/cubos/engine/collisions/broad_phase/potentially_colliding_with.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// @file | ||
/// @brief Component @ref cubos::engine::PotentiallyCollidingWith. | ||
/// @ingroup collisions-plugin | ||
|
||
// FIXME: This should be private, but it's used in the sample. | ||
|
||
#pragma once | ||
|
||
#include <cubos/core/reflection/reflect.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @brief Component which represents a potential collisions. | ||
/// @ingroup collisions-plugin | ||
struct PotentiallyCollidingWith | ||
{ | ||
CUBOS_REFLECT; | ||
}; | ||
} // namespace cubos::engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
engine/src/cubos/engine/collisions/broad_phase/candidates.cpp
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
engine/src/cubos/engine/collisions/broad_phase/potentially_colliding_with.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <cubos/core/ecs/reflection.hpp> | ||
#include <cubos/core/reflection/type.hpp> | ||
|
||
#include <cubos/engine/collisions/broad_phase/potentially_colliding_with.hpp> | ||
|
||
CUBOS_REFLECT_IMPL(cubos::engine::PotentiallyCollidingWith) | ||
{ | ||
return core::ecs::TypeBuilder<PotentiallyCollidingWith>("cubos::engine::PotentiallyCollidingWith") | ||
.symmetric() | ||
.build(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters