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

A description of a projector, which can be attached to a link. More...

#include <Projector.hh>

Public Member Functions

 Projector ()
 Default constructor. More...
 
void AddPlugin (const Plugin &_plugin)
 Add a plugin to this projector. More...
 
void ClearPlugins ()
 Remove all plugins. More...
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load. More...
 
double FarClip () const
 Get the far clip distance. More...
 
const std::string & FilePath () const
 The path to the file where this element was loaded from. More...
 
gz::math::Angle HorizontalFov () const
 Get the horizontal field of view in radians. More...
 
Errors Load (ElementPtr _sdf)
 Load the projector based on an element pointer. More...
 
std::string Name () const
 Get the name of the projector. More...
 
double NearClip () const
 Get the near clip distance. More...
 
sdf::PluginsPlugins ()
 Get a mutable vector of plugins attached to this projector. More...
 
const sdf::PluginsPlugins () const
 Get the plugins attached to this projector. More...
 
const std::string & PoseRelativeTo () const
 Get the name of the coordinate frame relative to which this projector's pose is expressed. More...
 
const gz::math::Pose3d & RawPose () const
 Get the pose of the projector. More...
 
sdf::SemanticPose SemanticPose () const
 Get SemanticPose object of this object to aid in resolving poses. More...
 
void SetFarClip (double _far)
 Set the far clip distance. More...
 
void SetFilePath (const std::string &_filePath)
 Set the path to the file where this element was loaded from. More...
 
void SetHorizontalFov (const gz::math::Angle &_hfov)
 Set the horizontal field of view in radians. More...
 
void SetName (const std::string &_name)
 Set the name of the projector. More...
 
void SetNearClip (double _near)
 Set the near clip distance. More...
 
void SetPoseRelativeTo (const std::string &_frame)
 Set the name of the coordinate frame relative to which this projector's pose is expressed. More...
 
void SetRawPose (const gz::math::Pose3d &_pose)
 Set the pose of the projector object. More...
 
void SetTexture (const std::string &_map)
 Set the texture filename. More...
 
void SetVisibilityFlags (uint32_t _flags)
 Set the visibility flags of a projector. More...
 
std::string Texture () const
 Get the texture filename. More...
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this projector. More...
 
uint32_t VisibilityFlags () const
 Get the visibility flags of a projector. More...
 

Detailed Description

A description of a projector, which can be attached to a link.

A projector can be used to project texture onto other visuals

Constructor & Destructor Documentation

◆ Projector()

sdf::SDF_VERSION_NAMESPACE::Projector::Projector ( )

Default constructor.

Member Function Documentation

◆ AddPlugin()

void sdf::SDF_VERSION_NAMESPACE::Projector::AddPlugin ( const Plugin _plugin)

Add a plugin to this projector.

Parameters
[in]_pluginPlugin to add.

◆ ClearPlugins()

void sdf::SDF_VERSION_NAMESPACE::Projector::ClearPlugins ( )

Remove all plugins.

◆ Element()

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

◆ FarClip()

double sdf::SDF_VERSION_NAMESPACE::Projector::FarClip ( ) const

Get the far clip distance.

Returns
The far clip distance.

◆ FilePath()

const std::string & sdf::SDF_VERSION_NAMESPACE::Projector::FilePath ( ) const

The path to the file where this element was loaded from.

Returns
Full path to the file on disk.

◆ HorizontalFov()

gz::math::Angle sdf::SDF_VERSION_NAMESPACE::Projector::HorizontalFov ( ) const

Get the horizontal field of view in radians.

Returns
The horizontal field of view in radians.

◆ Load()

Errors sdf::SDF_VERSION_NAMESPACE::Projector::Load ( ElementPtr  _sdf)

Load the projector based on an 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.

◆ Name()

std::string sdf::SDF_VERSION_NAMESPACE::Projector::Name ( ) const

Get the name of the projector.

The name of the projector should be unique within the scope of a Link.

Returns
Name of the projector.

◆ NearClip()

double sdf::SDF_VERSION_NAMESPACE::Projector::NearClip ( ) const

Get the near clip distance.

Returns
The near clip distance.

◆ Plugins() [1/2]

