Public Member Functions | List of all members
sdf::v9::Sphere Class Reference

Sphere represents a sphere shape, and is usually accessed through a Geometry. More...

#include <Sphere.hh>

Public Member Functions

 Sphere ()
 Constructor. More...
 
 Sphere (const Sphere &_sphere)
 Copy constructor. More...
 
 Sphere (Sphere &&_sphere) noexcept
 Move constructor. More...
 
virtual ~Sphere ()
 Destructor. More...
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load. More...
 
Errors Load (ElementPtr _sdf)
 Load the sphere geometry based on a element pointer. More...
 
Sphereoperator= (const Sphere &_sphere)
 Assignment operator. More...
 
Sphereoperator= (Sphere &&_sphere)
 Move assignment operator. More...
 
double Radius () const
 Get the sphere's radius in meters. More...
 
void SetRadius (const double _radius)
 Set the sphere's radius in meters. More...
 
gz::math::Sphered & Shape ()
 Get a mutable Gazebo Math representation of this Sphere. More...
 
const gz::math::Sphered & Shape () const
 Get the Gazebo Math representation of this Sphere. More...
 

Detailed Description

Sphere represents a sphere shape, and is usually accessed through a Geometry.

Constructor & Destructor Documentation

◆ Sphere() [1/3]

sdf::v9::Sphere::Sphere ( )

Constructor.

◆ Sphere() [2/3]

sdf::v9::Sphere::Sphere ( const Sphere _sphere)

Copy constructor.

Parameters
[in]_sphereSphere to copy.

◆ Sphere() [3/3]

sdf::v9::Sphere::Sphere ( Sphere &&  _sphere)
noexcept

Move constructor.

Parameters
[in]_sphereSphere to move.

◆ ~Sphere()

virtual sdf::v9::Sphere::~Sphere ( )
virtual

Destructor.

Member Function Documentation

◆ Element()

sdf::ElementPtr sdf::v9::Sphere::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::v9::Sphere::Load ( ElementPtr  _sdf)

Load the sphere 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]

Sphere& sdf::v9::Sphere::operator= ( const Sphere _sphere)

Assignment operator.

Parameters
[in]_sphereThe sphere to set values from.
Returns
*this

◆ operator=() [2/2]

Sphere& sdf::v9::Sphere::operator= ( Sphere &&  _sphere)

Move assignment operator.

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

◆ Radius()

double sdf::v9::Sphere::Radius ( ) const

Get the sphere's radius in meters.

Returns
The radius of the sphere in meters.

◆ SetRadius()

void sdf::v9::Sphere::SetRadius ( const double  _radius)

Set the sphere's radius in meters.

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

◆ Shape() [1/2]

gz::math::Sphered& sdf::v9::Sphere::Shape ( )

Get a mutable Gazebo Math representation of this Sphere.

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

◆ Shape() [2/2]

const gz::math::Sphered& sdf::v9::Sphere::Shape ( ) const

Get the Gazebo Math representation of this Sphere.

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

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