Loading...
Searching...
No Matches
Public Member Functions | List of all members
sdf::SDF_VERSION_NAMESPACE::Surface Class Reference

Surface information for a collision. More...

#include <Surface.hh>

Public Member Functions

 Surface ()
 Default constructor.
 
const sdf::ContactContact () const
 Get the associated contact object.
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load.
 
const sdf::FrictionFriction () const
 Get the associated friction object.
 
Errors Load (ElementPtr _sdf)
 Load the surface based on a element pointer.
 
void SetContact (const sdf::Contact &_contact)
 Set the associated contact object.
 
void SetFriction (const sdf::Friction &_friction)
 Set the associated friction object.
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this surface.
 
sdf::ElementPtr ToElement (sdf::Errors &_errors) const
 Create and return an SDF element filled with data from this surface.
 

Detailed Description

Surface information for a collision.

Constructor & Destructor Documentation

◆ Surface()

sdf::SDF_VERSION_NAMESPACE::Surface::Surface ( )

Default constructor.

Member Function Documentation

◆ Contact()

const sdf::Contact * sdf::SDF_VERSION_NAMESPACE::Surface::Contact ( ) const

Get the associated contact object.

Returns
Pointer to the associated Contact object, nullptr if the Surface doesn't contain a Contact element.

◆ Element()

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Surface::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.

◆ Friction()

const sdf::Friction * sdf::SDF_VERSION_NAMESPACE::Surface::Friction ( ) const

Get the associated friction object.

Returns
Pointer to the associated friction object, nullptr if the Surface doesn't contain a friction element.

◆ Load()

Errors sdf::SDF_VERSION_NAMESPACE::Surface::Load ( ElementPtr  _sdf)

Load the surface 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.

◆ SetContact()

void sdf::SDF_VERSION_NAMESPACE::Surface::SetContact ( const sdf::Contact _contact)

Set the associated contact object.

Parameters
[in]_contThe contact object.

◆ SetFriction()

void sdf::SDF_VERSION_NAMESPACE::Surface::SetFriction ( const sdf::Friction _friction)

Set the associated friction object.

Parameters
[in]_frictionThe friction object.

◆ ToElement() [1/2]

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Surface::ToElement ( ) const

Create and return an SDF element filled with data from this surface.

Note that parameter passing functionality is not captured with this function.

Returns
SDF element pointer with updated surface values.

◆ ToElement() [2/2]

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Surface::ToElement ( sdf::Errors _errors) const

Create and return an SDF element filled with data from this surface.

Note that parameter passing functionality is not captured with this function.

Parameters
[out]_errorsVector of errors.
Returns
SDF element pointer with updated surface values.

The documentation for this class was generated from the following file: