Public Member Functions | List of all members
sdf::v12::Box Class Reference

Box represents a box shape, and is usually accessed through a Geometry. More...

#include <Box.hh>

Public Member Functions

 Box ()
 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 box geometry based on a element pointer. More...
 
void SetSize (const ignition::math::Vector3d &_size)
 Set the box size in meters. More...
 
ignition::math::Boxd & Shape ()
 Get a mutable Ignition Math representation of this Box. More...
 
const ignition::math::Boxd & Shape () const
 Get the Ignition Math representation of this Box. More...
 
ignition::math::Vector3d Size () const
 Get the box size in meters. More...
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this box. More...
 

Detailed Description

Box represents a box shape, and is usually accessed through a Geometry.

Constructor & Destructor Documentation

◆ Box()

sdf::v12::Box::Box ( )

Constructor.

Member Function Documentation

◆ Element()

sdf::ElementPtr sdf::v12::Box::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::Box::Load ( ElementPtr  _sdf)

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
[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.

◆ SetSize()

void sdf::v12::Box::SetSize ( const ignition::math::Vector3d &  _size)

Set the box size in meters.

Parameters
[in]_sizeSize of the box in meters.

◆ Shape() [1/2]

ignition::math::Boxd& sdf::v12::Box::Shape ( )

Get a mutable Ignition Math representation of this Box.

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

◆ Shape() [2/2]

const ignition::math::Boxd& sdf::v12::Box::Shape ( ) const

Get the Ignition Math representation of this Box.

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

◆ Size()

ignition::math::Vector3d sdf::v12::Box::Size ( ) const

Get the box size in meters.

Returns
Size of the box in meters.

◆ ToElement()

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

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.

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