Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit ca274787 authored by Thomas Jund's avatar Thomas Jund
Browse files

compilation ok avc le nouveau cgogn

parent de5af8c7
......@@ -54,9 +54,9 @@ public:
VEC3 pos ;
#else
#ifdef SECURED
CGoGN::Algo::MovingObjects::ParticleCell2DSecured<PFP> part_ ;
CGoGN::Algo::Surface::MovingObjects::ParticleCell2DSecured<PFP> part_ ;
#else
CGoGN::Algo::MovingObjects::ParticleCell2D<PFP> part_ ;
CGoGN::Algo::Surface::MovingObjects::ParticleCell2D<PFP> part_ ;
#endif
#endif
......
......@@ -13,12 +13,12 @@ namespace CityGenerator
template <typename PFP>
bool notDiagonalAdjacentToAnObstacle(typename PFP::MAP& map, Dart d, CellMarker<FACE>& buildingMark) ;
template <typename PFP> Algo::Modelisation::Polyhedron<PFP> generateGrid(EnvMap& envMap) ;
template <typename PFP> Algo::Surface::Modelisation::Polyhedron<PFP> generateGrid(EnvMap& envMap) ;
template <typename PFP> void generateCity(EnvMap& envMap, unsigned int nbBuildings) ;
template <typename PFP>
Algo::Modelisation::Polyhedron<PFP> generateTrianGrid(EnvMap& envMap,
Algo::Surface::Modelisation::Polyhedron<PFP> generateTrianGrid(EnvMap& envMap,
CellMarker<EDGE>& obstacleMark,
CellMarker<FACE>& buildingMark) ;
......
......@@ -36,7 +36,7 @@ bool notDiagonalAdjacentToAnObstacle(typename PFP::MAP& map, Dart d, CellMarker<
}
template <typename PFP>
Algo::Modelisation::Polyhedron<PFP> generateGrid(EnvMap& envMap)
Algo::Surface::Modelisation::Polyhedron<PFP> generateGrid(EnvMap& envMap)
{
unsigned int nx = envMap.geometry.size(0) / envMap.maxCellSize ;
unsigned int ny = envMap.geometry.size(1) / envMap.maxCellSize ;
......@@ -45,7 +45,7 @@ Algo::Modelisation::Polyhedron<PFP> generateGrid(EnvMap& envMap)
std::cout << " - Generate Grid : " << nx << " x " << ny << std::endl ;
Algo::Modelisation::Polyhedron<PFP> prim(envMap.map, envMap.position) ;
Algo::Surface::Modelisation::Polyhedron<PFP> prim(envMap.map, envMap.position) ;
Dart d = prim.grid_topo(nx, ny) ;
prim.embedGrid(envMap.geometry.size(0), envMap.geometry.size(1), 0.0f) ;
......@@ -83,7 +83,7 @@ void generateCity(EnvMap& envMap, unsigned int nbBuildings)
}
template <typename PFP>
Algo::Modelisation::Polyhedron<PFP> generateTrianGrid(EnvMap& envMap,
Algo::Surface::Modelisation::Polyhedron<PFP> generateTrianGrid(EnvMap& envMap,
CellMarker<EDGE>& obstacleMark,
CellMarker<FACE>& buildingMark)
{
......@@ -92,7 +92,7 @@ Algo::Modelisation::Polyhedron<PFP> generateTrianGrid(EnvMap& envMap,
if (nx < 1) nx = 1 ;
if (ny < 1) ny = 1 ;
Algo::Modelisation::Polyhedron<PFP> prim(envMap.map, envMap.position) ;
Algo::Surface::Modelisation::Polyhedron<PFP> prim(envMap.map, envMap.position) ;
prim.grid_topo(nx, ny) ;
prim.embedGrid(envMap.geometry.size(0), envMap.geometry.size(1), 0.0f) ;
......@@ -189,7 +189,7 @@ template <typename PFP>
Dart extrudeFaceAndMark(typename PFP::MAP& map, typename PFP::TVEC3& position, Dart d,
CellMarker<FACE>& buildingMark, float height)
{
Dart dRoof = Algo::Modelisation::extrudeFace<PFP>(map, position, d, height) ;
Dart dRoof = Algo::Surface::Modelisation::extrudeFace<PFP>(map, position, d, height) ;
buildingMark.mark(dRoof) ;
Dart dd = dRoof ;
do
......@@ -209,7 +209,7 @@ Dart extrudeBuilding(typename PFP::MAP& map, typename PFP::TVEC3& position, Dart
VEC3 v2(position[map.template phi<11>(d)]-position[d]);
VEC3 sky = (v1^v2);
sky.normalize();
dRoof = Algo::Modelisation::extrudeFace<PFP>(map, position, d, height) ;
dRoof = Algo::Surface::Modelisation::extrudeFace<PFP>(map, position, d, height) ;
switch (buildingType)
{
......@@ -219,7 +219,7 @@ Dart extrudeBuilding(typename PFP::MAP& map, typename PFP::TVEC3& position, Dart
}
case 1 : //with roof 1 slope
{
dRoof = Algo::Modelisation::extrudeFace<PFP>(map, position, dRoof, height/3.0f) ;
dRoof = Algo::Surface::Modelisation::extrudeFace<PFP>(map, position, dRoof, height/3.0f) ;
Dart dNext = map.phi1(dRoof) ;
Dart dPrev = map.phi2(map.phi_1(dRoof)) ;
map.collapseEdge(dNext) ;
......@@ -228,7 +228,7 @@ Dart extrudeBuilding(typename PFP::MAP& map, typename PFP::TVEC3& position, Dart
}
case 2 : //with roof 2 slopes
{
dRoof = Algo::Modelisation::extrudeFace<PFP>(map, position, dRoof, height/3.0f) ;
dRoof = Algo::Surface::Modelisation::extrudeFace<PFP>(map, position, dRoof, height/3.0f) ;
Dart dNext = map.phi1(dRoof) ;
Dart dPrev = map.phi2(map.phi_1(dRoof)) ;
typename PFP::VEC3 mid1 = (position[dNext] + position[map.phi1(dNext)]) / 2.0f ;
......@@ -244,22 +244,22 @@ Dart extrudeBuilding(typename PFP::MAP& map, typename PFP::TVEC3& position, Dart
unsigned int nbStairs = rand() % 5 ;
for (unsigned int i = 0; i < nbStairs; ++i)
{
typename PFP::VEC3 c = Algo::Geometry::faceCentroid<PFP>(map, dRoof, position) ;
Dart dRoofSmall = Algo::Modelisation::extrudeFace<PFP>(map, position, dRoof, 0.0f) ;
typename PFP::VEC3 c = Algo::Surface::Geometry::faceCentroid<PFP>(map, dRoof, position) ;
Dart dRoofSmall = Algo::Surface::Modelisation::extrudeFace<PFP>(map, position, dRoof, 0.0f) ;
Dart dd = dRoofSmall ;
do
{
position[dd] = position[dd] + (c - position[dd]) / 3.0f ;
dd = map.phi1(dd) ;
} while (dd != dRoofSmall) ;
dRoof = Algo::Modelisation::extrudeFace<PFP>(map, position, dRoofSmall, height/2.0f) ;
dRoof = Algo::Surface::Modelisation::extrudeFace<PFP>(map, position, dRoofSmall, height/2.0f) ;
}
bool spike = rand() % 2 ;
if (spike)
{
typename PFP::VEC3 c = Algo::Geometry::faceCentroid<PFP>(map, dRoof, position) ;
typename PFP::VEC3 c = Algo::Surface::Geometry::faceCentroid<PFP>(map, dRoof, position) ;
c[2] += height / 1.5f ;
dRoof = Algo::Modelisation::trianguleFace<PFP>(map, dRoof) ;
dRoof = Algo::Surface::Modelisation::trianguleFace<PFP>(map, dRoof) ;
position[dRoof] = c ;
}
break ;
......@@ -329,8 +329,8 @@ bool animateCity(EnvMap* envMap)
}
else
{
typename PFP::VEC3 c = Algo::Geometry::faceCentroid<PFP>(map, d, position) ;
Dart dRoofSmall = Algo::Modelisation::extrudeFace<PFP>(map, position, d, 0.0f) ;
typename PFP::VEC3 c = Algo::Surface::Geometry::faceCentroid<PFP>(map, d, position) ;
Dart dRoofSmall = Algo::Surface::Modelisation::extrudeFace<PFP>(map, position, d, 0.0f) ;
Dart dd = dRoofSmall ;
do
{
......@@ -405,13 +405,13 @@ Dart generateBuilding(EnvMap& envMap, Dart d, float height, unsigned int buildin
// Thomas's team
Dart x =map.phi2(dd);
if(!map.isBoundaryMarked(x))
if(!map.isBoundaryMarked2(x))
{
addElementToVector<Obstacle*>(envMap.obstvect[x],o);
if(!map.isBoundaryMarked(map.phi2(map.phi1(x))))
if(!map.isBoundaryMarked2(map.phi2(map.phi1(x))))
addElementToVector<Obstacle*>(envMap.obstvect[map.phi2(map.phi1(x))],o);
if(!map.isBoundaryMarked(map.phi2(map.phi_1(x))))
if(!map.isBoundaryMarked2(map.phi2(map.phi_1(x))))
addElementToVector<Obstacle*>(envMap.obstvect[map.phi2(map.phi_1(x))],o);
}
......@@ -456,7 +456,7 @@ Dart generateBuilding(EnvMap& envMap, Dart d, float height, unsigned int buildin
unsigned int nbStairs = rand() % 5 ;
for (unsigned int i = 0; i < nbStairs; ++i)
{
typename PFP::VEC3 c = Algo::Geometry::faceCentroid<PFP>(map, dRoof, position) ;
typename PFP::VEC3 c = Algo::Surface::Geometry::faceCentroid<PFP>(map, dRoof, position) ;
Dart dRoofSmall = extrudeFaceAndMark<PFP>(map, position, dRoof, buildingMark, 0.0f) ;
Dart dd = dRoofSmall ;
do
......@@ -470,9 +470,9 @@ Dart generateBuilding(EnvMap& envMap, Dart d, float height, unsigned int buildin
bool spike = rand() % 2 ;
if (spike)
{
typename PFP::VEC3 c = Algo::Geometry::faceCentroid<PFP>(map, dRoof, position) ;
typename PFP::VEC3 c = Algo::Surface::Geometry::faceCentroid<PFP>(map, dRoof, position) ;
c[2] += height / 1.5f ;
dRoof = Algo::Modelisation::trianguleFace<PFP>(map, dRoof) ;
dRoof = Algo::Surface::Modelisation::trianguleFace<PFP>(map, dRoof) ;
position[dRoof] = c ;
}
break ;
......@@ -487,9 +487,9 @@ void generateMall(typename PFP::MAP& map, typename PFP::TVEC3& position, CellMar
CellMarker<FACE>& buildingMark, float sideSize)
{
unsigned int side = 5 ;
std::vector<Algo::Modelisation::Polyhedron<PFP> > floors ;
std::vector<Algo::Surface::Modelisation::Polyhedron<PFP> > floors ;
Algo::Modelisation::Polyhedron<PFP> * floor2 = new Algo::Modelisation::Polyhedron<PFP>(
Algo::Surface::Modelisation::Polyhedron<PFP> * floor2 = new Algo::Surface::Modelisation::Polyhedron<PFP>(
map, position) ;
floor2->grid_topo(side, side) ;
......@@ -510,7 +510,7 @@ void generateMall(typename PFP::MAP& map, typename PFP::TVEC3& position, CellMar
}
}
Algo::Modelisation::Polyhedron<PFP> * floor1 = new Algo::Modelisation::Polyhedron<PFP>(
Algo::Surface::Modelisation::Polyhedron<PFP> * floor1 = new Algo::Surface::Modelisation::Polyhedron<PFP>(
map, position) ;
floor1->grid_topo(side, side) ;
floor1->embedGrid(sideSize * side, sideSize * side) ;
......@@ -609,7 +609,7 @@ void generatePlanet(EnvMap& envMap)
if (nx < 1) nx = 1 ;
if (ny < 1) ny = 1 ;
Algo::Modelisation::Polyhedron<PFP> prim(envMap.map, envMap.position) ;
Algo::Surface::Modelisation::Polyhedron<PFP> prim(envMap.map, envMap.position) ;
prim.cylinder_topo(nx, ny, true, true) ;
double pi = 3.14159265358979323846f ;
......@@ -670,7 +670,7 @@ void simplifyFreeSpace(typename PFP::MAP& map, typename PFP::TVEC3& position,
VEC_D_A orderedD ;
// compute all heuristic and construct multimap
Algo::Geometry::computeAreaFaces<PFP>(map, position, tableArea) ;
Algo::Surface::Geometry::computeAreaFaces<PFP>(map, position, tableArea) ;
CellMarker<EDGE> eM(map) ;
for (Dart d = map.begin(); d != map.end(); map.next(d))
{
......
......@@ -31,7 +31,7 @@ inline void renderFace(EnvMap& m, Dart d)
inline void renderPredictionTriangle(EnvMap& m, Dart d, PFP::VEC3 p)
{
Geom::Plane3D<float> pl = Algo::Geometry::facePlane<PFP>(m.map, d, m.position) ;
Geom::Plane3D<float> pl = Algo::Surface::Geometry::facePlane<PFP>(m.map, d, m.position) ;
p[2] -= 1000 ;
Geom::intersectionPlaneRay(pl, p, VEC3(0, 0, -1), p) ;
......
......@@ -42,7 +42,7 @@ public:
unsigned int nbVertices;
CGoGN::Algo::MovingObjects::ParticleCell2DMemo<PFP> *registering_part;
CGoGN::Algo::Surface::MovingObjects::ParticleCell2DMemo<PFP> *registering_part;
// std::vector<PFP::VEC3> vertices;
......
......@@ -13,8 +13,8 @@ float pathCost(EnvMap& envMap, const typename PFP::TVEC3& position, Dart start,
{
typename PFP::MAP& map = envMap.map ;
return VEC3(
Algo::Geometry::faceCentroid<PFP>(map, goal, position)
- Algo::Geometry::faceCentroid<PFP>(map, start, position)).norm() ;
Algo::Surface::Geometry::faceCentroid<PFP>(map, goal, position)
- Algo::Surface::Geometry::faceCentroid<PFP>(map, start, position)).norm() ;
}
template <typename PFP>
......
......@@ -4,7 +4,7 @@
struct PFP : public PFP_STANDARD
{
// definition de la carte
typedef Algo::IHM::ImplicitHierarchicalMap MAP ;
typedef Algo::Surface::IHM::ImplicitHierarchicalMap MAP ;
// definition des listes d'agent
typedef std::vector<Agent*> AGENTS ;
......
......@@ -96,7 +96,7 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
// std::string filename = "./svg/planet.svg" ;
std::string filename = "./svg/mapRoads.svg" ;
// std::string filename = "./svg/simpleCross.svg" ;
Algo::Import::importSVG<PFP>(map, filename, position, obstacleMark, buildingMark) ;
Algo::Surface::Import::importSVG<PFP>(map, filename, position, obstacleMark, buildingMark) ;
std::string filename2 = "./svg/mapBuild.svg" ;
// Algo::Import::importSVG<PFP>(mapScenary, filename2, positionScenary, obstacleMarkS, buildingMarkS) ;
......@@ -161,7 +161,7 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
//make extrusion/roof/..
if(convex)
{
if(Algo::Geometry::convexFaceArea<PFP>(mapScenary, d, positionScenary)<20.0f) //if big enough create building with "stairs"
if(Algo::Surface::Geometry::convexFaceArea<PFP>(mapScenary, d, positionScenary)<20.0f) //if big enough create building with "stairs"
CityGenerator::extrudeBuilding<PFP>(mapScenary,positionScenary, d,1+rand()%2,10.0f*(1.0f+rand()/RAND_MAX));
else //create building with simple roof
CityGenerator::extrudeBuilding<PFP>(mapScenary,positionScenary, d,3,10.0f*(1.0f+rand()/RAND_MAX));
......@@ -173,7 +173,7 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
}
//triangulation for rendering
Algo::Modelisation::EarTriangulation<PFP> et(mapScenary);
Algo::Surface::Modelisation::EarTriangulation<PFP> et(mapScenary);
et.triangule();
// Algo::Modelisation::EarTriangulation<PFP> et2(map);
......@@ -181,7 +181,7 @@ void EnvMap::init(unsigned int config, REAL width, REAL height, REAL minSize, RE
//subdivision to create footpath
SelectorDartNoBoundary<PFP::MAP> nb(map);
Algo::Modelisation::TwoNPlusOneSubdivision<PFP,PFP::TVEC3, VEC3>(map,position,nb);
Algo::Surface::Modelisation::TwoNPlusOneSubdivision<PFP,PFP::TVEC3, VEC3>(map,position,nb);
markPedWay();
scale(20.0f);
......@@ -302,12 +302,12 @@ void EnvMap::subdivideAllToMaxLevel()
Dart old = map.faceOldestDart(d) ;
unsigned int fLevel = map.faceLevel(old) ;
map.setCurrentLevel(fLevel) ;
PFP::VEC3 fCenter = Algo::Geometry::faceCentroid<PFP>(map, old, position) ;
PFP::VEC3 fCenter = Algo::Surface::Geometry::faceCentroid<PFP>(map, old, position) ;
Dart fd = old ;
do
{
PFP::VEC3& p = position[fd] ;
PFP::VEC3 edge = Algo::Geometry::vectorOutOfDart<PFP>(map, fd,
PFP::VEC3 edge = Algo::Surface::Geometry::vectorOutOfDart<PFP>(map, fd,
position) ;
PFP::VEC3 proj = fCenter
- (p + (edge * (fCenter - p) / edge.norm2()) * edge) ;
......@@ -322,7 +322,7 @@ void EnvMap::subdivideAllToMaxLevel()
if (subdivisable)
{
map.setCurrentLevel(fLevel) ;
Algo::IHM::subdivideFace<PFP>(map, old, position) ;
Algo::Surface::IHM::subdivideFace<PFP>(map, old, position) ;
subdiv = true ;
}
map.setCurrentLevel(map.getMaxLevel()) ;
......@@ -377,7 +377,7 @@ Dart EnvMap::getBelongingCell(const PFP::VEC3& pos)
{
m.mark(d) ;
if (!buildingMark.isMarked(d)
&& Algo::Geometry::isPointInConvexFace2D<PFP>(map, d, position, pos, true)) return d ;
&& Algo::Surface::Geometry::isPointInConvexFace2D<PFP>(map, d, position, pos, true)) return d ;
}
}
......@@ -419,7 +419,7 @@ void EnvMap::registerWallInFaces()
//first : test all edges of the face of d
do
{
if (obstacleMark.isMarked(dd) && map.isBoundaryMarked(dd))
if (obstacleMark.isMarked(dd) && map.isBoundaryMarked2(dd))
{
Dart dd2 = map.phi2(dd) ;
Dart next = map.phi1(dd2) ;
......@@ -724,12 +724,12 @@ void EnvMap::refine()
fLevel = map.faceLevel(old) ;
map.setCurrentLevel(fLevel) ;
PFP::VEC3 fCenter = Algo::Geometry::faceCentroid<PFP>(map, old, position) ;
PFP::VEC3 fCenter = Algo::Surface::Geometry::faceCentroid<PFP>(map, old, position) ;
Dart fd = old ;
do
{
PFP::VEC3& p = position[fd] ;
PFP::VEC3 edge = Algo::Geometry::vectorOutOfDart<PFP>(map, fd, position) ;
PFP::VEC3 edge = Algo::Surface::Geometry::vectorOutOfDart<PFP>(map, fd, position) ;
PFP::VEC3 proj = fCenter - (p + (edge * (fCenter - p) / edge.norm2()) * edge) ;
if (proj.norm2() < minSizeSq)
{
......@@ -763,7 +763,7 @@ void EnvMap::refine()
neighborAgentvect[old].clear() ;
map.setCurrentLevel(fLevel) ;
Algo::IHM::subdivideFace<PFP>(map, old, position) ;
Algo::Surface::IHM::subdivideFace<PFP>(map, old, position) ;
CellMarkerStore<FACE> newF(map) ;
unsigned int degree = 0 ;
Dart dd = old ;
......@@ -1069,7 +1069,7 @@ void EnvMap::coarse()
map.setCurrentLevel(fLevel - 1) ;
Algo::IHM::coarsenFace<PFP>(map, old, position) ;
Algo::Surface::IHM::coarsenFace<PFP>(map, old, position) ;
std::pair<bool, bool>& sf = subdivisableFace[old] ;
sf.first = true ;
......@@ -1126,7 +1126,7 @@ void EnvMap::updateMap()
void EnvMap::resetAgentInFace(Agent* agent)
{
VEC3 pos = agent->part_.getPosition() ;
agent->part_.move(Algo::Geometry::faceCentroid<PFP>(map, agent->part_.d, position)) ;
agent->part_.move(Algo::Surface::Geometry::faceCentroid<PFP>(map, agent->part_.d, position)) ;
agent->part_.setState(FACE) ;
agent->part_.move(pos) ;
}
......
......@@ -7,7 +7,7 @@ motherPosition(envMap.position),
constrainedV(map)
{
std::vector<std::string> attrNames ;
if(!Algo::Import::importMesh<PFP>(map, filename.c_str(), attrNames))
if(!Algo::Surface::Import::importMesh<PFP>(map, filename.c_str(), attrNames))
{
CGoGNerr << "could not import " << filename << CGoGNendl ;
return;
......@@ -15,7 +15,7 @@ constrainedV(map)
position = map.getAttribute<VEC3, VERTEX>(attrNames[0]) ;
normal = map.addAttribute<VEC3, VERTEX>("normal");
float area = Algo::Geometry::convexFaceArea<PFP>(envMap.map, d, envMap.position);
float area = Algo::Surface::Geometry::convexFaceArea<PFP>(envMap.map, d, envMap.position);
scaleValue = std::max(area/1400.0f,10.0f);
std::cout << "scaleVal " << scaleValue << std::endl;
// scaleValue = 4.0f;
......@@ -23,7 +23,7 @@ constrainedV(map)
// scale(2.5f);
// scale(0.5f);
VEC3 v = Algo::Geometry::faceCentroid<PFP>(motherMap, d, motherPosition) ;
VEC3 v = Algo::Surface::Geometry::faceCentroid<PFP>(motherMap, d, motherPosition) ;
translate(v);
// TraversorV<PFP::MAP> tv(map);
......@@ -73,8 +73,8 @@ void MovingMesh::scale(float val)
void MovingMesh::moveInFace(PFP::MAP& motherMap, Dart d, VertexAttribute<VEC3> pos)
{
VEC3 n = Algo::Geometry::faceNormal<PFP>(motherMap, d, pos);
VEC3 b = Algo::Geometry::faceCentroid<PFP>(motherMap, d, pos);
VEC3 n = Algo::Surface::Geometry::faceNormal<PFP>(motherMap, d, pos);
VEC3 b = Algo::Surface::Geometry::faceCentroid<PFP>(motherMap, d, pos);
//rotate and translate in face (approx)
Geom::Matrix44f rot ;
......@@ -90,7 +90,7 @@ void MovingMesh::moveInFace(PFP::MAP& motherMap, Dart d, VertexAttribute<VEC3> p
position[dd] = Geom::transform(position[dd],rot);
}
Geom::Plane3D<float> pl = Algo::Geometry::facePlane<PFP>(motherMap , d, pos);
Geom::Plane3D<float> pl = Algo::Surface::Geometry::facePlane<PFP>(motherMap , d, pos);
//project bottom points on face
for(Dart dd = tv.begin() ; dd != tv.end() ; dd = tv.next())
......@@ -153,7 +153,7 @@ std::vector<VEC3> MovingMesh::computeProjectedPointSet(float maxHeight)
points = jarvisConvexHull(points);
points.pop_back();
Geom::Plane3D<float> pl = Algo::Geometry::facePlane<PFP>(motherMap, motherMap.begin(), motherPosition);
Geom::Plane3D<float> pl = Algo::Surface::Geometry::facePlane<PFP>(motherMap, motherMap.begin(), motherPosition);
for(unsigned int i = 0; i < points.size() ; ++i)
{
VEC3& v = points[i];
......
......@@ -98,7 +98,7 @@ MovingObstacle::MovingObstacle(Simulator* sim, int ind, std::vector<VEC3> pos, s
if(dInside==NIL)
dInside = sim_->envMap_.getBelongingCell(pos[0]);
registering_part = new CGoGN::Algo::MovingObjects::ParticleCell2DMemo<PFP>(sim_->envMap_.map, dInside, pos[0], sim_->envMap_.position);
registering_part = new CGoGN::Algo::Surface::MovingObjects::ParticleCell2DMemo<PFP>(sim_->envMap_.map, dInside, pos[0], sim_->envMap_.position);
obstacles_ = new Obstacle*[nbVertices];
belonging_cells = new std::vector<Dart>[nbVertices];
......@@ -139,11 +139,11 @@ MovingObstacle::MovingObstacle(Simulator* sim, int ind, std::vector<VEC3> pos, s
{
//extrude face to build a cage
// compute edgeLength for mass-spring
Algo::Modelisation::extrudeFace<PFP>(map, position, d, 10.0f) ;
Algo::Surface::Modelisation::extrudeFace<PFP>(map, position, d, 10.0f) ;
map.fillHole(groundFace);
groundFace = map.phi2(groundFace);
Algo::Modelisation::EarTriangulation<PFP> et(map);
Algo::Surface::Modelisation::EarTriangulation<PFP> et(map);
et.triangule();
TraversorE<PFP::MAP> tE(map);
......@@ -155,10 +155,10 @@ MovingObstacle::MovingObstacle(Simulator* sim, int ind, std::vector<VEC3> pos, s
DartMarker treated(map);
for(Dart d = map.begin() ; d != map.end() ; map.next(d))
{
if(!map.isBoundaryMarked(d) && !treated.isMarked(d))
if(!map.isBoundaryMarked2(d) && !treated.isMarked(d))
{
treated.mark(d);
vertexAngle[d] = Algo::Geometry::angle<PFP>(map,map.phi_1(d),map.phi1(d),position);
vertexAngle[d] = Algo::Surface::Geometry::angle<PFP>(map,map.phi_1(d),map.phi1(d),position);
}
}
......@@ -538,7 +538,7 @@ void MovingObstacle::update()
{
float angularRig = 40.0f;
float curAngle = Algo::Geometry::angle<PFP>(map, map.phi_1(dd),map.phi1(dd),position);
float curAngle = Algo::Surface::Geometry::angle<PFP>(map, map.phi_1(dd),map.phi1(dd),position);
float angularStretch = angularRig*(restAngle-curAngle);
VEC3 f = angularStretch*(v1/norm);
......@@ -697,7 +697,7 @@ void resetPartSubdiv(Obstacle* o)
if (mo != NULL)
{
VEC3 pos =mo->registering_part->getPosition();
mo->registering_part->CGoGN::Algo::MovingObjects::ParticleBase<PFP>::move(Algo::Geometry::faceCentroid<PFP>(mo->sim_->envMap_.map, mo->registering_part->d, mo->sim_->envMap_.position)) ;
mo->registering_part->CGoGN::Algo::MovingObjects::ParticleBase<PFP>::move(Algo::Surface::Geometry::faceCentroid<PFP>(mo->sim_->envMap_.map, mo->registering_part->d, mo->sim_->envMap_.position)) ;
mo->registering_part->setState(FACE) ;
mo->registering_part->move(pos) ;
......@@ -711,7 +711,7 @@ void resetObstPartInFace(Obstacle* o, Dart d1)
if (mo != NULL)
{
VEC3 pos1 = mo->registering_part->getPosition();
if (Algo::Geometry::isPointInConvexFace2D <PFP> (mo->sim_->envMap_.map, d1, mo->sim_->envMap_.position, pos1, true))
if (Algo::Surface::Geometry::isPointInConvexFace2D <PFP> (mo->sim_->envMap_.map, d1, mo->sim_->envMap_.position, pos1, true))
mo->registering_part->d = d1;
}
}
......
......@@ -162,7 +162,7 @@ void Simulator::doStep()
agents_[i]->update() ;
// if(envMap_.map.getEmbedding(oldFace, FACE) != envMap_.map.getEmbedding(agents_[i]->part_.d, FACE))
if (agents_[i]->part_.crossCell != CGoGN::Algo::MovingObjects::NO_CROSS)
if (agents_[i]->part_.crossCell != CGoGN::Algo::Surface::MovingObjects::NO_CROSS)
// switch(agents_[i]->part_.crossCell)
{
// case CGoGN::Algo::MovingObjects::CROSS_EDGE :
......@@ -605,7 +605,7 @@ void Simulator::setupScenario(unsigned int nbMaxAgent, bool pedWay)
&& (!pedWay || envMap_.pedWayMark.isMarked(d))
)
{
pos = Algo::Geometry::faceCentroid<PFP>(envMap_.map, d, envMap_.position) ;
pos = Algo::Surface::Geometry::faceCentroid<PFP>(envMap_.map, d, envMap_.position) ;
pos[2] = 0 ;
dCell = d ;
found = true ;
......@@ -646,7 +646,7 @@ void Simulator::addMovingObstacles(unsigned int nb)
&& !envMap_.pedWayMark.isMarked(d)
)
{
float area = Algo::Geometry::convexFaceArea<PFP>(envMap_.map, d, envMap_.position);
float area = Algo::Surface::Geometry::convexFaceArea<PFP>(envMap_.map, d, envMap_.position);
if(area>1400)
{
dCell = d ;
......@@ -673,7 +673,7 @@ void Simulator::addMovingObstacle(Dart d, unsigned int obstType)
{
case 0 :
{
start = Algo::Geometry::faceCentroid<PFP>(envMap_.map, d, envMap_.position) ;
start = Algo::Surface::Geometry::faceCentroid<PFP>(envMap_.map, d, envMap_.position) ;
VEC3 xSide (2.0f,0.0f,0.0f);
VEC3 ySide (0.0f,5.0f,0.0f);
......@@ -838,7 +838,7 @@ void Simulator::addPathToCorner()
for (std::vector<Dart>::iterator it = path.begin() ; it != path.end() ; ++it)
{
VEC3 dest = Algo::Geometry::faceCentroid<PFP>(envMap_.map, *it, envMap_.position) ;
VEC3 dest = Algo::Surface::Geometry::faceCentroid<PFP>(envMap_.map, *it, envMap_.position) ;
// VEC3 dest = envMap_.position[*it] + envMap_.position[envMap_.map.phi1(*it)];
// dest /= 2.0f;
......@@ -978,7 +978,7 @@ void Simulator::addPathsToAgents_height()
for (std::vector<Dart>::iterator it = path.begin() ; it != path.end() ; ++it)
{
VEC3 dest = Algo::Geometry::faceCentroid<PFP>(envMap_.map, *it, envMap_.position) ;
VEC3 dest = Algo::Surface::Geometry::faceCentroid<PFP>(envMap_.map, *it, envMap_.position) ;
agents_[i]->goals_.push_back(dest) ;
}
......@@ -997,7 +997,7 @@ void Simulator::addPathsToAgents_height()
for (std::vector<Dart>::iterator it = path.begin() ; it != path.end() ; ++it)
{
VEC3 dest = Algo::Geometry::faceCentroid<PFP>(envMap_.map, *it, envMap_.position) ;
VEC3 dest = Algo::Surface::Geometry::faceCentroid<PFP>(envMap_.map, *it, envMap_.position) ;
agents_[i]->goals_.push_back(dest) ;
}
......@@ -1006,7 +1006,7 @@ void Simulator::addPathsToAgents_height()
for (std::vector<Dart>::iterator it = path.begin() ; it != path.end() ; ++it)
{
VEC3 dest = Algo::Geometry::faceCentroid<PFP>(envMap_.map, *it, envMap_.position) ;
VEC3 dest = Algo::Surface::Geometry::faceCentroid<PFP>(envMap_.map, *it, envMap_.position) ;
agents_[i]->goals_.push_back(dest) ;
}
}
......
......@@ -1228,8 +1228,8 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
SelectorMarked sm(highlight) ;
SelectorUnmarked sum(highlight) ;
Algo::ExportPov::exportMeshPlain<PFP>(out, map, position, "facesHighlighted", sm) ;
Algo::ExportPov::exportMeshPlain<PFP>(out, map, position, "myMesh", sum) ;
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, map, position, "facesHighlighted", sm) ;
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, map, position, "myMesh", sum) ;
out << "object {facesHighlighted" << std::endl ;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << std::endl ;
......@@ -1245,14 +1245,14 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
if(exportCity)
{
SelectorCellUnmarked<FACE> sum(simulator.envMap_.pedWayMark);
Algo::ExportPov::exportMeshPlain<PFP>(out, simulator.envMap_.map, simulator.envMap_.position, "myCity", sum) ;
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, simulator.envMap_.map, simulator.envMap_.position, "myCity", sum) ;
SelectorCellMarked<FACE> sm(simulator.envMap_.pedWayMark);
Algo::ExportPov::exportMeshPlain<PFP>(out, simulator.envMap_.map, simulator.envMap_.position, "myCityPed", sm) ;
Algo::ExportPov::exportMeshPlain<PFP>(out,simulator.envMap_.mapScenary,simulator.envMap_.positionScenary,"myMesh",good);
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out, simulator.envMap_.map, simulator.envMap_.position, "myCityPed", sm) ;
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out,simulator.envMap_.mapScenary,simulator.envMap_.positionScenary,"myMesh",good);
}
else
{
Algo::ExportPov::exportMeshPlain<PFP>(out,simulator.envMap_.map,simulator.envMap_.position,"myMesh",good);
Algo::Surface::ExportPov::exportMeshPlain<PFP>(out,simulator.envMap_.map,simulator.envMap_.position,"myMesh",good);
}
// DartMarkerStore road(map);
......@@ -1284,7 +1284,7 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std