Sphere represents a sphere shape, and is usually accessed through a Geometry.
More...
#include <Sphere.hh>
Sphere represents a sphere shape, and is usually accessed through a Geometry.
◆ Sphere()
sdf::SDF_VERSION_NAMESPACE::Sphere::Sphere |
( |
| ) |
|
◆ CalculateInertial()
std::optional< gz::math::Inertiald > sdf::SDF_VERSION_NAMESPACE::Sphere::CalculateInertial |
( |
double |
_density | ) |
|
Calculate and return the Inertial values for the Sphere.
In order to calculate the inertial properties, the function mutates the object by updating its material properties.
- Parameters
-
[in] | _density | Density of the sphere in kg/m^3 |
- Returns
- A std::optional with gz::math::Inertiald object or std::nullopt
◆ Element()
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()
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
-
- 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::Sphere::Radius |
( |
| ) |
const |
Get the sphere's radius in meters.
- Returns
- The radius of the sphere in meters.
◆ SetRadius()
void sdf::SDF_VERSION_NAMESPACE::Sphere::SetRadius |
( |
const double |
_radius | ) |
|
Set the sphere's radius in meters.
- Parameters
-
[in] | _radius | The radius of the sphere in meters. |
◆ Shape() [1/2]
gz::math::Sphered & sdf::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::Sphere::Shape |
( |
| ) |
const |
Get the Gazebo Math representation of this Sphere.
- Returns
- A const reference to a gz::math::Sphered object.
◆ ToElement() [1/2]
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.
◆ ToElement() [2/2]
Create and return an SDF element filled with data from this sphere.
Note that parameter passing functionality is not captured with this function.
- Parameters
-
[out] | _errors | Vector of errors. |
- Returns
- SDF element pointer with updated sphere values.
The documentation for this class was generated from the following file: