2222#ifndef SOFA_COMPONENT_MAPPING_PERSISTENTCONTACTBARYCENTRICMAPPING_H
2323#define SOFA_COMPONENT_MAPPING_PERSISTENTCONTACTBARYCENTRICMAPPING_H
2424
25- #include < SofaBaseMechanics/BarycentricMapping.h>
25+ #include < PersistentContact/config.h>
26+ #include < sofa/component/mapping/linear/BarycentricMappers/BarycentricMapperMeshTopology.h>
27+ #include < sofa/component/mapping/linear/BarycentricMappers/BarycentricMapperSparseGridTopology.h>
28+ #include < sofa/component/mapping/linear/BarycentricMapping.h>
29+ #include < sofa/component/mapping/linear/BarycentricMappingRigid.h>
30+ #include < sofa/component/topology/container/dynamic/TetrahedronSetTopologyContainer.h>
31+ #include < sofa/component/topology/container/grid/SparseGridTopology.h>
2632
2733#include " PersistentContactMapping.h"
28- #include < PersistentContact/config.h>
2934
3035namespace sofa
3136{
@@ -65,10 +70,10 @@ class PersistentContactBarycentricMapper : public virtual core::objectmodel::Ba
6570
6671
6772template <class TIn , class TOut >
68- class PersistentContactBarycentricMapperMeshTopology : public BarycentricMapperMeshTopology < TIn , TOut>, public PersistentContactBarycentricMapper< TIn , TOut>
73+ class PersistentContactBarycentricMapperMeshTopology : public linear :: BarycentricMapperMeshTopology<TIn, TOut>, public PersistentContactBarycentricMapper< TIn , TOut>
6974{
7075public:
71- SOFA_CLASS2 (SOFA_TEMPLATE2(PersistentContactBarycentricMapperMeshTopology, TIn, TOut), SOFA_TEMPLATE2(BarycentricMapperMeshTopology, TIn, TOut), SOFA_TEMPLATE2(PersistentContactBarycentricMapper, TIn, TOut));
76+ SOFA_CLASS2 (SOFA_TEMPLATE2(PersistentContactBarycentricMapperMeshTopology, TIn, TOut), SOFA_TEMPLATE2(linear:: BarycentricMapperMeshTopology, TIn, TOut), SOFA_TEMPLATE2(PersistentContactBarycentricMapper, TIn, TOut));
7277
7378 typedef TIn In;
7479 typedef TOut Out;
@@ -80,8 +85,8 @@ class PersistentContactBarycentricMapperMeshTopology : public BarycentricMapperM
8085 typedef typename InDataTypes::Real Real;
8186
8287 PersistentContactBarycentricMapperMeshTopology (core::topology::BaseMeshTopology* fromTopology,
83- topology::PointSetTopologyContainer* toTopology)
84- : BarycentricMapperMeshTopology<TIn, TOut>(fromTopology, toTopology)
88+ sofa::component:: topology::container::dynamic ::PointSetTopologyContainer* toTopology)
89+ : linear:: BarycentricMapperMeshTopology<TIn, TOut>(fromTopology, toTopology)
8590 {
8691 }
8792
@@ -95,10 +100,10 @@ class PersistentContactBarycentricMapperMeshTopology : public BarycentricMapperM
95100
96101
97102template <class TIn , class TOut >
98- class PersistentContactBarycentricMapperSparseGridTopology : public BarycentricMapperSparseGridTopology < TIn , TOut>, public PersistentContactBarycentricMapper< TIn , TOut>
103+ class PersistentContactBarycentricMapperSparseGridTopology : public linear :: BarycentricMapperSparseGridTopology<TIn, TOut>, public PersistentContactBarycentricMapper< TIn , TOut>
99104{
100105public:
101- SOFA_CLASS2 (SOFA_TEMPLATE2(PersistentContactBarycentricMapperSparseGridTopology, TIn, TOut), SOFA_TEMPLATE2(BarycentricMapperSparseGridTopology, TIn, TOut), SOFA_TEMPLATE2(PersistentContactBarycentricMapper, TIn, TOut));
106+ SOFA_CLASS2 (SOFA_TEMPLATE2(PersistentContactBarycentricMapperSparseGridTopology, TIn, TOut), SOFA_TEMPLATE2(linear:: BarycentricMapperSparseGridTopology, TIn, TOut), SOFA_TEMPLATE2(PersistentContactBarycentricMapper, TIn, TOut));
102107
103108 typedef TIn In;
104109 typedef TOut Out;
@@ -109,12 +114,12 @@ class PersistentContactBarycentricMapperSparseGridTopology : public BarycentricM
109114 typedef typename InDataTypes::Deriv InDeriv;
110115 typedef typename InDataTypes::Real Real;
111116
112- typedef BarycentricMapperSparseGridTopology< TIn , TOut> Inherit;
117+ typedef linear:: BarycentricMapperSparseGridTopology< TIn , TOut> Inherit;
113118 typedef typename Inherit::CubeData CubeData;
114119
115- PersistentContactBarycentricMapperSparseGridTopology (topology::SparseGridTopology* fromTopology,
116- topology::PointSetTopologyContainer* toTopology)
117- : BarycentricMapperSparseGridTopology<TIn, TOut>(fromTopology, toTopology)
120+ PersistentContactBarycentricMapperSparseGridTopology (sofa::component:: topology::container::grid ::SparseGridTopology* fromTopology,
121+ topology::container::dynamic ::PointSetTopologyContainer* toTopology)
122+ : linear:: BarycentricMapperSparseGridTopology<TIn, TOut>(fromTopology, toTopology)
118123 {
119124 }
120125
@@ -135,10 +140,10 @@ class PersistentContactBarycentricMapperSparseGridTopology : public BarycentricM
135140
136141
137142template <class TIn , class TOut >
138- class PersistentContactBarycentricMapperTetrahedronSetTopology : public BarycentricMapperTetrahedronSetTopology < TIn , TOut>, public PersistentContactBarycentricMapper< TIn , TOut>
143+ class PersistentContactBarycentricMapperTetrahedronSetTopology : public linear :: BarycentricMapperTetrahedronSetTopology<TIn, TOut>, public PersistentContactBarycentricMapper< TIn , TOut>
139144{
140145public:
141- SOFA_CLASS2 (SOFA_TEMPLATE2(PersistentContactBarycentricMapperTetrahedronSetTopology, TIn, TOut), SOFA_TEMPLATE2(BarycentricMapperTetrahedronSetTopology, TIn, TOut), SOFA_TEMPLATE2(PersistentContactBarycentricMapper, TIn, TOut));
146+ SOFA_CLASS2 (SOFA_TEMPLATE2(PersistentContactBarycentricMapperTetrahedronSetTopology, TIn, TOut), SOFA_TEMPLATE2(linear:: BarycentricMapperTetrahedronSetTopology, TIn, TOut), SOFA_TEMPLATE2(PersistentContactBarycentricMapper, TIn, TOut));
142147
143148 typedef TIn In;
144149 typedef TOut Out;
@@ -149,12 +154,13 @@ class PersistentContactBarycentricMapperTetrahedronSetTopology : public Barycent
149154 typedef typename InDataTypes::Deriv InDeriv;
150155 typedef typename InDataTypes::Real Real;
151156
152- typedef BarycentricMapperTetrahedronSetTopology<TIn, TOut> Inherit;
153- typedef typename Inherit::MappingData MappingData;
157+ typedef linear:: BarycentricMapperTetrahedronSetTopology<TIn, TOut> Inherit;
158+ typedef typename linear::BarycentricMapper<TIn, TOut>::MappingData3D MappingData;
154159
155- PersistentContactBarycentricMapperTetrahedronSetTopology (topology::TetrahedronSetTopologyContainer* fromTopology,
156- topology::PointSetTopologyContainer* toTopology)
157- : BarycentricMapperTetrahedronSetTopology<TIn, TOut>(fromTopology, toTopology)
160+ PersistentContactBarycentricMapperTetrahedronSetTopology (
161+ topology::container::dynamic::TetrahedronSetTopologyContainer* fromTopology,
162+ topology::container::dynamic::PointSetTopologyContainer* toTopology)
163+ : linear::BarycentricMapperTetrahedronSetTopology<TIn, TOut>(fromTopology, toTopology)
158164 {
159165 }
160166
@@ -176,12 +182,12 @@ class PersistentContactBarycentricMapperTetrahedronSetTopology : public Barycent
176182
177183
178184template <class TIn , class TOut >
179- class PersistentContactBarycentricMapping : public BarycentricMapping <TIn, TOut>, public PersistentContactMapping
185+ class PersistentContactBarycentricMapping : public linear :: BarycentricMapping<TIn, TOut>, public PersistentContactMapping
180186{
181187public:
182- SOFA_CLASS2 (SOFA_TEMPLATE2(PersistentContactBarycentricMapping,TIn,TOut), SOFA_TEMPLATE2(BarycentricMapping,TIn,TOut), PersistentContactMapping);
188+ SOFA_CLASS2 (SOFA_TEMPLATE2(PersistentContactBarycentricMapping,TIn,TOut), SOFA_TEMPLATE2(linear:: BarycentricMapping,TIn,TOut), PersistentContactMapping);
183189
184- typedef BarycentricMapping<TIn, TOut> Inherit;
190+ typedef linear:: BarycentricMapping<TIn, TOut> Inherit;
185191 typedef TIn In;
186192 typedef TOut Out;
187193 typedef In InDataTypes;
0 commit comments