Skip to content

Commit 15a4d31

Browse files
committed
[src][broadphase] Apply new factory registration mechanism
1 parent 00a763a commit 15a4d31

2 files changed

Lines changed: 19 additions & 13 deletions

File tree

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
#include <sofa/collisionAlgorithm/broadphase/AABBBroadPhase.h>
22
#include <sofa/core/ObjectFactory.h>
33

4-
namespace sofa::collisionAlgorithm {
5-
6-
int AABBBroadPhaseClass = core::RegisterObject(R"(
7-
**AABBBroadPhase** is a real-time collision detection component that uses the Axis-Aligned Bounding Box (AABB) approach for broad-phase collision handling.
8-
9-
It organizes elements into a 3D spatial grid, efficiently indexing and retrieving them to identify potential collisions, optimizing the process of narrowing down collision checks for more precise detection in 3D simulations.
10-
)")
11-
.add< AABBBroadPhase >();
4+
namespace sofa::collisionAlgorithm
5+
{
6+
void registerAABBBroadPhase(sofa::core::ObjectFactory* factory)
7+
{
8+
factory->registerObjects(sofa::core::ObjectRegistrationData(R"(
9+
**AABBBroadPhase** is a real-time collision detection component that uses the
10+
Axis-Aligned Bounding Box (AABB) approach for broad-phase collision handling.
1211
12+
It organizes elements into a 3D spatial grid, efficiently indexing and retrieving them
13+
to identify potential collisions, optimizing the process of narrowing down collision
14+
checks for more precise detection in 3D simulations.
15+
)")
16+
.add<AABBBroadPhase>());
1317
}
18+
} // namespace sofa::collisionAlgorithm
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#include <sofa/collisionAlgorithm/broadphase/FullAABBBroadPhase.h>
22
#include <sofa/core/ObjectFactory.h>
33

4-
namespace sofa::collisionAlgorithm {
5-
6-
int FullAABBBroadPhaseClass = core::RegisterObject("FullAABBBroadPhase")
7-
.add< FullAABBBroadPhase >();
8-
4+
namespace sofa::collisionAlgorithm
5+
{
6+
void registerFullAABBBroadPhase(sofa::core::ObjectFactory* factory)
7+
{
8+
factory->registerObjects(sofa::core::ObjectRegistrationData("").add<FullAABBBroadPhase>());
99
}
10+
} // namespace sofa::collisionAlgorithm

0 commit comments

Comments
 (0)