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

Ellipsoid represents a ellipsoid shape, and is usually accessed through a Geometry. More...

#include <Ellipsoid.hh>

Public Member Functions

 Ellipsoid ()
 Constructor.
 
std::optional< gz::math::Inertiald > CalculateInertial (double _density)
 Calculate and return the Inertial values for the Ellipsoid.
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load.
 
Errors Load (ElementPtr _sdf)
 Load the ellipsoid geometry based on a element pointer.
 
gz::math::Vector3d Radii () const
 Get the ellipsoid's radii in meters.
 
void SetRadii (const gz::math::Vector3d &_radii)
 Set the ellipsoid's x, y, and z radii in meters.
 
gz::math::Ellipsoidd & Shape ()
 Get a mutable Gazebo Math representation of this Ellipsoid.
 
const gz::math::Ellipsoidd & Shape () const
 Get the Gazebo Math representation of this Ellipsoid.
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this ellipsoid.
 
sdf::ElementPtr ToElement (sdf::Errors &_errors) const
 Create and return an SDF element filled with data from this ellipsoid.
 

Detailed Description

Ellipsoid represents a ellipsoid shape, and is usually accessed through a Geometry.

Constructor & Destructor Documentation

◆ Ellipsoid()

sdf::SDF_VERSION_NAMESPACE::Ellipsoid::Ellipsoid ( )

Constructor.

Member Function Documentation

◆ CalculateInertial()

std::optional< gz::math::Inertiald > sdf::SDF_VERSION_NAMESPACE::Ellipsoid::CalculateInertial ( double  _density)

Calculate and return the Inertial values for the Ellipsoid.

In order to calculate the inertial properties, the function mutates the object by updating its material properties.

Parameters
[in]_densityDensity of the ellipsoid in kg/m^3
Returns
A std::optional with gz::math::Inertiald object or std::nullopt

◆ Element()

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

◆ Load()

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

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

◆ Radii()

gz::math::Vector3d sdf::SDF_VERSION_NAMESPACE::Ellipsoid::Radii ( ) const

Get the ellipsoid's radii in meters.

Returns
The radius of the ellipsoid in meters.

◆ SetRadii()

void sdf::SDF_VERSION_NAMESPACE::Ellipsoid::SetRadii ( const gz::math::Vector3d &  _radii)

Set the ellipsoid's x, y, and z radii in meters.

Parameters
[in]_radiusVector of radii (x, y, z) of the ellipsoid in meters.

◆ Shape() [1/2]

gz::math::Ellipsoidd & sdf::SDF_VERSION_NAMESPACE::Ellipsoid::Shape ( )

Get a mutable Gazebo Math representation of this Ellipsoid.

Returns
A reference to a gz::math::Ellipsoidd object.

◆ Shape() [2/2]

const gz::math::Ellipsoidd & sdf::SDF_VERSION_NAMESPACE::Ellipsoid::Shape ( ) const

Get the Gazebo Math representation of this Ellipsoid.

Returns
A const reference to a gz::math::Ellipsoidd object.

◆ ToElement() [1/2]

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

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

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

Returns
SDF element pointer with updated ellipsoid values.

◆ ToElement() [2/2]

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

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

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

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

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