Commit c4365042 authored by Thomas's avatar Thomas

gestion obstacles mobiles et environnement dynamiques

parent 4333cf13
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 2.8)
project(SocialAgents)
# a decommenter si on veut voir ce qui se passe a la compilation
#set( CMAKE_VERBOSE_MAKEFILE 1 )
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/../../CGoGN)
SET(CMAKE_MODULE_PATH " ${CMAKE_MODULE_PATH} ${CGoGN_ROOT_DIR}/cmake_modules/")
find_package(OpenGL)
find_package(GLUT)
# FOR Qt4
FIND_PACKAGE(Qt4 REQUIRED)
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
# qq definition specifiques pour mac
IF(APPLE)
# attention a changer pour chercher la bonne version automatiquement
SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX")
SET(CMAKE_OSX_ARCHITECTURES x86_64)
ENDIF(APPLE)
IF(WIN32)
SET(GLEW_LIBRARY glew32)
SET(DEVIL_LIBRARIES DevIL ILU ILUT)
SET(ZLIB_LIBRARIES zlib)
SET(LIBXML2_LIBRARIES xml2)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/dependencies/include/)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/dependencies/lib/)
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
find_package(DevIL)
find_package(ZLIB)
find_package(LibXml2)
SET(GLEW_LIBRARY GLEW)
IF (IL_LIBRARIES)
SET(DEVIL_LIBRARIES ${IL_LIBRARIES} ${ILU_LIBRARIES} ${ILUT_LIBRARIES})
ELSE(IL_LIBRARIES)
SET(DEVIL_LIBRARIES ${IL_LIBRARY} ${ILU_LIBRARY} ${ILUT_LIBRARY})
ENDIF(IL_LIBRARIES)
ENDIF(WIN32)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
SET(COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream openctm assimp)
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD)
SET(CGoGN_LIBS_R topology algo container utils)
SET(NUMERICAL_LIBS numerical lapack blas f2c)
include(${CGoGN_ROOT_DIR}/build/apps_cmake.txt)
add_subdirectory(Release)
add_subdirectory(Debug)
......@@ -38,6 +38,7 @@ add_executable( socialAgentsD
../src/viewer.cpp
../src/env_map.cpp
../src/agent.cpp
../src/moving_obstacle.cpp
../src/simulator.cpp
../src/gl2ps.c
${socialAgents_moc}
......
......@@ -34,6 +34,7 @@ add_executable( socialAgents
../src/viewer.cpp
../src/env_map.cpp
../src/agent.cpp
../src/moving_obstacle.cpp
../src/simulator.cpp
../src/gl2ps.c
${socialAgents_moc}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -50,6 +50,10 @@ public:
CGoGN::Algo::MovingObjects::ParticleCell2D<PFP> part_;
std::vector<VEC3> goals_;
VEC3 finalGoal;
Dart finalDart;
unsigned int curGoal_;
static unsigned int maxNeighbors_;
......
......@@ -2,6 +2,7 @@
#define ENV_GENERATOR
#include "Container/fakeAttribute.h"
#include "env_map.h"
namespace CGoGN
{
......@@ -15,14 +16,26 @@ bool notDiagonalAdjacentToAnObstacle(typename PFP::MAP& map, Dart d, CellMarker&
template <typename PFP>
Algo::Modelisation::Polyhedron<PFP> generateGrid(typename PFP::MAP& map, typename PFP::TVEC3& position, unsigned int cX, unsigned int cY, float sideLength, CellMarker& obstacleMark, CellMarker& buildingMark);
template <typename PFP>
Algo::Modelisation::Polyhedron<PFP> generateTrianGrid(typename PFP::MAP& map, typename PFP::TVEC3& position, unsigned int cX, unsigned int cY, float sideLength, CellMarker& obstacleMark, CellMarker& buildingMark);
template <typename PFP>
Dart extrudeFaceAndMark(typename PFP::MAP& map, typename PFP::TVEC3& position, Dart d, CellMarker& buildingMark, float height);
template <typename PFP>
void generateBuilding(typename PFP::MAP& map, typename PFP::TVEC3& position, Dart d, float height, unsigned int buildingType, CellMarker& obstacleMark, CellMarker& buildingMark);
bool animateCity(EnvMap* envMap);
//template <typename PFP>
//Dart generateBuilding(typename PFP::MAP& map, typename PFP::TVEC3& position, Dart d, float height, unsigned int buildingType, CellMarker& obstacleMark, CellMarker& buildingMark);
//template <typename PFP>
//void generateCity(typename PFP::MAP& map, typename PFP::TVEC3& position, CellMarker& obstacleMark, CellMarker& buildingMark, float sideSize, unsigned int nbSquares);
template <typename PFP>
void generateCity(typename PFP::MAP& map, typename PFP::TVEC3& position, CellMarker& obstacleMark, CellMarker& buildingMark, float sideSize, unsigned int nbSquares);
Dart generateBuilding(EnvMap* envMap, Dart d, float height, unsigned int buildingType);
template <typename PFP>
void generateCity(EnvMap* envMap, float sideSize, unsigned int nbSquares);
template <typename PFP>
void generateMall(typename PFP::MAP& map,typename PFP::TVEC3& position, CellMarker& obstacleMark, CellMarker& buildingMark, float sideSize);
......@@ -30,7 +43,6 @@ void generateMall(typename PFP::MAP& map,typename PFP::TVEC3& position, CellMark
template <typename PFP>
void generatePathToUpperStair(typename PFP::MAP& map,typename PFP::TVEC3& position, Dart dLower,Dart dUpper);
template <typename PFP>
void simplifyFreeSpace(typename PFP::MAP& map, typename PFP::TVEC3& position);
......
This diff is collapsed.
......@@ -20,8 +20,6 @@
#include "Container/fakeAttribute.h"
#include "env_generator.h"
#include "Algo/Parallel/parallel_foreach.h"
using namespace CGoGN;
......@@ -53,6 +51,8 @@ class EnvMap
public :
EnvMap();
void markPedWay();
unsigned int mapMemoryCost();
void scale(float scaleVal);
......@@ -68,6 +68,10 @@ public :
void registerObstaclesInFaces();
void addNeighborObstacles(PFP::OBSTACLES& obst, Dart d, bool edgeNeighbor);
void pushObstacleInCells(Obstacle* o, Dart d);
void popObstacleInCells(Obstacle* o, Dart d);
void obstacleChangeFace(Obstacle* agent, Dart newFace, Dart oldFace);
void setAgentNeighborsAndObstacles(Agent* agent);
// void agentChangeFaceThroughEdge(Agent* agent);
......@@ -75,8 +79,10 @@ public :
void pushAgentInCells(Agent* agent, Dart d);
void popAgentInCells(Agent* agent, Dart d);
void removeAgentFromVector(PFP::AGENTS& a, Agent * ag);
template <typename T>
inline void removeElementFromVector(std::vector<T>& a, T ag);
void clearUpdateCandidates();
void updateMap();
......@@ -87,8 +93,16 @@ public :
PFP::TVEC3 position;
PFP::TVEC3 normal;
PFP::MAP mapScenary;
PFP::TVEC3 positionScenary;
PFP::TVEC3 normalScenary;
CellMarker obstacleMarkS;
CellMarker buildingMarkS;
AttributeHandler<PFP::BOOLATTRIB> subdivisableFace;
std::vector<Dart> newBuildings;
PFP::TAB_AGENTVECT agentvect;
PFP::TAB_AGENTVECT neighborAgentvect;
......@@ -96,13 +110,14 @@ public :
CellMarker obstacleMark;
CellMarker buildingMark;
CellMarker pedWayMark;
static const unsigned int nbAgentsToSubdivide = 5;
static const unsigned int nbAgentsToSimplify = 4;
CellMarker refineMark;
std::vector<Dart> refineCandidate;
CellMarker coarsenMark;
std::vector<Dart> refineCandidate;
std::vector<Dart> coarsenCandidate;
};
......@@ -135,7 +150,7 @@ inline void EnvMap::popAgentInCells(Agent* agent, Dart d)
assert(map.getCurrentLevel() == map.getMaxLevel());
assert(std::find(agentvect[d].begin(), agentvect[d].end(), agent) != agentvect[d].end());
removeAgentFromVector(agentvect[d], agent);
removeElementFromVector<Agent* >(agentvect[d], agent);
Dart dd = d;
do
......@@ -143,17 +158,18 @@ inline void EnvMap::popAgentInCells(Agent* agent, Dart d)
Dart ddd = map.alpha1(map.alpha1(dd));
while(ddd != dd)
{
removeAgentFromVector(neighborAgentvect[ddd], agent);
removeElementFromVector<Agent* >(neighborAgentvect[ddd], agent);
ddd = map.alpha1(ddd);
}
dd = map.phi1(dd);
} while(dd != d);
}
inline void EnvMap::removeAgentFromVector(PFP::AGENTS& a, Agent* ag)
template <typename T>
inline void EnvMap::removeElementFromVector(std::vector<T>& a, T ag)
{
PFP::AGENTS::iterator end = a.end();
for(PFP::AGENTS::iterator it = a.begin(); it != end; ++it)
typename std::vector<T>::iterator end = a.template end();
for(typename std::vector<T>::iterator it = a.begin(); it != end; ++it)
{
if(*it == ag)
{
......
......@@ -84,6 +84,19 @@ inline void renderAgent(EnvMap& m, Agent* agent, bool showNeighborDist = false,
// glEnd();
// glPopMatrix();
//show goals
if(true)
{
glLineWidth(3.0f);
glBegin(GL_LINE_STRIP);
for(std::vector<VEC3>::iterator it = ++(agent->goals_.begin()) ; it != agent->goals_.end() ; ++it)
{
glVertex3f((*it)[0],(*it)[1],(*it)[2]);
}
glEnd();
glLineWidth(1.0f);
}
if(showNeighborDist)
{
radius = sqrt(agent->neighborDistSq_);
......
#ifndef M_MOVING_OBSTACLE_H
#define M_MOVING_OBSTACLE_H
#include <iostream>
#include "utils.h"
#include "env_map.h"
#include "Algo/MovingObjects/particle_cell_2D.h"
class Simulator;
class MovingObstacle
{
public:
MovingObstacle(EnvMap* envmap, std::vector<PFP::VEC3> pos);
void updateAgentNeighbors();
void computePrefVelocity();
void computeNewVelocity();
void update();
unsigned int nbVertices;
CGoGN::Algo::MovingObjects::ParticleCell2D<PFP>* * parts_;
Obstacle* * obstacles_;
std::vector<std::pair<float, Agent*> > agentNeighbors_;
VEC3 finalGoal;
Dart finalDart;
unsigned int curGoal_;
static float neighborDistSq_;
static float timeStep ;
VEC3 velocity_;
VEC3 newVelocity_;
VEC3 prefVelocity_;
EnvMap* envMap_;
};
#endif
......@@ -8,7 +8,7 @@ namespace PathFinder
{
template <typename PFP>
float pathCostSqr(typename PFP::MAP& map, const typename PFP::TVEC3& position, Dart startPos, Dart stopPos);
float pathCostSqr(typename PFP::MAP& map, const typename PFP::TVEC3& position, Dart startPos, Dart stopPos, CellMarker& bad);
template <typename PFP>
std::vector<Dart> pathFindAStar(typename PFP::MAP& map, const typename PFP::TVEC3& position, Dart startPos, Dart stopPos, CellMarker& bad);
......
......@@ -10,10 +10,22 @@ namespace PathFinder
template <typename PFP>
float pathCostSqr(typename PFP::MAP& map,const typename PFP::TVEC3& position, Dart startPos, Dart stopPos)
float pathCostSqr(typename PFP::MAP& map,const typename PFP::TVEC3& position, Dart startPos, Dart stopPos, CellMarker& bad)
{
return VEC3(Algo::Geometry::faceCentroid<PFP>(map,stopPos,position)-Algo::Geometry::faceCentroid<PFP>(map,startPos,position)).norm2()
+(position[stopPos][2]-position[startPos][2])*1000.0f;
// float penalty=100000000.0f;
// Dart dd = startPos;
// do
// {
// if(bad.isMarked(map.phi2(dd)))
// {
// penalty*=0.0000001f;
// }
// dd = map.phi1(dd);
// } while(dd!=startPos);
return VEC3(Algo::Geometry::faceCentroid<PFP>(map,stopPos,position)-Algo::Geometry::faceCentroid<PFP>(map,startPos,position)).norm2();
// +penalty
// +(position[stopPos][2]-position[startPos][2])*1000.0f;
}
template <typename PFP>
......@@ -45,6 +57,7 @@ std::vector<Dart> pathFindAStar(typename PFP::MAP& map,const typename PFP::TVEC3
Dart dd = toDev;
do
{
// Dart ddd = map.phi2(dd);
Dart ddd = map.alpha1(map.alpha1(dd));
while(ddd != dd)
{
......@@ -52,12 +65,18 @@ std::vector<Dart> pathFindAStar(typename PFP::MAP& map,const typename PFP::TVEC3
if(!m.isMarked(ddd))
{
m.mark(ddd);
if(!bad.isMarked(ddd) && tablePred[ddd]==EMBNULL)
if(!bad.isMarked(ddd))
{
tablePred[ddd]=toDev;
tablePathCost[ddd] = tablePathCost[toDev]+pathCostSqr<PFP>(map,position,toDev,ddd);
float costDDD=pathCostSqr<PFP>(map,position,startPos,ddd)+tablePathCost[toDev];
vToDev.insert(std::make_pair(costDDD, ddd));
if(tablePred[ddd]==EMBNULL)
{
tablePred[ddd]=dd;
// tablePred[ddd]=toDev;
tablePathCost[ddd] = tablePathCost[toDev]+pathCostSqr<PFP>(map,position,toDev,ddd,bad);
float costDDD=pathCostSqr<PFP>(map,position,startPos,ddd,bad)+tablePathCost[toDev];
vToDev.insert(std::make_pair(costDDD, ddd));
}
else
std::cout << "path_planning : missing case" << std::endl;
}
}
......
......@@ -6,6 +6,7 @@
#include "env_map.h"
#include "agent.h"
#include "obstacle.h"
#include "moving_obstacle.h"
#include "path_finder.h"
#include <iostream>
......@@ -91,6 +92,10 @@ public:
void setupCircleScenario(unsigned int nbMaxAgent);
void setupCityScenario(float startX, float startY, int nbLines , int nbRank);
void setupScenario(unsigned int nbMaxAgent);
void setupMovingObstacle(unsigned int nbObstacles);
void addPathToCorner();
void addPathsToAgents();
bool importAgents(std::string filename);
......@@ -102,6 +107,7 @@ public:
EnvMap envMap_;
std::vector<Agent*> agents_;
std::vector<MovingObstacle*> movingObstacles_;
float timeStep_;
float globalTime_;
......
......@@ -19,6 +19,7 @@ Agent::Agent(Simulator* sim, const VEC3& position, Dart d) :
velocity_(0),
newVelocity_(0),
prefVelocity_(0),
meanSpeed_(0),
sim_(sim)
{
agentNeighbors_.reserve(maxNeighbors_*2);
......@@ -86,7 +87,12 @@ void Agent::updateObstacleNeighbors()
{
float distSq = distSqPointLineSegment((*it)->p1, (*it)->p2, part_.m_position);
if(distSq < rangeSq_)
obstacleNeighbors_.push_back(std::make_pair(distSq, *it));
{
if(Geom::testOrientation2D(part_.m_position,(*it)->p1,(*it)->p2)==Geom::RIGHT)
{
obstacleNeighbors_.push_back(std::make_pair(distSq, *it));
}
}
}
// std::sort(obstacleNeighbors_.begin(), obstacleNeighbors_.end(), obstacleSort);
......@@ -98,9 +104,9 @@ void Agent::update()
velocity_[1] = newVelocity_[1];
VEC3 target = part_.m_position + (velocity_ * timeStep);
// meanSpeed_ *= 3.0f;
// meanSpeed_ += velocity_;
// meanSpeed_ /= 4.0f;
meanSpeed_ *= 3.0f;
meanSpeed_ += velocity_;
meanSpeed_ /= 4.0f;
//
// meanPos_ *= 9.0f;
// meanPos_ += part_.m_position;
......@@ -114,12 +120,13 @@ void Agent::computePrefVelocity()
VEC3 goalVector = goals_[curGoal_] - part_.m_position;
float goalDist2 = goalVector.norm2();
// if(goalDist2 < 200.0f)
// {
// curGoal_ = (curGoal_ + 1) % goals_.size();
// goalVector = goals_[curGoal_] - part_.m_position;
// goalDist2 = goalVector.norm2();
// }
if(goalDist2 < 35.0f)
// if(goalDist2 < 5.0f)
{
curGoal_ = (curGoal_ + 1) % goals_.size();
goalVector = goals_[curGoal_] - part_.m_position;
goalDist2 = goalVector.norm2();
}
if (goalDist2 > 1.0f)
goalVector.normalize();
......
......@@ -10,11 +10,16 @@
#include "Algo/Import/importSvg.h"
#include "Algo/BooleanOperator/mergeVertices.h"
#include "env_generator.h"
using namespace CGoGN;
EnvMap::EnvMap() :
obstacleMarkS(mapScenary, EDGE),
buildingMarkS(mapScenary, FACE),
obstacleMark(map, EDGE),
buildingMark(map, FACE),
pedWayMark(map, FACE),
refineMark(map, FACE),
coarsenMark(map, FACE)
{
......@@ -33,17 +38,93 @@ EnvMap::EnvMap() :
// std::string filename = "/home/jund/Desktop/drawingSimple.svg";
// std::string filename = "/home/jund/Desktop/drawingLines.svg";
// std::string filename = "/home/jund/Desktop/mapKrutSimple.svg";
// std::string filename = "/home/jund/Desktop/mapKrutVid.svg";
// std::string filename = "/home/jund/Desktop/mapKrut.svg";
// Algo::Import::importSVG<PFP>(map,filename,position, obstacleMark, buildingMark);
// Algo::Import::importSVG<PFP>(map,filename,position, obstacleMark, buildingMark,false,true);
// markPedWay();
// positionScenary = mapScenary.addAttribute<PFP::VEC3>(VERTEX, "positionS");
// normalScenary = mapScenary.addAttribute<PFP::VEC3>(VERTEX, "normalS");
// Algo::Import::importSVG<PFP>(mapScenary,filename,positionScenary, obstacleMarkS, buildingMarkS,true,false);
// scale(3.2808399f);
// CellMarker faceM(mapScenary, FACE);
// Dart end = mapScenary.end();
// for(Dart d = mapScenary.begin(); d != end; mapScenary.next(d))
// {
// if(!faceM.isMarked(d))
// {
// faceM.mark(d);
// if(Algo::Geometry::faceNormal<PFP>(mapScenary, d, positionScenary)[2] > 0)
// {
// float height = 10 + rand()%50;
// if(!Algo::Geometry::isFaceConvex<PFP>(mapScenary,d, positionScenary))
// Algo::Modelisation::extrudeFace<PFP>(mapScenary, positionScenary, d, height);
// else
// CityGenerator::generateBuilding<PFP>(mapScenary, positionScenary, d, (1+(rand()%3)) * height / 2.0f, 3, obstacleMarkS, buildingMarkS);
// }
// }
// }
// Algo::BooleanOperator::mergeVertices<PFP>(map,position);
// DartMarker amelk(map);
// map.closeMap(amelk);
// Algo::Modelisation::CatmullClarkSubdivision<PFP>(map,position);
// Algo::Modelisation::computeDual<PFP>(map);
}
void EnvMap::markPedWay()
{
CellMarker treat(map,FACE);
for(Dart d = map.begin();d != map.end(); map.next(d))
{
if(!treat.isMarked(d))
{
treat.mark(d);
Dart dd = d;
do
{
Dart ddd = dd;
do
{
if(obstacleMark.isMarked(dd))
{
pedWayMark.mark(d);
break;
}
ddd = map.alpha1(ddd);
} while(ddd != dd);
dd = map.phi1(dd);
} while (dd != d);
}
}
treat.unmarkAll();
for(Dart d = map.begin();d != map.end(); map.next(d))
{
if(!treat.isMarked(d))
{
treat.mark(d);
Dart dd = d;
do
{
if(pedWayMark.isMarked(map.phi2(dd)) && pedWayMark.isMarked(map.phi2(map.phi1(dd)))
&& !pedWayMark.isMarked(map.phi2(map.phi1(map.phi1(dd)))) && !pedWayMark.isMarked(map.phi2(map.phi1(map.phi1(map.phi1(dd))))))
{
pedWayMark.mark(d);
break;
}
dd = map.phi1(dd);
} while (dd != d);
}
}
}
unsigned int EnvMap::mapMemoryCost()
{
return (map.getAttributeContainer(DART)).memorySize()
......@@ -61,12 +142,23 @@ void EnvMap::scale(float scaleVal)
bb.addPoint(position[v]);
}
for(unsigned int v = positionScenary.begin() ; v != positionScenary.end() ; positionScenary.next(v))
{
bb.addPoint(positionScenary[v]);
}
VEC3 center = bb.center();
for(unsigned int v = position.begin() ; v != position.end() ; position.next(v))
{
position[v] -= center;
position[v] *= scaleVal;
}
for(unsigned int v = positionScenary.begin() ; v != positionScenary.end() ; positionScenary.next(v))
{
positionScenary[v] -= center;
positionScenary[v] *= scaleVal;
}
}
void EnvMap::subdivideAllToMaxLevel()
......@@ -172,17 +264,20 @@ Dart EnvMap::getBelongingCell(const PFP::VEC3& pos)
void EnvMap::init()
{
float sideSize = 70.0f;
unsigned int nbSquares = 12;
unsigned int nbSquares = 14;
// CityGenerator::generateGrid<PFP>(map, position, nbSquares, nbSquares, sideSize, obstacleMark, buildingMark);
// CityGenerator::generateCity<PFP>(this, sideSize, nbSquares);
CityGenerator::generateGrid<PFP>(map, position, nbSquares, nbSquares, sideSize, obstacleMark, buildingMark);
// CityGenerator::generateTrianGrid<PFP>(map, position, nbSquares, nbSquares, sideSize, obstacleMark, buildingMark);
// CityGenerator::generateCorridor<PFP>(map, position, obstacleMark, buildingMark, 50, nbSquares);
CityGenerator::generateCity<PFP>(map, position, obstacleMark, buildingMark, sideSize, nbSquares);
// CityGenerator::generateMall<PFP>(map, position, obstacleMark, buildingMark, sideSize);
// CityGenerator::simplifyFreeSpace<PFP>(map, position, obstacleMark, buildingMark);
// CityGenerator::convexifyFreeSpace<PFP>(map, position, obstacleMark, buildingMark);
// CityGenerator::installGuardRail<PFP>(map, position, obstacleMark, buildingMark, 5.0f);
map.init();
registerObstaclesInFaces();
// registerObstaclesInFaces();
// subdivideAllToMaxLevel();
......@@ -216,6 +311,10 @@ void EnvMap::registerObstaclesInFaces()
if(!buildingMark.isMarked(d))
{
Dart dd = d;
//retrieve all obstacles within its one-ring
//first : test all edges of the face of d
do
{
if(obstacleMark.isMarked(dd))
......@@ -229,6 +328,7 @@ void EnvMap::registerObstaclesInFaces()
dd = map.phi1(dd);
} while(dd != d);
//second : test all edges of neighboring faces
do
{
Dart ddd = map.alpha1(map.alpha1(dd));
......@@ -258,26 +358,74 @@ void EnvMap::addNeighborObstacles(PFP::OBSTACLES& obst, Dart d, bool edgeNeighbo
{
if(obstacleMark.isMarked(dd))
{
if(buildingMark.isMarked(dd))
{
Dart next = map.phi1(dd);
Dart previous = map.phi_1(dd);
Obstacle* o = new Obstacle(position[dd], position[next], position[previous], position[map.phi1(next)]);
obst.push_back(o);