SLAMflex SE  0.1.0
SLAMflex provides detection and tracking of dominant planes for smartphone devices. This plane can then be used to show AR content relative to the plane orientation. The detection of plane is performed in the field of view of the smartphone camera. In subsequent frames it is tracked. The interface returns the plane position and orientation.
Map.cpp
Go to the documentation of this file.
1 // Copyright 2008 Isis Innovation Limited
2 #include "Map.h"
3 #include "MapPoint.h"
4 
6 {
7  Reset();
8 }
9 
10 void Map::Reset()
11 {
12  for(unsigned int i=0; i<vpPoints.size(); i++)
13  delete vpPoints[i];
14  vpPoints.clear();
15  bGood = false;
16  EmptyTrash();
17 }
18 
20 {
21  int nBad = 0;
22  for(int i = vpPoints.size()-1; i>=0; i--)
23  {
24  if(vpPoints[i]->bBad)
25  {
26  vpPointsTrash.push_back(vpPoints[i]);
27  vpPoints.erase(vpPoints.begin() + i);
28  nBad++;
29  }
30  };
31 };
32 
34 {
35  for(unsigned int i=0; i<vpPointsTrash.size(); i++)
36  delete vpPointsTrash[i];
37  vpPointsTrash.clear();
38 };
39 
40 
41 
42 
bool bGood
Definition: Map.h:37
std::vector< MapPoint * > vpPoints
Definition: Map.h:33
Map()
Definition: Map.cpp:5
std::vector< MapPoint * > vpPointsTrash
Definition: Map.h:34
void EmptyTrash()
Definition: Map.cpp:33
void MoveBadPointsToTrash()
Definition: Map.cpp:19
void Reset()
Definition: Map.cpp:10