Skip to content

Commit

Permalink
refactor(collisions): move potentiallyCollidingWith component to be p…
Browse files Browse the repository at this point in the history
…rivate
  • Loading branch information
fallenatlas committed Feb 11, 2024
1 parent f2e4f61 commit e3151e8
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
/// @brief Component @ref cubos::engine::CollidingWith.
/// @ingroup collisions-plugin

// FIXME: This should be private, but it's used in the sample.

#pragma once

#include <glm/vec3.hpp>
Expand Down
1 change: 0 additions & 1 deletion engine/samples/collisions/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <cubos/core/gl/debug.hpp>
#include <cubos/core/log.hpp>

#include <cubos/engine/collisions/broad_phase/potentially_colliding_with.hpp>
#include <cubos/engine/collisions/collider.hpp>
#include <cubos/engine/collisions/narrow_phase/colliding_with.hpp>
#include <cubos/engine/collisions/plugin.hpp>
Expand Down
3 changes: 2 additions & 1 deletion engine/src/collisions/broad_phase/plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@

#pragma once

#include <cubos/engine/collisions/broad_phase/potentially_colliding_with.hpp>
#include <cubos/engine/prelude.hpp>

#include "potentially_colliding_with.hpp"

namespace cubos::engine
{
/// @defgroup broad-phase-collisions-plugin Broad-phase Collisions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "potentially_colliding_with.hpp"

#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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
/// @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>
Expand Down
2 changes: 2 additions & 0 deletions engine/src/collisions/narrow_phase/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <cubos/engine/collisions/shapes/box.hpp>
#include <cubos/engine/transform/local_to_world.hpp>

#include "../broad_phase/potentially_colliding_with.hpp"

void cubos::engine::narrowPhaseCollisionsPlugin(Cubos& cubos)
{
cubos.addRelation<CollidingWith>();
Expand Down
1 change: 0 additions & 1 deletion engine/src/collisions/narrow_phase/plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#pragma once

#include <cubos/engine/collisions/broad_phase/potentially_colliding_with.hpp>
#include <cubos/engine/collisions/narrow_phase/colliding_with.hpp>
#include <cubos/engine/prelude.hpp>

Expand Down

0 comments on commit e3151e8

Please sign in to comment.