8 #ifndef GlobeEngine_TrafficObject_h
9 #define GlobeEngine_TrafficObject_h
12 #include "OpenGL_Includes.h"
29 #include <pcl/point_cloud.h>
30 #include <pcl/search/kdtree.h>
33 #include <boost/config.hpp>
34 #include <boost/graph/adjacency_list.hpp>
35 #include <boost/graph/dijkstra_shortest_paths.hpp>
36 #include <boost/graph/graph_traits.hpp>
43 typedef boost::adjacency_list_traits<boost::vecS, boost::vecS, boost::undirectedS>::vertex_descriptor
GraphVertex;
44 typedef boost::property < boost::edge_weight_t, double >
EdgeWeight;
46 typedef boost::adjacency_list<
50 boost::property<boost::vertex_distance_t, double,
51 boost::property<boost::vertex_predecessor_t, GraphVertex> >,
70 FinishedEdgeInfo(
unsigned int _idx,
float _weight , std::vector<int> _finalPoints): idx(_idx), weight(_weight), finalPoints(_finalPoints){}
80 void create(
ModelLayer* _modelLayerref, std::shared_ptr<TrafficBlueprint> _blueprint, std::shared_ptr<ReferenceSystem> _referenceSystem);
89 int createPointCloud(std::vector<ge::VBOVertex3d> _vertices, vmml::Vector3f _color, std::string _name);
90 int createPointCloud(pcl::PointCloud<pcl::PointXYZ>::Ptr _cloud, vmml::Vector3f _color, std::string _name);
108 return numberOfLinesWithZeroLineCount;
124 int createPath(std::shared_ptr<geData::PolyLine> _path, std::string _name,
bool _inLocalCoordinates);
131 void setPointCloudProperties(
int idx, vmml::Vector3f _color, std::string _name);
133 std::shared_ptr<TrafficBlueprint> blueprint;
144 std::map< int, int > kdtreeToEdgeMap;
147 std::vector<int> nearestNeigbors;
153 pcl::search::KdTree<pcl::PointXYZ>* kdtree;
156 GLsizei* lineStripLenght;
159 bool isReferenceNetwork;
163 std::shared_ptr<geData::ColorisationTable> bundlingColorisation;
171 unsigned int numberOfLinesWithZeroLineCount;
int getBasePointsID() const
Definition: TrafficObject.cpp:639
void exportGraphData(std::string _path)
Definition: TrafficObject.cpp:153
std::vector< int > getShortestPath(int _source, int _dest)
Definition: TrafficObject.cpp:318
void setGraphNetworkProperties(int _idx, vmml::Vector3f _color, vmml::Vector3f _pos, std::string _name)
Definition: TrafficObject.cpp:567
void printKDtree()
Definition: TrafficObject.cpp:617
void create(ModelLayer *_modelLayerref, std::shared_ptr< TrafficBlueprint > _blueprint, std::shared_ptr< ReferenceSystem > _referenceSystem)
Definition: TrafficObject.cpp:44
Definition: TrafficObject.h:55
Definition: TrafficObject.h:63
unsigned int getNumberOfLineWithZeroLineCount() const
Definition: TrafficObject.h:107
ge::VBOVertex3d getGraphNodeContent(int _nodeIdx)
Definition: TrafficObject.cpp:344
void setupColorInformation(const std::shared_ptr< geData::ColorisationTable > &_table=NULL)
Definition: TrafficObject.cpp:402
Definition: ClusterGrid.h:17
boost::property< boost::edge_weight_t, double > EdgeWeight
Definition: TrafficObject.h:44
NearestNeighborSearchResult(int _K)
Definition: TrafficObject.h:60
void buildKDtree()
Definition: TrafficObject.cpp:272
void disableAsReferenceNetwork()
Definition: TrafficObject.cpp:642
void updateMultiLineObjectColorInformation()
Definition: TrafficObject.cpp:631
boost::adjacency_list< boost::listS, boost::vecS, boost::undirectedS, boost::property< boost::vertex_distance_t, double, boost::property< boost::vertex_predecessor_t, GraphVertex > >, EdgeWeight > SimpleUndirectedGraph
Definition: TrafficObject.h:53
Definition: ReducableUndirectedGraph.h:232
void createCloudData()
Definition: TrafficObject.cpp:205
boost::adjacency_list_traits< boost::vecS, boost::vecS, boost::undirectedS >::vertex_descriptor GraphVertex
Definition: TrafficObject.h:41
FinishedEdgeInfo()
Definition: TrafficObject.h:69
bool checkIfReferenceNetwork()
Definition: TrafficObject.cpp:640
~TrafficObject()
Definition: TrafficObject.cpp:15
Definition: ModelLayer.h:107
void update()
Definition: TrafficObject.cpp:397
void createMultiLineGraph(vmml::Vector3f _color, std::string _name)
int createPointCloud(std::vector< ge::VBOVertex3d > _vertices, vmml::Vector3f _color, std::string _name)
Definition: TrafficObject.cpp:583
float weight
Definition: TrafficObject.h:66
int getCrossingsID() const
Definition: TrafficObject.cpp:636
std::vector< int > finalPoints
Definition: TrafficObject.h:67
pcl::PointXYZ getKdTreePoint(int _index)
Definition: TrafficObject.cpp:339
FinishedEdgeInfo(unsigned int _idx, float _weight, std::vector< int > _finalPoints)
Definition: TrafficObject.h:70
Definition: VBOVertex.h:115
unsigned int idx
Definition: TrafficObject.h:65
void loadData(std::string filename)
Definition: TrafficObject.cpp:55
NearestNeighborSearchResult * findNearestNeighbor(pcl::PointXYZ _point, int _K)
Definition: TrafficObject.cpp:348
int getEndPointsID() const
Definition: TrafficObject.cpp:637
std::vector< float > pointSquaredDistances
Definition: TrafficObject.h:58
Definition: TrafficObject.h:73
void setMinMaxWeightInformationToGraphWeight()
Definition: TrafficObject.cpp:364
void printKDtreeIndex(int _index)
Definition: TrafficObject.cpp:625
NearestNeighborSearchResult()
Definition: TrafficObject.h:59
Definition: LineFeatureObject.h:21
void clear()
Definition: TrafficObject.cpp:20
int getGraphCloudID() const
Definition: TrafficObject.cpp:638
int createPath(std::shared_ptr< geData::PolyLine > _path, std::string _name, bool _inLocalCoordinates)
Definition: TrafficObject.cpp:578
void createGraph()
Definition: TrafficObject.cpp:178
void setVisibility(bool _in)
TrafficObject()
Definition: TrafficObject.cpp:9
void reduceGraphData()
Definition: TrafficObject.cpp:233
void createPolyLine(std::vector< int > _indices, vmml::Vector3f _color, double _lineWeight, ge::VBOVertex3d _commuterPoint_1, ge::VBOVertex3d _commuterPoint_2, int _bundlingIdx)
Definition: TrafficObject.cpp:432
void createGeometry()
Definition: TrafficObject.cpp:385
std::vector< int > pointIndices
Definition: TrafficObject.h:57
void enableAsReferenceNetwork()
Definition: TrafficObject.cpp:641