17 #ifndef GZ_COMMON_MESHMANAGER_HH_
18 #define GZ_COMMON_MESHMANAGER_HH_
26 #include <gz/math/Plane.hh>
27 #include <gz/math/Matrix3.hh>
28 #include <gz/math/Matrix4.hh>
29 #include <gz/math/Vector2.hh>
30 #include <gz/math/Vector3.hh>
31 #include <gz/math/Pose3.hh>
33 #include <gz/utils/ImplPtr.hh>
37 #include <gz/common/graphics/Export.hh>
83 const std::string &_extension,
bool _exportTextures =
false);
87 public:
bool IsValidFilename(
const std::string &_filename);
94 public:
void MeshAABB(
const Mesh *_mesh,
102 public:
void GenSphericalTexCoord(
const Mesh *_mesh,
110 public:
void AddMesh(
Mesh *_mesh);
119 public:
void RemoveAll();
129 public:
bool HasMesh(
const std::string &_name)
const;
136 public:
void CreateSphere(
const std::string &_name,
const float _radius,
137 const int _rings,
const int _segments);
159 public:
void CreateExtrudedPolyline(
const std::string &_name,
161 &_vertices,
const double _height);
169 public:
void CreateCylinder(
const std::string &_name,
173 const int _segments);
180 public:
void CreateEllipsoid(
const std::string &_name,
182 const unsigned int _rings,
183 const unsigned int _segments);
191 public:
void CreateCapsule(
const std::string &_name,
194 const unsigned int _rings,
195 const unsigned int _segments);
207 const int _segments);
221 const float _innerRadius,
222 const float _outterRadius,
226 const double _arc = 2.0 *
GZ_PI);
255 public:
void SetAssimpEnvs();
263 private:
void Tesselate2DMesh(
SubMesh *_sm,
264 const int _meshWidth,
265 const int _meshHeight,
266 const bool _doubleSided);
271 public:
void CreateCamera(
const std::string &_name,
const float _scale);
280 const Mesh *_m2,
const int _operation,
311 private:
static void ConvertPolylinesToVerticesAndEdges(
325 private:
static size_t AddUniquePointToVerticesTable(
331 GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)