Public Member Functions | List of all members
sdf::SDF_VERSION_NAMESPACE::Cylinder Class Reference

Cylinder represents a cylinder shape, and is usually accessed through a Geometry. More...

#include <Cylinder.hh>

Public Member Functions

 Cylinder ()
 Constructor. More...
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load. More...
 
double Length () const
 Get the cylinder's length in meters. More...
 
Errors Load (ElementPtr _sdf)
 Load the cylinder geometry based on a element pointer. More...
 
double Radius () const
 Get the cylinder's radius in meters. More...
 
void SetLength (const double _length)
 Set the cylinder's length in meters. More...
 
void SetRadius (const double _radius)
 Set the cylinder's radius in meters. More...
 
gz::math::Cylinderd & Shape ()
 Get a mutable Gazebo Math representation of this Cylinder. More...
 
const gz::math::Cylinderd & Shape () const
 Get the Gazebo Math representation of this Cylinder. More...
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this cylinder. More...
 

Detailed Description

Cylinder represents a cylinder shape, and is usually accessed through a Geometry.

Constructor & Destructor Documentation

◆ Cylinder()

sdf::SDF_VERSION_NAMESPACE::Cylinder::Cylinder ( )

Constructor.

Member Function Documentation

◆ Element()

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

◆ Length()

double sdf::SDF_VERSION_NAMESPACE::Cylinder::Length ( ) const

Get the cylinder's length in meters.

Returns
The length of the cylinder in meters.

◆ Load()

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

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

◆ Radius()

double sdf::SDF_VERSION_NAMESPACE::Cylinder::Radius ( ) const

Get the cylinder's radius in meters.

Returns
The radius of the cylinder in meters.

◆ SetLength()

void sdf::SDF_VERSION_NAMESPACE::Cylinder::SetLength ( const double  _length)

Set the cylinder's length in meters.

Parameters
[in]_lengthThe length of the cylinder in meters.

◆ SetRadius()

void sdf::SDF_VERSION_NAMESPACE::Cylinder::SetRadius ( const double  _radius)

Set the cylinder's radius in meters.

Parameters
[in]_radiusThe radius of the cylinder in meters.

◆ Shape() [1/2]

gz::math::Cylinderd& sdf::SDF_VERSION_NAMESPACE::Cylinder::Shape ( )

Get a mutable Gazebo Math representation of this Cylinder.

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

◆ Shape() [2/2]

const gz::math::Cylinderd& sdf::SDF_VERSION_NAMESPACE::Cylinder::Shape ( ) const

Get the Gazebo Math representation of this Cylinder.

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

◆ ToElement()

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

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

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

Returns
SDF element pointer with updated cylinder values.

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