Go to the documentation of this file.
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>
35 #include <gz/common/graphics/Export.hh>
45 class MeshManagerPrivate;
79 const std::string &_extension,
bool _exportTextures =
false);
83 public:
bool IsValidFilename(
const std::string &_filename);
90 public:
void MeshAABB(
const Mesh *_mesh,
91 gz::math::Vector3d &_center,
92 gz::math::Vector3d &_min_xyz,
93 gz::math::Vector3d &_max_xyz);
98 public:
void GenSphericalTexCoord(
const Mesh *_mesh,
99 const gz::math::Vector3d &_center);
106 public:
void AddMesh(
Mesh *_mesh);
111 public:
const gz::common::Mesh *MeshByName(
116 public:
bool HasMesh(
const std::string &_name)
const;
123 public:
void CreateSphere(
const std::string &_name,
const float _radius,
124 const int _rings,
const int _segments);
131 const gz::math::Vector3d &_sides,
132 const gz::math::Vector2d &_uvCoords);
146 public:
void CreateExtrudedPolyline(
const std::string &_name,
148 &_vertices,
const double _height);
156 public:
void CreateCylinder(
const std::string &_name,
160 const int _segments);
167 public:
void CreateEllipsoid(
const std::string &_name,
168 const gz::math::Vector3d &_radii,
169 const unsigned int _rings,
170 const unsigned int _segments);
178 public:
void CreateCapsule(
const std::string &_name,
181 const unsigned int _rings,
182 const unsigned int _segments);
194 const int _segments);
208 const float _innerRadius,
209 const float _outterRadius,
213 const double _arc = 2.0 *
IGN_PI);
221 const gz::math::Planed &_plane,
222 const gz::math::Vector2d &_segments,
223 const gz::math::Vector2d &_uvTile);
233 const gz::math::Vector3d &_normal,
235 const gz::math::Vector2d &_size,
236 const gz::math::Vector2d &_segments,
237 const gz::math::Vector2d &_uvTile);
246 private:
void Tesselate2DMesh(
SubMesh *_sm,
247 const int _meshWidth,
248 const int _meshHeight,
249 const bool _doubleSided);
254 public:
void CreateCamera(
const std::string &_name,
const float _scale);
263 const Mesh *_m2,
const int _operation,
264 const gz::math::Pose3d &_offset = gz::math::Pose3d::Zero);
273 private:
static void ConvertPolylinesToVerticesAndEdges(
287 private:
static size_t AddUniquePointToVerticesTable(
289 const gz::math::Vector2d &_p,
Forward declarations for the common classes.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: gz/common/SuppressWarning.hh:65
Singleton template class.
Definition: gz/common/SingletonT.hh:27
A 3D mesh.
Definition: gz/common/Mesh.hh:41
Maintains and manages all meshes.
Definition: gz/common/MeshManager.hh:49
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: gz/common/SuppressWarning.hh:68
A child mesh.
Definition: gz/common/SubMesh.hh:40