23#include <gz/math/Vector3.hh>
24#include <gz/math/Inertial.hh>
25#include <gz/utils/ImplPtr.hh>
29#include <sdf/config.hh>
34 inline namespace SDF_VERSION_NAMESPACE {
90 GZ_UTILS_IMPL_PTR(dataPtr)
150 public: std::string
Uri()
const;
154 public:
void SetUri(
const std::string &_uri);
166 public: gz::math::Vector3d
Scale()
const;
170 public:
void SetScale(
const gz::math::Vector3d &_scale);
203 public: std::optional<gz::math::Inertiald>
230 GZ_UTILS_IMPL_PTR(dataPtr)
Convex decomposition.
Definition Mesh.hh:53
void SetVoxelResolution(unsigned int _voxelResolution)
Set the voxel resolution to use for representing the mesh.
Errors Load(ElementPtr _sdf)
Load the contact based on a element pointer.
void SetMaxConvexHulls(unsigned int _maxConvexHulls)
Set the maximum number of convex hulls that can be generated.
ConvexDecomposition()
Default constructor.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
unsigned int VoxelResolution() const
Get the voxel resolution to use for representing the mesh.
unsigned int MaxConvexHulls() const
Get the maximum number of convex hulls that can be generated.
Mesh represents a mesh shape, and is usually accessed through a Geometry.
Definition Mesh.hh:96
void SetFilePath(const std::string &_filePath)
Set the path to the file where this element was loaded from.
Errors Load(sdf::ElementPtr _sdf, const ParserConfig &_config)
Load the mesh geometry based on a element pointer.
void SetConvexDecomposition(const sdf::ConvexDecomposition &_convexDecomposition)
Set the associated ConvexDecomposition object.
Errors Load(ElementPtr _sdf)
Load the mesh geometry based on a element pointer.
std::string Submesh() const
A submesh, contained with the mesh at the specified URI, may optionally be specified.
void SetUri(const std::string &_uri)
Set the mesh's URI.
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this mesh.
const std::string & FilePath() const
The path to the file where this element was loaded from.
std::optional< gz::math::Inertiald > CalculateInertial(sdf::Errors &_errors, double _density, const sdf::ElementPtr _autoInertiaParams, const ParserConfig &_config)
Calculate and return the Inertial values for the Mesh.
const sdf::ConvexDecomposition * ConvexDecomposition() const
Get the associated ConvexDecomposition object.
bool CenterSubmesh() const
Get whether the submesh should be centered at 0,0,0.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
bool SetOptimization(const std::string &_optimizationStr)
Set the mesh optimization method.
void SetSubmesh(const std::string &_submesh)
Set the mesh's submesh.
void SetOptimization(MeshOptimization _optimization)
Set the mesh optimization method.
void SetCenterSubmesh(const bool _center)
Set whether the submesh should be centered.
void SetScale(const gz::math::Vector3d &_scale)
Set the mesh's scale factor.
std::string Uri() const
Get the mesh's URI.
MeshOptimization Optimization() const
Get the mesh's optimization method.
std::string OptimizationStr() const
Get the mesh's optimization method.
sdf::ElementPtr ToElement(sdf::Errors &_errors) const
Create and return an SDF element filled with data from this mesh.
gz::math::Vector3d Scale() const
Get the mesh's scale factor.
This class contains configuration options for the libsdformat parser.
Definition ParserConfig.hh:106
std::vector< Error > Errors
A vector of Error.
Definition Types.hh:81
MeshOptimization
Mesh optimization method.
Definition Mesh.hh:42
@ CONVEX_DECOMPOSITION
Convex decomposition.
@ CONVEX_HULL
Convex hull.
std::shared_ptr< Element > ElementPtr
Definition Element.hh:55
namespace for Simulation Description Format parser
Definition Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition system_util.hh:25