Public Member Functions | List of all members
sdf::v12::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...
 
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...
 
double Radius () const
 Get the sphere's radius in meters. More...
 
void SetRadius (const double _radius)
 Set the sphere's radius in meters. More...
 
ignition::math::Sphered & Shape ()
 Get a mutable Ignition Math representation of this Sphere. More...
 
const ignition::math::Sphered & Shape () const
 Get the Ignition Math representation of this Sphere. More...
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this sphere. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Sphere()

sdf::v12::Sphere::Sphere ( )

Constructor.

Member Function Documentation

◆ Element()

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

◆ Radius()

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

Get the sphere's radius in meters.

Returns
The radius of the sphere in meters.

◆ SetRadius()

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

Set the sphere's radius in meters.

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

◆ Shape() [1/2]

ignition::math::Sphered& sdf::v12::Sphere::Shape ( )

Get a mutable Ignition Math representation of this Sphere.

Returns
A reference to an ignition::math::Sphered object.

◆ Shape() [2/2]

const ignition::math::Sphered& sdf::v12::Sphere::Shape ( ) const

Get the Ignition Math representation of this Sphere.

Returns
A const reference to an ignition::math::Sphered object.

◆ ToElement()

sdf::ElementPtr sdf::v12::Sphere::ToElement ( ) const

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

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

Returns
SDF element pointer with updated sphere values.

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