sdf::Plugins & sdf::SDF_VERSION_NAMESPACE::Projector::Plugins ( )

Get a mutable vector of plugins attached to this projector.

Returns
A vector of Plugin, which will be empty if there are no plugins.

◆ Plugins() [2/2]

const sdf::Plugins & sdf::SDF_VERSION_NAMESPACE::Projector::Plugins ( ) const

Get the plugins attached to this projector.

Returns
A vector of Plugin, which will be empty if there are no plugins.

◆ PoseRelativeTo()

const std::string & sdf::SDF_VERSION_NAMESPACE::Projector::PoseRelativeTo ( ) const

Get the name of the coordinate frame relative to which this projector's pose is expressed.

An empty value indicates that the frame is relative to the parent link.

Returns
The name of the pose relative-to frame.

◆ RawPose()

const gz::math::Pose3d & sdf::SDF_VERSION_NAMESPACE::Projector::RawPose ( ) const

Get the pose of the projector.

This is the pose of the projector as specified in SDF (<projector><pose> ... </pose></projector>).

Returns
The pose of the projector.

◆ SemanticPose()

sdf::SemanticPose sdf::SDF_VERSION_NAMESPACE::Projector::SemanticPose ( ) const

Get SemanticPose object of this object to aid in resolving poses.

Returns
SemanticPose object for this projector.

◆ SetFarClip()

void sdf::SDF_VERSION_NAMESPACE::Projector::SetFarClip ( double  _far)

Set the far clip distance.

Parameters
[in]_farThe far clip distance.

◆ SetFilePath()

void sdf::SDF_VERSION_NAMESPACE::Projector::SetFilePath ( const std::string &  _filePath)

Set the path to the file where this element was loaded from.

\paramp[in] _filePath Full path to the file on disk.

◆ SetHorizontalFov()

void sdf::SDF_VERSION_NAMESPACE::Projector::SetHorizontalFov ( const gz::math::Angle &  _hfov)

Set the horizontal field of view in radians.

Parameters
[in]_hfovThe horizontal field of view in radians.

◆ SetName()

void sdf::SDF_VERSION_NAMESPACE::Projector::SetName ( const std::string &  _name)

Set the name of the projector.

The name of the projector should be unique within the scope of a Link.

Parameters
[in]_nameName of the projector.

◆ SetNearClip()

void sdf::SDF_VERSION_NAMESPACE::Projector::SetNearClip ( double  _near)

Set the near clip distance.

Parameters
[in]_nearThe near clip distance.

◆ SetPoseRelativeTo()

void sdf::SDF_VERSION_NAMESPACE::Projector::SetPoseRelativeTo ( const std::string &  _frame)

Set the name of the coordinate frame relative to which this projector's pose is expressed.

An empty value indicates that the frame is relative to the parent link.

Parameters
[in]_frameThe name of the pose relative-to frame.

◆ SetRawPose()

void sdf::SDF_VERSION_NAMESPACE::Projector::SetRawPose ( const gz::math::Pose3d &  _pose)

Set the pose of the projector object.

See also
const gz::math::Pose3d &RawPose() const
Parameters
[in]_poseThe pose of the projector.

◆ SetTexture()

void sdf::SDF_VERSION_NAMESPACE::Projector::SetTexture ( const std::string &  _map)

Set the texture filename.

Parameters
[in]_mapFilename of the texture

◆ SetVisibilityFlags()

void sdf::SDF_VERSION_NAMESPACE::Projector::SetVisibilityFlags ( uint32_t  _flags)

Set the visibility flags of a projector.

Parameters
[in]_flagsvisibility flags

◆ Texture()

std::string sdf::SDF_VERSION_NAMESPACE::Projector::Texture ( ) const

Get the texture filename.

This will be an empty string if a texture has not been set.

Returns
Filename of the texture, or empty string if a texture has not been specified.

◆ ToElement()

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

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

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

Returns
SDF element pointer with updated projector values.

◆ VisibilityFlags()

uint32_t sdf::SDF_VERSION_NAMESPACE::Projector::VisibilityFlags ( ) const

Get the visibility flags of a projector.

Returns
visibility flags

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