Commit d17e2190 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

update xxx_ORBIT -> xxx

parent a722a20b
......@@ -158,7 +158,7 @@ void generateMall(typename PFP::MAP& map,typename PFP::TVEC3& position, CellMark
{
float floorHeight = 100;
typename PFP::VEC3 transl(0,0,floorHeight);
CellMarker m(map, VERTEX_CELL) ;
CellMarker m(map, VERTEX) ;
for(Dart d=map.begin();d!=map.end();map.next(d))
{
......@@ -262,14 +262,14 @@ void simplifyFreeSpace(typename PFP::MAP& map, typename PFP::TVEC3& position, Ce
typedef typename PFP::VEC3 VEC3;
typedef std::multimap<float, Dart> VEC_D_A;
AutoAttributeHandler<float> tableArea(map, FACE_ORBIT);
AutoAttributeHandler<CGoGN::NoMathIONameAttribute<VEC_D_A::iterator> > tableIt(map, EDGE_ORBIT);
AutoAttributeHandler<float> tableArea(map, FACE);
AutoAttributeHandler<CGoGN::NoMathIONameAttribute<VEC_D_A::iterator> > tableIt(map, EDGE);
VEC_D_A orderedD;
// compute all heuristic and construct multimap
Algo::Geometry::computeAreaFaces<PFP>(map, position, tableArea);
CellMarker eM(map, EDGE_CELL);
CellMarker eM(map, EDGE);
for(Dart d = map.begin(); d != map.end(); map.next(d))
{
if(!eM.isMarked(d) && !obstacleMark.isMarked(d) && !buildingMark.isMarked(d))
......@@ -495,7 +495,7 @@ void convexifyFreeSpace(typename PFP::MAP& map, typename PFP::TVEC3& position, C
typedef typename PFP::VEC3 VEC3;
float area;
CellMarker m(map, FACE_CELL);
CellMarker m(map, FACE);
for(Dart d = map.begin(); d != map.end(); map.next(d))
{
if(!m.isMarked(d) && !obstacleMark.isMarked(d) && !buildingMark.isMarked(d))
......@@ -556,8 +556,8 @@ void convexifyFreeSpace(typename PFP::MAP& map, typename PFP::TVEC3& position, C
template <typename PFP>
void installGuardRail(typename PFP::MAP& map,typename PFP::TVEC3& position, CellMarker& obstacleMark, CellMarker& buildingMark, float height)
{
CellMarker cm(map,EDGE_CELL);
CellMarkerNoUnmark railVert(map,EDGE_CELL);
CellMarker cm(map,EDGE);
CellMarkerNoUnmark railVert(map,EDGE);
for(Dart d = map.begin(); d != map.end(); map.next(d))
{
if(!cm.isMarked(d))
......
......@@ -21,12 +21,12 @@ std::vector<Dart> pathFindAStar(typename PFP::MAP& map,const typename PFP::TVEC3
{
std::vector<Dart> path;
AutoAttributeHandler< float > tablePathCost(map,FACE_ORBIT);
AutoAttributeHandler< Dart > tablePred(map,FACE_ORBIT);
AutoAttributeHandler< float > tablePathCost(map,FACE);
AutoAttributeHandler< Dart > tablePred(map,FACE);
std::multimap<float,Dart> vToDev;
CellMarker m(map,FACE_ORBIT);
CellMarker m(map,FACE);
vToDev.insert(std::make_pair(0, stopPos));
......
......@@ -10,30 +10,30 @@
using namespace CGoGN;
EnvMap::EnvMap() :
obstacleMark(map, EDGE_CELL),
buildingMark(map, FACE_CELL),
refineMark(map, FACE_CELL),
coarsenMark(map, FACE_CELL)
obstacleMark(map, EDGE),
buildingMark(map, FACE),
refineMark(map, FACE),
coarsenMark(map, FACE)
{
position = map.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
normal = map.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal");
agentvect = map.addAttribute<PFP::AGENTVECT>(FACE_ORBIT, "agents");
neighborAgentvect = map.addAttribute<PFP::AGENTVECT>(FACE_ORBIT, "neighborAgents");
obstvect = map.addAttribute<PFP::OBSTACLEVECT>(FACE_ORBIT, "obstacles");
subdivisableFace = map.addAttribute<PFP::BOOLATTRIB>(FACE_ORBIT, "subdivisableFace");
position = map.addAttribute<PFP::VEC3>(VERTEX, "position");
normal = map.addAttribute<PFP::VEC3>(VERTEX, "normal");
agentvect = map.addAttribute<PFP::AGENTVECT>(FACE, "agents");
neighborAgentvect = map.addAttribute<PFP::AGENTVECT>(FACE, "neighborAgents");
obstvect = map.addAttribute<PFP::OBSTACLEVECT>(FACE, "obstacles");
subdivisableFace = map.addAttribute<PFP::BOOLATTRIB>(FACE, "subdivisableFace");
}
unsigned int EnvMap::mapMemoryCost()
{
return (map.getAttributeContainer(DART_ORBIT)).memorySize()
+ (map.getAttributeContainer(VERTEX_ORBIT)).memorySize()
+ (map.getAttributeContainer(EDGE_ORBIT)).memorySize()
+ (map.getAttributeContainer(FACE_ORBIT)).memorySize();
return (map.getAttributeContainer(DART)).memorySize()
+ (map.getAttributeContainer(VERTEX)).memorySize()
+ (map.getAttributeContainer(EDGE)).memorySize()
+ (map.getAttributeContainer(FACE)).memorySize();
}
Dart EnvMap::getBelongingCell(const PFP::VEC3& pos)
{
CellMarkerStore m(map, FACE_ORBIT);
CellMarkerStore m(map, FACE);
for(Dart d = map.begin(); d != map.end(); map.next(d))
{
if(!m.isMarked(d))
......@@ -78,7 +78,7 @@ void EnvMap::foreach_neighborFace(Dart d, FunctorType& f)
void EnvMap::registerObstaclesInFaces()
{
CellMarker m(map, FACE_CELL);
CellMarker m(map, FACE);
for(Dart d = map.begin(); d != map.end(); map.next(d))
{
if(!m.isMarked(d))
......@@ -157,7 +157,7 @@ void EnvMap::addNeighborObstacles(PFP::OBSTACLES& obst, Dart d, bool edgeNeighbo
// }
//
// // mark adjacent cells shared by newFace and oldFace
// CellMarkerNoUnmark f(map, FACE_CELL);
// CellMarkerNoUnmark f(map, FACE);
// Dart d = oldFace;
// do
// {
......@@ -299,7 +299,7 @@ void EnvMap::updateMap()
neighborAgentvect[old].clear() ;
map.setCurrentLevel(fLevel) ;
CellMarkerStore newF(map, FACE_CELL);
CellMarkerStore newF(map, FACE);
newF.mark(old);
Algo::IHM::subdivideFace<PFP>(map, old, position) ;
......@@ -402,10 +402,10 @@ void EnvMap::updateMap()
map.setCurrentLevel(fLevel) ;
coarsenMark.unmark(fit) ;
std::vector<Dart>::iterator start = it + 1 ;
unsigned int fEmb = map.getEmbedding(FACE_ORBIT, fit) ;
unsigned int fEmb = map.getEmbedding(FACE, fit) ;
while(start != coarsenCandidate.end())
{
if(map.getEmbedding(FACE_ORBIT, *start) == fEmb)
if(map.getEmbedding(FACE, *start) == fEmb)
{
*start = coarsenCandidate.back() ;
coarsenCandidate.pop_back() ;
......@@ -440,10 +440,10 @@ void EnvMap::updateMap()
Dart centerFace = map.phi2(map.phi1(old)) ;
coarsenMark.unmark(centerFace) ;
std::vector<Dart>::iterator start = it + 1 ;
unsigned int fEmb = map.getEmbedding(FACE_ORBIT, centerFace) ;
unsigned int fEmb = map.getEmbedding(FACE, centerFace) ;
while(start != coarsenCandidate.end())
{
if(map.getEmbedding(FACE_ORBIT, *start) == fEmb)
if(map.getEmbedding(FACE, *start) == fEmb)
{
*start = coarsenCandidate.back() ;
coarsenCandidate.pop_back() ;
......@@ -499,6 +499,6 @@ void EnvMap::resetAgentInFace(Agent* agent)
{
VEC3 pos = agent->part_.m_position;
agent->part_.m_position = Algo::Geometry::faceCentroid<PFP>(map, agent->part_.d, position);
agent->part_.state = FACE_ORBIT;
agent->part_.state = FACE;
agent->part_.move(pos);
}
......@@ -70,7 +70,7 @@ void Simulator::doStep()
if(!envMap_.map.isDartValid(agents_[i]->part_.d))
std::cout << " AGENT PART INVALID DART after update" << std::endl ;
// if(envMap_.map.getEmbedding(oldFace, FACE_ORBIT) != envMap_.map.getEmbedding(agents_[i]->part_.d, FACE_ORBIT))
// if(envMap_.map.getEmbedding(oldFace, FACE) != envMap_.map.getEmbedding(agents_[i]->part_.d, FACE))
if(agents_[i]->part_.crossCell != CGoGN::Algo::MovingObjects::NO_CROSS)
// switch(agents_[i]->part_.crossCell)
{
......@@ -105,7 +105,7 @@ void Simulator::setupScenario(unsigned int nbMaxAgent)
* opposite side of the environment.
*/
Dart d = envMap_.map.begin();
CellMarker filled(envMap_.map,FACE_ORBIT);
CellMarker filled(envMap_.map,FACE);
unsigned int nbx = 10;
unsigned int nby = 10;
......
......@@ -154,7 +154,7 @@ void SocialAgents::cb_redraw()
{
glColor3f(1.0f, 0.0f, 0.0f);
glLineWidth(5.0f);
CellMarker dmo(sim.envMap_.map, EDGE_CELL);
CellMarker dmo(sim.envMap_.map, EDGE);
for(Dart d = sim.envMap_.map.begin(); d != sim.envMap_.map.end(); sim.envMap_.map.next(d))
{
if(!dmo.isMarked(d))
......@@ -224,7 +224,7 @@ void SocialAgents::cb_redraw()
// glColor3f(0.0f, 1.0f, 0.0f);
// glLineWidth(5.0f);
// CellMarker dmb(sim.envMap_.map, FACE_CELL);
// CellMarker dmb(sim.envMap_.map, FACE);
// for(Dart d = sim.envMap_.map.begin(); d != sim.envMap_.map.end(); sim.envMap_.map.next(d))
// {
// if(!dmb.isMarked(d))
......@@ -476,7 +476,7 @@ bool SocialAgents::exportScenePov(PFP::MAP& map, PFP::TVEC3& position, const std
if(!highlight.isMarked(d)) {
PFP::AGENTS listAgentInCell = sim.envMap_.agentvect[d];
if(std::find(listAgentInCell.begin(), listAgentInCell.end(), ag)!=listAgentInCell.end()) {
highlight.markOrbit(FACE_ORBIT,d);
highlight.markOrbit(FACE,d);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment