Box represents a box shape, and is usually accessed through a Geometry.
More...
#include <Box.hh>
|
| Box () |
| Constructor.
|
|
std::optional< gz::math::Inertiald > | CalculateInertial (double _density) |
| Calculate and return the Inertial values for the Box.
|
|
sdf::ElementPtr | Element () const |
| Get a pointer to the SDF element that was used during load.
|
|
Errors | Load (ElementPtr _sdf) |
| Load the box geometry based on a element pointer.
|
|
void | SetSize (const gz::math::Vector3d &_size) |
| Set the box size in meters.
|
|
gz::math::Boxd & | Shape () |
| Get a mutable Gazebo Math representation of this Box.
|
|
const gz::math::Boxd & | Shape () const |
| Get the Gazebo Math representation of this Box.
|
|
gz::math::Vector3d | Size () const |
| Get the box size in meters.
|
|
sdf::ElementPtr | ToElement () const |
| Create and return an SDF element filled with data from this box.
|
|
sdf::ElementPtr | ToElement (sdf::Errors &_errors) const |
| Create and return an SDF element filled with data from this box.
|
|
Box represents a box shape, and is usually accessed through a Geometry.
◆ Box()
sdf::SDF_VERSION_NAMESPACE::Box::Box |
( |
| ) |
|
◆ CalculateInertial()
std::optional< gz::math::Inertiald > sdf::SDF_VERSION_NAMESPACE::Box::CalculateInertial |
( |
double |
_density | ) |
|
Calculate and return the Inertial values for the Box.
In order to calculate the inertial properties, the function mutates the object by updating its material properties.
- Parameters
-
[in] | _density | Density of the box 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 box 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.
◆ SetSize()
void sdf::SDF_VERSION_NAMESPACE::Box::SetSize |
( |
const gz::math::Vector3d & |
_size | ) |
|
Set the box size in meters.
- Parameters
-
[in] | _size | Size of the box in meters. |
◆ Shape() [1/2]
gz::math::Boxd & sdf::SDF_VERSION_NAMESPACE::Box::Shape |
( |
| ) |
|
Get a mutable Gazebo Math representation of this Box.
- Returns
- A reference to a gz::math::Boxd object.
◆ Shape() [2/2]
const gz::math::Boxd & sdf::SDF_VERSION_NAMESPACE::Box::Shape |
( |
| ) |
const |
Get the Gazebo Math representation of this Box.
- Returns
- A const reference to a gz::math::Boxd object.
◆ Size()
gz::math::Vector3d sdf::SDF_VERSION_NAMESPACE::Box::Size |
( |
| ) |
const |
Get the box size in meters.
- Returns
- Size of the box in meters.
◆ ToElement() [1/2]
Create and return an SDF element filled with data from this box.
Note that parameter passing functionality is not captured with this function.
- Returns
- SDF element pointer with updated box values.
◆ ToElement() [2/2]
Create and return an SDF element filled with data from this box.
Note that parameter passing functionality is not captured with this function.
- Parameters
-
[out] | _errors | Vector of errors. |
- Returns
- SDF element pointer with updated box values.
The documentation for this class was generated from the following file: