ed
shape_loader_private.h
Go to the documentation of this file.
1 #ifndef ED_MODELS_SHAPE_LOADER_PRIVATE_H_
2 #define ED_MODELS_SHAPE_LOADER_PRIVATE_H_
3 
4 // Some functions are moved to the include folder. So these can be included in other packages. There has been no need for the remaining
5 // functions in this file to be used in other packages. Therefore, these are kept here. But there is no reason for the functions not to
6 // be moved, if needed to be include somewhere else.
7 
8 #include <geolib/datatypes.h>
9 #include <tue/config/reader.h>
10 
11 #include <map>
12 #include <string>
13 #include <vector>
14 #include <sstream>
15 
16 namespace ed
17 {
18 
19 namespace models
20 {
21 
26 {
29 };
30 
37 std::vector<std::string> split(const std::string& strToSplit, char delimeter);
38 
39 std::string parseURI(const std::string& uri, ModelOrFile& uri_type);
40 
51 
63 geo::ShapePtr getHeightMapShape(const std::string& image_filename, const geo::Vec3& pos, const double blockheight,
64  const double resolution_x, const double resolution_y, const bool inverted, std::stringstream& error);
65 
77 
86 void createPolygon(geo::Shape& shape, const std::vector<geo::Vec2>& points, double height, std::stringstream& error, bool create_bottom = true);
87 
88 } // end models namespace
89 
90 } // end ed namespace
91 
92 #endif
datatypes.h
ed::models::parseURI
std::string parseURI(const std::string &uri, ModelOrFile &uri_type)
Definition: shape_loader.cpp:48
sstream
std::string
std::shared_ptr
ed::models::createPolygon
void createPolygon(geo::Shape &shape, const std::vector< geo::Vec2 > &points, double height, std::stringstream &error, bool create_bottom)
createPolygon create polygon mesh from points
Definition: shape_loader.cpp:451
vector
geo::Vec3T
std::stringstream
reader.h
geo::Transform3T
ed::models::ModelOrFile
ModelOrFile
The ModelOrFile enum This is used to determine the URI type in SDF.
Definition: shape_loader_private.h:25
ed::log::error
std::ostream & error()
Definition: logging.cpp:74
tue::config::Reader
ed::models::loadShape
geo::ShapePtr loadShape(const std::string &model_path, tue::config::Reader cfg, std::map< std::string, geo::ShapePtr > &shape_cache, std::stringstream &error)
loadShape load the shape of a model.
Definition: shape_loader.cpp:621
ed::models::split
std::vector< std::string > split(const std::string &strToSplit, char delimeter)
split Implementation by using delimiter as a character. Multiple delimeters are removed.
Definition: shape_loader.cpp:33
tue::config::RequiredOrOptional
RequiredOrOptional
tue::config::OPTIONAL
OPTIONAL
map
ed::models::MODEL
@ MODEL
Definition: shape_loader_private.h:27
ed
Definition: convex_hull.h:8
ed::models::FILE
@ FILE
Definition: shape_loader_private.h:28
tue::config::REQUIRED
REQUIRED
ed::models::readPose
bool readPose(tue::config::Reader &cfg, geo::Pose3D &pose, tue::config::RequiredOrOptional pos_req, tue::config::RequiredOrOptional rot_req)
readPose read pose into Pose3D. Both ED yaml and SDF. Also reads pos(position) of SDF.
Definition: shape_loader.cpp:561
ed::models::getHeightMapShape
geo::ShapePtr getHeightMapShape(cv::Mat &image_orig, const geo::Vec3 &pos, const geo::Vec3 &size, const bool inverted, std::stringstream &error)
getHeightMapShape convert grayscale image in a heigtmap mesh
Definition: shape_loader.cpp:213
geo::Shape
string