Skip to content

Commit b44def5

Browse files
committed
[src][geometry] Apply new factory registration mechanism
1 parent 2ae269b commit b44def5

File tree

5 files changed

+44
-45
lines changed

5 files changed

+44
-45
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#include <sofa/collisionAlgorithm/geometry/EdgeGeometry.h>
22
#include <sofa/core/ObjectFactory.h>
33

4-
namespace sofa {
5-
6-
namespace collisionAlgorithm {
7-
8-
int EdgeGeometryClass = core::RegisterObject("EdgeGeometry")
9-
.add< EdgeGeometry<sofa::defaulttype::Vec3dTypes> >();
10-
11-
}
12-
4+
namespace sofa::collisionAlgorithm
5+
{
6+
void registerEdgeGeometry(sofa::core::ObjectFactory* factory)
7+
{
8+
factory->registerObjects(
9+
sofa::core::ObjectRegistrationData(
10+
"A class bridging edge topological information with the proximity detection algorithm")
11+
.add<EdgeGeometry<sofa::defaulttype::Vec3dTypes> >());
1312
}
13+
} // namespace sofa::collisionAlgorithm
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
#include <sofa/collisionAlgorithm/geometry/PointGeometry.h>
22
#include <sofa/core/ObjectFactory.h>
33

4-
namespace sofa {
5-
6-
namespace collisionAlgorithm {
7-
8-
int PointGeometryClass = core::RegisterObject("PointGeometry")
9-
.add< PointGeometry<sofa::defaulttype::Vec3dTypes> >();
10-
4+
namespace sofa::collisionAlgorithm
5+
{
6+
void registerPointGeometry(sofa::core::ObjectFactory* factory)
7+
{
8+
factory->registerObjects(
9+
sofa::core::ObjectRegistrationData(
10+
"A class bridging point topological information with the proximity detection algorithm")
11+
.add<PointGeometry<sofa::defaulttype::Vec3dTypes> >());
1112
}
12-
13-
}
14-
15-
13+
} // namespace sofa::collisionAlgorithm
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
#include <sofa/collisionAlgorithm/geometry/SubsetGeometry.h>
22
#include <sofa/core/ObjectFactory.h>
33

4-
namespace sofa {
5-
6-
namespace collisionAlgorithm {
7-
8-
int SubsetGeometryClass = core::RegisterObject("SubsetGeometry")
9-
.add< SubsetGeometry<sofa::defaulttype::Vec3dTypes> >();
10-
4+
namespace sofa::collisionAlgorithm
5+
{
6+
void registerSubsetGeometry(sofa::core::ObjectFactory* factory)
7+
{
8+
factory->registerObjects(
9+
sofa::core::ObjectRegistrationData("")
10+
.add<SubsetGeometry<sofa::defaulttype::Vec3dTypes> >());
1111
}
12-
13-
}
14-
15-
12+
} // namespace sofa::collisionAlgorithm
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#include <sofa/collisionAlgorithm/geometry/TetrahedronGeometry.h>
22
#include <sofa/core/ObjectFactory.h>
33

4-
namespace sofa {
5-
6-
namespace collisionAlgorithm {
7-
8-
int TetrahedronGeometryClass = core::RegisterObject("TetrahedronGeometry")
9-
.add< TetrahedronGeometry<sofa::defaulttype::Vec3dTypes> >();
10-
11-
}
12-
4+
namespace sofa::collisionAlgorithm
5+
{
6+
void registerTetrahedronGeometry(sofa::core::ObjectFactory* factory)
7+
{
8+
factory->registerObjects(sofa::core::ObjectRegistrationData(
9+
"A class bridging tetrahedron topological information with "
10+
"the proximity detection algorithm")
11+
.add<TetrahedronGeometry<sofa::defaulttype::Vec3dTypes> >());
1312
}
13+
} // namespace sofa::collisionAlgorithm
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#include <sofa/collisionAlgorithm/geometry/TriangleGeometry.h>
22
#include <sofa/core/ObjectFactory.h>
33

4-
namespace sofa::collisionAlgorithm {
5-
6-
int TriangleGeometryClass = core::RegisterObject("TriangleGeometry")
7-
.add< TriangleGeometry<sofa::defaulttype::Vec3dTypes> >();
8-
4+
namespace sofa::collisionAlgorithm
5+
{
6+
void registerTriangleGeometry(sofa::core::ObjectFactory* factory)
7+
{
8+
factory->registerObjects(
9+
sofa::core::ObjectRegistrationData("A class bridging triangle topological information with "
10+
"the proximity detection algorithm")
11+
.add<TriangleGeometry<sofa::defaulttype::Vec3dTypes> >());
912
}
13+
} // namespace sofa::collisionAlgorithm

0 commit comments

Comments
 (0)