Public Member Functions | List of all members
sdf::SDF_VERSION_NAMESPACE::Plane Class Reference

Plane represents a plane shape, and is usually accessed through a Geometry. More...

#include <Plane.hh>

Public Member Functions

 Plane ()
 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 plane geometry based on a element pointer. More...
 
gz::math::Vector3d Normal () const
 Get the plane normal vector. More...
 
void SetNormal (const gz::math::Vector3d &_normal)
 Set the plane normal vector. More...
 
void SetSize (const gz::math::Vector2d &_size)
 Set the plane size in meters. More...
 
gz::math::Planed & Shape ()
 Get a mutable Gazebo Math representation of this Plane. More...
 
const gz::math::Planed & Shape () const
 Get the Gazebo Math representation of this Plane. More...
 
gz::math::Vector2d Size () const
 Get the plane size in meters. More...
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this plane. More...
 
sdf::ElementPtr ToElement (sdf::Errors &_errors) const
 Create and return an SDF element filled with data from this plane. More...
 

Detailed Description

Plane represents a plane shape, and is usually accessed through a Geometry.

Constructor & Destructor Documentation

◆ Plane()

sdf::SDF_VERSION_NAMESPACE::Plane::Plane ( )

Constructor.

Member Function Documentation

◆ Element()

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Plane::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::SDF_VERSION_NAMESPACE::Plane::Load ( ElementPtr  _sdf)

Load the plane 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.

◆ Normal()

gz::math::Vector3d sdf::SDF_VERSION_NAMESPACE::Plane::Normal ( ) const

Get the plane normal vector.

When a Plane is used as a geometry for a Visual or Collision object, then the normal is specified in the Visual or Collision frame, respectively.

Returns
The plane normal vector.

◆ SetNormal()

void sdf::SDF_VERSION_NAMESPACE::Plane::SetNormal ( const gz::math::Vector3d &  _normal)

Set the plane normal vector.

The normal vector will be normalized. See gz::math::Vector3d Normal() for more information about the normal vector, such as the frame in which it is specified.

Parameters
[in]_normalThe plane normal vector.

◆ SetSize()

void sdf::SDF_VERSION_NAMESPACE::Plane::SetSize ( const gz::math::Vector2d &  _size)

Set the plane size in meters.

Parameters
[in]_sizeThe plane size in meters.

◆ Shape() [1/2]

gz::math::Planed& sdf::SDF_VERSION_NAMESPACE::Plane::Shape ( )

Get a mutable Gazebo Math representation of this Plane.

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

◆ Shape() [2/2]

const gz::math::Planed& sdf::SDF_VERSION_NAMESPACE::Plane::Shape ( ) const

Get the Gazebo Math representation of this Plane.

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

◆ Size()

gz::math::Vector2d sdf::SDF_VERSION_NAMESPACE::Plane::Size ( ) const

Get the plane size in meters.

Returns
The plane size in meters.

◆ ToElement() [1/2]

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Plane::ToElement ( ) const

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

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

Returns
SDF element pointer with updated plane values.

◆ ToElement() [2/2]

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Plane::ToElement ( sdf::Errors _errors) const

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

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

Parameters
[out]_errorsVector of errors.
Returns
SDF element pointer with updated plane values.

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