Loading...
Searching...
No Matches
Public Member Functions | List of all members
sdf::SDF_VERSION_NAMESPACE::Visual Class Reference

#include <Visual.hh>

Public Member Functions

 Visual ()
 Default constructor.
 
void AddPlugin (const Plugin &_plugin)
 Add a plugin to this object.
 
bool CastShadows () const
 Get whether the visual casts shadows.
 
void ClearPlugins ()
 Remove all plugins.
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load.
 
const GeometryGeom () const
 Get a pointer to the visual's geometry.
 
bool HasLaserRetro () const
 Get whether the lidar reflective intensity was set was set.
 
double LaserRetro () const
 Get the flidar reflective intensity.
 
Errors Load (ElementPtr _sdf)
 Load the visual based on a element pointer.
 
Errors Load (ElementPtr _sdf, const ParserConfig &_config)
 Load the visual based on a element pointer.
 
const sdf::MaterialMaterial () const
 Get a pointer to the visual's material properties.
 
std::string Name () const
 Get the name of the visual.
 
sdf::PluginsPlugins ()
 Get a mutable vector of plugins attached to this object.
 
const sdf::PluginsPlugins () const
 Get the plugins attached to this object.
 
const std::string & PoseRelativeTo () const
 Get the name of the coordinate frame relative to which this object's pose is expressed.
 
const gz::math::Pose3d & RawPose () const
 Get the pose of the visual object.
 
sdf::SemanticPose SemanticPose () const
 Get SemanticPose object of this object to aid in resolving poses.
 
void SetCastShadows (bool _castShadows)
 Set whether the visual casts shadows.
 
void SetGeom (const Geometry &_geom)
 Set the visual's geometry.
 
void SetHasLaserRetro (bool _laserRetro)
 Set whether the lidar reflective intensity has been specified.
 
void SetLaserRetro (double _laserRetro)
 Set the lidar reflective intensity.
 
void SetMaterial (const sdf::Material &_material)
 Set the visual's material.
 
void SetName (const std::string &_name)
 Set the name of the visual.
 
void SetPoseRelativeTo (const std::string &_frame)
 Set the name of the coordinate frame relative to which this object's pose is expressed.
 
void SetRawPose (const gz::math::Pose3d &_pose)
 Set the pose of the visual object.
 
void SetTransparency (float _transparency)
 Set the transparency value for the visual.
 
void SetVisibilityFlags (uint32_t _flags)
 Set the visibility flags of a visual.
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this visual.
 
float Transparency () const
 Get the transparency value of the visual.
 
uint32_t VisibilityFlags () const
 Get the visibility flags of a visual.
 

Constructor & Destructor Documentation

◆ Visual()

sdf::SDF_VERSION_NAMESPACE::Visual::Visual ( )

Default constructor.

Member Function Documentation

◆ AddPlugin()

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

Add a plugin to this object.

Parameters
[in]_pluginPlugin to add.

◆ CastShadows()

bool sdf::SDF_VERSION_NAMESPACE::Visual::CastShadows ( ) const

Get whether the visual casts shadows.

Returns
True if the visual casts shadows, false otherwise

◆ ClearPlugins()

void sdf::SDF_VERSION_NAMESPACE::Visual::ClearPlugins ( )

Remove all plugins.

◆ Element()

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

◆ Geom()

const Geometry * sdf::SDF_VERSION_NAMESPACE::Visual::Geom ( ) const

Get a pointer to the visual's geometry.

Returns
The visual's geometry.

◆ HasLaserRetro()

bool sdf::SDF_VERSION_NAMESPACE::Visual::HasLaserRetro ( ) const

Get whether the lidar reflective intensity was set was set.

Returns
True if the lidar reflective intensity was set was set.

◆ LaserRetro()

double sdf::SDF_VERSION_NAMESPACE::Visual::LaserRetro ( ) const

Get the flidar reflective intensity.

Returns
The lidar reflective intensity.

◆ Load() [1/2]

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

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

◆ Load() [2/2]

Errors sdf::SDF_VERSION_NAMESPACE::Visual::Load ( ElementPtr  _sdf,
const ParserConfig _config 
)

Load the visual 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
[in]_configParser configuration
Returns
Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.

◆ Material()

const sdf::Material * sdf::SDF_VERSION_NAMESPACE::Visual::Material ( ) const

Get a pointer to the visual's material properties.

This can be a nullptr if material properties have not been set.

Returns
Pointer to the visual's material properties. Nullptr indicates that material properties have not been set.

◆ Name()

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

Get the name of the visual.

The name of the visual must be unique within the scope of a Link.

Returns
Name of the visual.

◆ Plugins() [1/2]

sdf::Plugins & sdf::SDF_VERSION_NAMESPACE::Visual::Plugins ( )

Get a mutable vector of plugins attached to this object.

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

◆ Plugins() [2/2]

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

Get the plugins attached to this object.

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

◆ PoseRelativeTo()

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

Get the name of the coordinate frame relative to which this object'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::Visual::RawPose ( ) const

Get the pose of the visual object.

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

Returns
The pose of the visual object.

◆ SemanticPose()

sdf::SemanticPose sdf::SDF_VERSION_NAMESPACE::Visual::SemanticPose ( ) const

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

Returns
SemanticPose object for this link.

◆ SetCastShadows()

void sdf::SDF_VERSION_NAMESPACE::Visual::SetCastShadows ( bool  _castShadows)

Set whether the visual casts shadows.

Parameters
[in]_castShadowsTrue to cast shadows, false to not cast shadows

◆ SetGeom()

void sdf::SDF_VERSION_NAMESPACE::Visual::SetGeom ( const Geometry _geom)

Set the visual's geometry.

Parameters
[in]_geomThe geometry of the visual object

◆ SetHasLaserRetro()

void sdf::SDF_VERSION_NAMESPACE::Visual::SetHasLaserRetro ( bool  _laserRetro)

Set whether the lidar reflective intensity has been specified.

Parameters
[in]_laserRetroTrue if the lidar reflective intensity has been set in the sdf.

◆ SetLaserRetro()

void sdf::SDF_VERSION_NAMESPACE::Visual::SetLaserRetro ( double  _laserRetro)

Set the lidar reflective intensity.

Parameters
[in]_laserRetroThe lidar reflective intensity.

◆ SetMaterial()

void sdf::SDF_VERSION_NAMESPACE::Visual::SetMaterial ( const sdf::Material _material)

Set the visual's material.

Parameters
[in]_materialThe material of the visual object

◆ SetName()

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

Set the name of the visual.

The name of the visual must be unique within the scope of a Link.

Parameters
[in]_nameName of the visual.

◆ SetPoseRelativeTo()

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

Set the name of the coordinate frame relative to which this object'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::Visual::SetRawPose ( const gz::math::Pose3d &  _pose)

Set the pose of the visual object.

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

◆ SetTransparency()

void sdf::SDF_VERSION_NAMESPACE::Visual::SetTransparency ( float  _transparency)

Set the transparency value for the visual.

Parameters
[in]_transparencyTransparency value between 0 and 1

◆ SetVisibilityFlags()

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

Set the visibility flags of a visual.

Parameters
[in]_flagsvisibility flags

◆ ToElement()

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

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

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

Returns
SDF element pointer with updated visual values.

◆ Transparency()

float sdf::SDF_VERSION_NAMESPACE::Visual::Transparency ( ) const

Get the transparency value of the visual.

Returns
Transparency value

◆ VisibilityFlags()

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

Get the visibility flags of a visual.

Returns
visibility flags

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