Public Member Functions | List of all members
sdf::v10::Mesh Class Reference

Mesh represents a mesh shape, and is usually accessed through a Geometry. More...

#include <Mesh.hh>

Public Member Functions

 Mesh ()
 Constructor. More...
 
 Mesh (const Mesh &_mesh)
 Copy constructor. More...
 
 Mesh (Mesh &&_mesh) noexcept
 Move constructor. More...
 
virtual ~Mesh ()
 Destructor. More...
 
bool CenterSubmesh () const
 Get whether the submesh should be centered at 0,0,0. More...
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load. More...
 
const std::string & FilePath () const
 The path to the file where this element was loaded from. More...
 
Errors Load (ElementPtr _sdf)
 Load the mesh geometry based on a element pointer. More...
 
Meshoperator= (const Mesh &_mesh)
 Copy Assignment operator. More...
 
Meshoperator= (Mesh &&_mesh)
 Move assignment operator. More...
 
ignition::math::Vector3d Scale () const
 Get the mesh's scale factor. More...
 
void SetCenterSubmesh (const bool _center)
 Set whether the submesh should be centered. More...
 
void SetFilePath (const std::string &_filePath)
 Set the path to the file where this element was loaded from. More...
 
void SetScale (const ignition::math::Vector3d &_scale)
 Set the mesh's scale factor. More...
 
void SetSubmesh (const std::string &_submesh)
 Set the mesh's submesh. More...
 
void SetUri (const std::string &_uri)
 Set the mesh's URI. More...
 
std::string Submesh () const
 A submesh, contained with the mesh at the specified URI, may optionally be specified. More...
 
std::string Uri () const
 Get the mesh's URI. More...
 

Detailed Description

Mesh represents a mesh shape, and is usually accessed through a Geometry.

Constructor & Destructor Documentation

◆ Mesh() [1/3]

sdf::v10::Mesh::Mesh ( )

Constructor.

◆ Mesh() [2/3]

sdf::v10::Mesh::Mesh ( const Mesh _mesh)

Copy constructor.

Parameters
[in]_meshMesh to copy.

◆ Mesh() [3/3]

sdf::v10::Mesh::Mesh ( Mesh &&  _mesh)
noexcept

Move constructor.

Parameters
[in]_meshMesh to move.

◆ ~Mesh()

virtual sdf::v10::Mesh::~Mesh ( )
virtual

Destructor.

Member Function Documentation

◆ CenterSubmesh()

bool sdf::v10::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()

sdf::ElementPtr sdf::v10::Mesh::Element ( ) const

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::v10::Mesh::FilePath ( ) const

The path to the file where this element was loaded from.

Returns
Full path to the file on disk.

◆ Load()

Errors sdf::v10::Mesh::Load ( ElementPtr  _sdf)

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]_sdfThe SDF Element pointer
Returns
Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.

◆ operator=() [1/2]

Mesh& sdf::v10::Mesh::operator= ( const Mesh _mesh)

Copy Assignment operator.

Parameters
[in]_meshThe mesh to set values from.
Returns
*this

◆ operator=() [2/2]

Mesh& sdf::v10::Mesh::operator= ( Mesh &&  _mesh)

Move assignment operator.

Parameters
[in]_meshMesh to move.
Returns
Reference to this.

◆ Scale()

ignition::math::Vector3d sdf::v10::Mesh::Scale ( ) const

Get the mesh's scale factor.

Returns
The mesh's scale factor.

◆ SetCenterSubmesh()

void sdf::v10::Mesh::SetCenterSubmesh ( const bool  _center)

Set whether the submesh should be centered.

See CenterSubmesh() for more information.

Parameters
[in]_centerTrue to center the submesh.

◆ SetFilePath()

void sdf::v10::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::v10::Mesh::SetScale ( const ignition::math::Vector3d &  _scale)

Set the mesh's scale factor.

Returns
The mesh's scale factor.

◆ SetSubmesh()

void sdf::v10::Mesh::SetSubmesh ( const std::string &  _submesh)

Set the mesh's submesh.

See Submesh() for more information.

Parameters
[in]_submeshName of the submesh. The name should match a submesh within the mesh at the specified URI.

◆ SetUri()

void sdf::v10::Mesh::SetUri ( const std::string &  _uri)

Set the mesh's URI.

Parameters
[in]_uriThe URI of the mesh.

◆ Submesh()

std::string sdf::v10::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.

◆ Uri()

std::string sdf::v10::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: