Mesh represents a mesh shape, and is usually accessed through a Geometry.
More...
#include <Mesh.hh>
Mesh represents a mesh shape, and is usually accessed through a Geometry.
◆ Mesh()
sdf::SDF_VERSION_NAMESPACE::Mesh::Mesh |
( |
| ) |
|
◆ CenterSubmesh()
bool sdf::SDF_VERSION_NAMESPACE::Mesh::CenterSubmesh |
( |
| ) |
const |
Get whether the submesh should be centered at 0,0,0.
This will effectively remove any transformations on the submesh before the poses from parent links and models are applied. The return value is only applicable if a SubMesh has been specified.
- Returns
- True if the submesh should be centered.
◆ Element()
Get a pointer to the SDF element that was used during load.
- Returns
- SDF element pointer. The value will be nullptr if Load has not been called.
◆ FilePath()
const std::string& sdf::SDF_VERSION_NAMESPACE::Mesh::FilePath |
( |
| ) |
const |
The path to the file where this element was loaded from.
- Returns
- Full path to the file on disk.
◆ Load() [1/2]
Load the mesh geometry based on a element pointer.
This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.
- Parameters
-
- Returns
- Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.
◆ Load() [2/2]
Load the mesh geometry based on a element pointer.
This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.
- Parameters
-
[in] | _sdf | The SDF Element pointer |
[in] | _config | Parser configuration |
- Returns
- Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.
◆ Scale()
gz::math::Vector3d sdf::SDF_VERSION_NAMESPACE::Mesh::Scale |
( |
| ) |
const |
Get the mesh's scale factor.
- Returns
- The mesh's scale factor.
◆ SetCenterSubmesh()
void sdf::SDF_VERSION_NAMESPACE::Mesh::SetCenterSubmesh |
( |
const bool |
_center | ) |
|
Set whether the submesh should be centered.
See CenterSubmesh() for more information.
- Parameters
-
[in] | _center | True to center the submesh. |
◆ SetFilePath()
void sdf::SDF_VERSION_NAMESPACE::Mesh::SetFilePath |
( |
const std::string & |
_filePath | ) |
|
Set the path to the file where this element was loaded from.
\paramp[in] _filePath Full path to the file on disk.
◆ SetScale()
void sdf::SDF_VERSION_NAMESPACE::Mesh::SetScale |
( |
const gz::math::Vector3d & |
_scale | ) |
|
Set the mesh's scale factor.
- Returns
- The mesh's scale factor.
◆ SetSubmesh()
void sdf::SDF_VERSION_NAMESPACE::Mesh::SetSubmesh |
( |
const std::string & |
_submesh | ) |
|
Set the mesh's submesh.
See Submesh() for more information.
- Parameters
-
[in] | _submesh | Name of the submesh. The name should match a submesh within the mesh at the specified URI. |
◆ SetUri()
void sdf::SDF_VERSION_NAMESPACE::Mesh::SetUri |
( |
const std::string & |
_uri | ) |
|
Set the mesh's URI.
- Parameters
-
[in] | _uri | The URI of the mesh. |
◆ Submesh()
std::string sdf::SDF_VERSION_NAMESPACE::Mesh::Submesh |
( |
| ) |
const |
A submesh, contained with the mesh at the specified URI, may optionally be specified.
If specified, this submesh should be used instead of the entire mesh.
- Returns
- The name of the submesh within the mesh at the specified URI.
◆ ToElement()
Create and return an SDF element filled with data from this mesh.
Note that parameter passing functionality is not captured with this function.
- Returns
- SDF element pointer with updated mesh values.
◆ Uri()
std::string sdf::SDF_VERSION_NAMESPACE::Mesh::Uri |
( |
| ) |
const |
Get the mesh's URI.
- Returns
- The URI of the mesh data.
The documentation for this class was generated from the following file: