LogicalCameraVisual Class Reference

Logical camera visualization. More...

#include <LogicalCameraVisual.hh>

Inherits Visual.

Public Types

enum  VisualType {
  VT_ENTITY, VT_MODEL, VT_LINK, VT_VISUAL,
  VT_COLLISION, VT_SENSOR, VT_GUI, VT_PHYSICS
}
 Type of visual. More...
 

Public Member Functions

 LogicalCameraVisual (const std::string &_name, VisualPtr _vis)
 Constructor. More...
 
virtual ~LogicalCameraVisual ()
 Destructor. More...
 
void AddPendingChild (std::pair< VisualType, const google::protobuf::Message * > _pair)
 Push a message for a child of this visual which hasn't been loaded yet. More...
 
void AttachLineVertex (DynamicLines *_line, unsigned int _index)
 Attach a vertex of a line to the position of the visual. More...
 
Ogre::MovableObject * AttachMesh (const std::string &_meshName, const std::string &_subMesh="", bool _centerSubmesh=false, const std::string &_objName="")
 Attach a mesh to this visual by name. More...
 
void AttachObject (Ogre::MovableObject *_obj)
 Attach a renerable object to the visual. More...
 
void AttachVisual (VisualPtr _vis)
 Attach a visual to this visual. More...
 
ignition::math::Box BoundingBox () const
 Get the bounding box for the visual. More...
 
void ClearParent ()
 Clear parents. More...
 
VisualPtr Clone (const std::string &_name, VisualPtr _newParent)
 Clone the visual with a new name. More...
 
DynamicLinesCreateDynamicLine (RenderOpType _type=RENDERING_LINE_STRIP)
 Add a line to the visual. More...
 
void DeleteDynamicLine (DynamicLines *_line)
 Delete a dynamic line. More...
 
ignition::math::Vector3d DerivedScale () const
 Get the scale of the visual as inherited from all parents. More...
 
float DerivedTransparency () const
 Get the transparency of the visual as inherited from all parents. More...
 
void DetachObjects ()
 Detach all objects. More...
 
void DetachVisual (VisualPtr _vis)
 Detach a visual. More...
 
void DetachVisual (const std::string &_name)
 Detach a visual. More...
 
void DisableTrackVisual ()
 Disable tracking of a visual. More...
 
void EnableTrackVisual (VisualPtr _vis)
 Set one visual to track/follow another. More...
 
void FillMaterialMsg (ignition::msgs::Material &_msg) const
 Fill an ignition::msgs::Material message based on this visual's material properties. More...
 
common::Color GetAmbient () const
 Get the ambient color of the visual. More...
 
unsigned int GetAttachedObjectCount () const
 Return the number of attached movable objects. More...
 
math::Box GetBoundingBox () const GAZEBO_DEPRECATED(8.0)
 Get the bounding box for the visual. More...
 
bool GetCastShadows () const
 Get whether the visual casts shadows. More...
 
VisualPtr GetChild (unsigned int _index)
 Get an attached visual based on an index. More...
 
unsigned int GetChildCount ()
 Get the number of attached visuals. More...
 
unsigned int GetDepth () const
 Get the depth of this visual, where 0 is the depth of the world visual. More...
 
common::Color GetDiffuse () const
 Get the diffuse color of the visual. More...
 
common::Color GetEmissive () const
 Get the emissive color of the visual. More...
 
ignition::math::Vector3d GetGeometrySize () const
 Get the geometry size. More...
 
std::string GetGeometryType () const
 Get the geometry type. More...
 
bool GetHighlighted () const
 Get whether or not the visual is visually highlighted. More...
 
uint32_t GetId () const
 Get the id associated with this visual. More...
 
bool GetLighting () const
 Get whether or not lighting is enabled. More...
 
std::string GetMaterialName () const
 Get the name of the material. More...
 
std::string GetMeshName () const
 The name of the mesh set in the visual's SDF. More...
 
std::string GetName () const GAZEBO_DEPRECATED(8.0)
 Get the name of the visual. More...
 
std::string GetNormalMap () const
 Get the normal map. More...
 
VisualPtr GetNthAncestor (unsigned int _n)
 Get the nth ancestor counting from the world visual. More...
 
VisualPtr GetParent () const
 Get the parent visual, if one exists. More...
 
math::Pose GetPose () const GAZEBO_DEPRECATED(8.0)
 Get the pose of the visual. More...
 
math::Vector3 GetPosition () const GAZEBO_DEPRECATED(8.0)
 Get the position of the visual. More...
 
VisualPtr GetRootVisual ()
 Get the root visual. More...
 
math::Quaternion GetRotation () const GAZEBO_DEPRECATED(8.0)
 Get the rotation of the visual. More...
 
math::Vector3 GetScale () GAZEBO_DEPRECATED(8.0)
 Get the scale. More...
 
ScenePtr GetScene () const
 Get current. More...
 
Ogre::SceneNode * GetSceneNode () const
 Return the scene Node of this visual entity. More...
 
sdf::ElementPtr GetSDF () const
 Get the visual SDF. More...
 
std::string GetShaderType () const
 Get the shader type. More...
 
common::Color GetSpecular () const
 Get the specular color of the visual. More...
 
std::string GetSubMeshName () const
 Get the name of the sub mesh set in the visual's SDF. More...
 
float GetTransparency ()
 Get the transparency. More...
 
Visual::VisualType GetType () const
 Get type of visual. More...
 
uint32_t GetVisibilityFlags ()
 Get visibility flags for this visual and all children. More...
 
bool GetVisible () const
 Get whether the visual is visible. More...
 
math::Pose GetWorldPose () const GAZEBO_DEPRECATED(8.0)
 Get the global pose of the node. More...
 
bool HasAttachedObject (const std::string &_name)
 Returns true if an object with _name is attached. More...
 
bool InheritTransparency () const
 Get whether this visual inherits transparency from parent. More...
 
void Init ()
 Helper for the contructor. More...
 
ignition::math::Pose3d InitialRelativePose () const
 Get the initial relative pose of the visual. More...
 
void InsertMesh (const std::string &_meshName, const std::string &_subMesh="", bool _centerSubmesh=false)
 Insert a mesh into Ogre. More...
 
bool IsAncestorOf (const rendering::VisualPtr _visual) const
 Check if this visual is an ancestor of another visual. More...
 
bool IsDescendantOf (const rendering::VisualPtr _visual) const
 Check if this visual is a descendant of another visual. More...
 
bool IsPlane () const
 Return true if the visual is a plane. More...
 
bool IsStatic () const
 Return true if the visual is a static geometry. More...
 
void Load (const msgs::LogicalCameraSensor &_msg)
 Load the Visual. More...
 
void Load (sdf::ElementPtr _sdf)
 Load the visual with a set of parameters. More...
 
virtual void Load ()
 Load the visual with default parameters. More...
 
void LoadFromMsg (ConstVisualPtr &_msg)
 Load from a message. More...
 
void LoadPlugin (const std::string &_filename, const std::string &_name, sdf::ElementPtr _sdf)
 Load a plugin. More...
 
void MakeStatic ()
 Make the visual objects static renderables. More...
 
void MoveToPosition (const math::Pose &_pose, double _time) GAZEBO_DEPRECATED(8.0)
 Move to a pose and over a given time. More...
 
void MoveToPosition (const ignition::math::Pose3d &_pose, const double _time)
 Move to a pose and over a given time. More...
 
void MoveToPositions (const std::vector< math::Pose > &_pts, double _time, std::function< void()> _onComplete=nullptr) GAZEBO_DEPRECATED(8.0)
 Move to a series of pose and over a given time. More...
 
void MoveToPositions (const std::vector< ignition::math::Pose3d > &_pts, const double _time, std::function< void()> _onComplete=nullptr)
 Move to a series of pose and over a given time. More...
 
std::string Name () const
 Get the name of the visual. More...
 
ignition::math::Pose3d Pose () const
 Get the pose of the visual. More...
 
ignition::math::Vector3d Position () const
 Get the position of the visual. More...
 
void RemovePlugin (const std::string &_name)
 Remove a running plugin. More...
 
ignition::math::Quaterniond Rotation () const
 Get the rotation of the visual. More...
 
ignition::math::Vector3d Scale () const
 Get the scale. More...
 
void SetAmbient (const common::Color &_color, const bool _cascade=true)
 Set the ambient color of the visual. More...
 
void SetCastShadows (bool _shadows)
 Set whether the visual should cast shadows. More...
 
void SetDiffuse (const common::Color &_color, const bool _cascade=true)
 Set the diffuse color of the visual. More...
 
virtual void SetEmissive (const common::Color &_color, const bool _cascade=true)
 Set the emissive value. More...
 
virtual void SetHighlighted (bool _highlighted)
 Set the visual to be visually highlighted. More...
 
void SetId (uint32_t _id)
 Set the id associated with this visual. More...
 
void SetInheritTransparency (const bool _inherit)
 Set whether to inherit transparency from parent. More...
 
void SetLayer (const int32_t _layer)
 Set the layer this visual belongs to. More...
 
void SetLighting (bool _lighting)
 Set whether or not to enable or disable lighting. More...
 
void SetMaterial (const std::string &_materialName, bool _unique=true, const bool _cascade=true)
 Set the material. More...
 
void SetName (const std::string &_name)
 Set the name of the visual. More...
 
void SetNormalMap (const std::string &_nmap)
 Set the normal map. More...
 
void SetPose (const math::Pose &_pose) GAZEBO_DEPRECATED(8.0)
 Set the pose of the visual. More...
 
void SetPose (const ignition::math::Pose3d &_pose)
 Set the pose of the visual. More...
 
void SetPosition (const math::Vector3 &_pos) GAZEBO_DEPRECATED(8.0)
 Set the position of the visual. More...
 
void SetPosition (const ignition::math::Vector3d &_pos)
 Set the position of the visual. More...
 
void SetRibbonTrail (bool _value, const common::Color &_initialColor, const common::Color &_changeColor)
 True on or off a ribbon trail. More...
 
void SetRotation (const math::Quaternion &_rot) GAZEBO_DEPRECATED(8.0)
 Set the rotation of the visual. More...
 
void SetRotation (const ignition::math::Quaterniond &_rot)
 Set the rotation of the visual. More...
 
void SetScale (const math::Vector3 &_scale) GAZEBO_DEPRECATED(8.0)
 Set the scale. More...
 
void SetScale (const ignition::math::Vector3d &_scale)
 Set the scale. More...
 
void SetScene (ScenePtr _scene)
 Set current scene. More...
 
void SetShaderType (const std::string &_type)
 Set the shader type for the visual's material. More...
 
void SetSkeletonPose (const msgs::PoseAnimation &_pose)
 Set animation skeleton pose. More...
 
void SetSpecular (const common::Color &_color, const bool _cascade=true)
 Set the specular color of the visual. More...
 
void SetTransparency (float _trans)
 Set the transparency. More...
 
void SetType (const Visual::VisualType _type)
 Set type of visual. More...
 
void SetTypeMsg (const google::protobuf::Message *_msg)
 Set a message specific for this visual type. More...
 
void SetVisibilityFlags (uint32_t _flags)
 Set visibility flags for this visual and all children. More...
 
virtual void SetVisible (bool _visible, bool _cascade=true)
 Set whether the visual is visible. More...
 
void SetWireframe (bool _show)
 Enable or disable wireframe for this visual. More...
 
void SetWorldPose (const math::Pose &_pose) GAZEBO_DEPRECATED(8.0)
 Set the world pose of the visual. More...
 
void SetWorldPose (const ignition::math::Pose3d &_pose)
 Set the world pose of the visual. More...
 
void SetWorldPosition (const math::Vector3 &_pos) GAZEBO_DEPRECATED(8.0)
 Set the world linear position of the visual. More...
 
void SetWorldPosition (const ignition::math::Vector3d &_pos)
 Set the world linear position of the visual. More...
 
void SetWorldRotation (const math::Quaternion &_rot) GAZEBO_DEPRECATED(8.0)
 Set the world orientation of the visual. More...
 
void SetWorldRotation (const ignition::math::Quaterniond &_rot)
 Set the world orientation of the visual. More...
 
void ShowBoundingBox ()
 Display the bounding box visual. More...
 
void ShowCollision (bool _show)
 Display the collision visuals. More...
 
void ShowCOM (bool _show)
 Display Center of Mass visuals. More...
 
void ShowInertia (bool _show)
 Display inertia visuals. More...
 
void ShowJoints (bool _show)
 Display joint visuals. More...
 
void ShowLinkFrame (bool _show)
 Display link frame visuals. More...
 
void ShowSkeleton (bool _show)
 Display the skeleton visuals. More...
 
void ToggleLayer (const int32_t _layer)
 Toggle layer visibility. More...
 
void ToggleVisible ()
 Toggle whether this visual is visible. More...
 
void UpdateFromMsg (ConstVisualPtr &_msg)
 Update a visual based on a message. More...
 
bool UseRTShader () const
 Get whether this visual uses RT shader system. More...
 
bool Wireframe () const
 Get whether wireframe is enabled for this visual. More...
 
ignition::math::Pose3d WorldPose () const
 Get the global pose of the visual. More...
 

Static Public Member Functions

static Visual::VisualType ConvertVisualType (const msgs::Visual::Type &_type)
 Convert from msgs::Visual::Type to VisualType. More...
 
static msgs::Visual::Type ConvertVisualType (const Visual::VisualType &_type)
 Convert from msgs::Visual::Type to VisualType. More...
 
static void InsertMesh (const common::Mesh *_mesh, const std::string &_subMesh="", bool _centerSubmesh=false)
 Insert a mesh into Ogre. More...
 

Protected Member Functions

virtual void Fini ()
 Helper for the destructor. More...
 
void ProcessMaterialMsg (const ignition::msgs::Material &_msg)
 Process a material message. More...
 

Protected Attributes

VisualPrivate * dataPtr
 

Detailed Description

Logical camera visualization.

This class is used to visualize a logical camera generated from a LogicalCameraSensor. The sensor's frustum is drawn in the 3D environment.

Member Enumeration Documentation

enum VisualType
inherited

Type of visual.

Todo:
Move this to RenderingTypes.hh
Enumerator
VT_ENTITY 

Entity visual.

VT_MODEL 

Model visual.

VT_LINK 

Link visual.

VT_VISUAL 

Visual visual.

VT_COLLISION 

Collision visual.

VT_SENSOR 

Sensor visual.

VT_GUI 

GUI visual.

VT_PHYSICS 

Physics data visual.

Constructor & Destructor Documentation

LogicalCameraVisual ( const std::string &  _name,
VisualPtr  _vis 
)

Constructor.

Parameters
[in]_nameName of the Visual
[in]_visPointer to the parent Visual
virtual ~LogicalCameraVisual ( )
virtual

Destructor.

Member Function Documentation

void AddPendingChild ( std::pair< VisualType, const google::protobuf::Message * >  _pair)
inherited

Push a message for a child of this visual which hasn't been loaded yet.

Parameters
[in]_pairPair with the child visual type and the message for the child.
void AttachLineVertex ( DynamicLines _line,
unsigned int  _index 
)
inherited

Attach a vertex of a line to the position of the visual.

Parameters
[in]_lineLine to attach to this visual.
[in]_indexIndex of the line vertex to attach.
Ogre::MovableObject* AttachMesh ( const std::string &  _meshName,
const std::string &  _subMesh = "",
bool  _centerSubmesh = false,
const std::string &  _objName = "" 
)
inherited

Attach a mesh to this visual by name.

Parameters
[in]_meshNameName of the mesh.
[in]_subMeshName of the submesh. Empty string to use all submeshes.
[in]_centerSubmeshTrue to center a submesh.
[in]_objNameName of the attached Object to put the mesh onto.
void AttachObject ( Ogre::MovableObject *  _obj)
inherited

Attach a renerable object to the visual.

Parameters
[in]_objA movable object to attach to the visual.
void AttachVisual ( VisualPtr  _vis)
inherited

Attach a visual to this visual.

Parameters
[in]_visVisual to attach.
ignition::math::Box BoundingBox ( ) const
inherited

Get the bounding box for the visual.

Returns
The bounding box in world coordinates.
void ClearParent ( )
inherited

Clear parents.

VisualPtr Clone ( const std::string &  _name,
VisualPtr  _newParent 
)
inherited

Clone the visual with a new name.

Parameters
[in]_nameName of the cloned Visual.
[in]_newParentParent of the cloned Visual.
Returns
The visual.
static Visual::VisualType ConvertVisualType ( const msgs::Visual::Type &  _type)
staticinherited

Convert from msgs::Visual::Type to VisualType.

Parameters
[in]_typeA msgs::Visual::Type enum.
Returns
VisualType enum.
static msgs::Visual::Type ConvertVisualType ( const Visual::VisualType _type)
staticinherited

Convert from msgs::Visual::Type to VisualType.

Parameters
[in]_typeVisualType enum.
Returns
A msgs::Visual::Type enum.
DynamicLines* CreateDynamicLine ( RenderOpType  _type = RENDERING_LINE_STRIP)
inherited

Add a line to the visual.

Parameters
[in]_typeThe type of line to make.
Returns
A pointer to the new dynamic line.
void DeleteDynamicLine ( DynamicLines _line)
inherited

Delete a dynamic line.

Parameters
[in]_linePointer to the line to delete.
ignition::math::Vector3d DerivedScale ( ) const
inherited

Get the scale of the visual as inherited from all parents.

Returns
The derived scaling factor.
float DerivedTransparency ( ) const
inherited

Get the transparency of the visual as inherited from all parents.

Returns
The derived transparency.
void DetachObjects ( )
inherited

Detach all objects.

void DetachVisual ( VisualPtr  _vis)
inherited

Detach a visual.

Parameters
[in]_visVisual to detach.
void DetachVisual ( const std::string &  _name)
inherited

Detach a visual.

Parameters
[in]_nameName of the visual to detach.
void DisableTrackVisual ( )
inherited

Disable tracking of a visual.

void EnableTrackVisual ( VisualPtr  _vis)
inherited

Set one visual to track/follow another.

Parameters
[in]_visVisual to track.
void FillMaterialMsg ( ignition::msgs::Material &  _msg) const
inherited

Fill an ignition::msgs::Material message based on this visual's material properties.

Parameters
[out]_msgIgnition message to fill.
virtual void Fini ( )
protectedvirtual

Helper for the destructor.

Reimplemented from Visual.

common::Color GetAmbient ( ) const
inherited

Get the ambient color of the visual.

Returns
Ambient color.
unsigned int GetAttachedObjectCount ( ) const
inherited

Return the number of attached movable objects.

Returns
The number of attached movable objects.
math::Box GetBoundingBox ( ) const
inherited

Get the bounding box for the visual.

Returns
The bounding box in world coordinates.
Deprecated:
See version the returns an ignition math object.
bool GetCastShadows ( ) const
inherited

Get whether the visual casts shadows.

Returns
True if the visual casts shadows.
VisualPtr GetChild ( unsigned int  _index)
inherited

Get an attached visual based on an index.

Index should be between 0 and Visual::GetChildCount.

Parameters
[in]_indexIndex of the child to retreive.
Returns
Pointer to the child visual, NULL if index is invalid.
unsigned int GetChildCount ( )
inherited

Get the number of attached visuals.

Returns
The number of children.
unsigned int GetDepth ( ) const
inherited

Get the depth of this visual, where 0 is the depth of the world visual.

Returns
This visual's depth.
common::Color GetDiffuse ( ) const
inherited

Get the diffuse color of the visual.

Returns
Diffuse color.
common::Color GetEmissive ( ) const
inherited

Get the emissive color of the visual.

Returns
Emissive color.
ignition::math::Vector3d GetGeometrySize ( ) const
inherited

Get the geometry size.

Returns
Size of geometry.
std::string GetGeometryType ( ) const
inherited

Get the geometry type.

Returns
Type of geometry in string.
bool GetHighlighted ( ) const
inherited

Get whether or not the visual is visually highlighted.

This is most often means that an object is selected by a user via the GUI.

Returns
True if the visual is highlighted.
uint32_t GetId ( ) const
inherited

Get the id associated with this visual.

bool GetLighting ( ) const
inherited

Get whether or not lighting is enabled.

Returns
True if lighting is enabled.
std::string GetMaterialName ( ) const
inherited

Get the name of the material.

Returns
The name of the visual applied to this visual.
std::string GetMeshName ( ) const
inherited

The name of the mesh set in the visual's SDF.

Returns
Name of the mesh.
std::string GetName ( ) const
inherited

Get the name of the visual.

Returns
The name of the visual.
Deprecated:
See std::string Name() const
std::string GetNormalMap ( ) const
inherited

Get the normal map.

Returns
The name of the normal map material.
VisualPtr GetNthAncestor ( unsigned int  _n)
inherited

Get the nth ancestor counting from the world visual.

GetNthAncestor(0) returns the world visual. GetNthAncestor(1) returns the RootVisual. GetNthAncestor(2) returns the ancestor which is a child of the root visual and so on.

Parameters
[in]_nDepth of the ancestor.
Returns
The nth ancestor counting from the world.
VisualPtr GetParent ( ) const
inherited

Get the parent visual, if one exists.

Returns
Pointer to the parent visual, NULL if no parent.
math::Pose GetPose ( ) const
inherited

Get the pose of the visual.

Returns
The Visual's pose.
Deprecated:
See ignition::math::Pose3d Pose() const;
math::Vector3 GetPosition ( ) const
inherited

Get the position of the visual.

Returns
The visual's position.
Deprecated:
See ignition::math::Vector3d Position() const
VisualPtr GetRootVisual ( )
inherited

Get the root visual.

Returns
The root visual, which is one level below the world visual.
math::Quaternion GetRotation ( ) const
inherited

Get the rotation of the visual.

Returns
The visual's rotation.
Deprecated:
ignition::math::Quaterniond Rotation() const
math::Vector3 GetScale ( )
inherited

Get the scale.

Returns
The scaling factor.
Deprecated:
See version that return an ignition math object.
ScenePtr GetScene ( ) const
inherited

Get current.

Returns
Pointer to the scene.
Ogre::SceneNode* GetSceneNode ( ) const
inherited

Return the scene Node of this visual entity.

Returns
The Ogre scene node.
sdf::ElementPtr GetSDF ( ) const
inherited

Get the visual SDF.

Note that visuals are abstract. This SDF could be associated with a visual that represents a model, a link, a visual (inside a link), or a visualization object (e.g. LaserVisual). Therefore this SDF may store more fields than actually used.

Returns
SDF of the visual.
std::string GetShaderType ( ) const
inherited

Get the shader type.

Returns
String of the shader type: "vertex", "pixel", "normal_map_object_space", "normal_map_tangent_space".
common::Color GetSpecular ( ) const
inherited

Get the specular color of the visual.

Returns
Specular color.
std::string GetSubMeshName ( ) const
inherited

Get the name of the sub mesh set in the visual's SDF.

Returns
Name of the submesh. Empty string if no submesh is specified.
float GetTransparency ( )
inherited

Get the transparency.

Returns
The transparency.
Visual::VisualType GetType ( ) const
inherited

Get type of visual.

Returns
Visual type.
uint32_t GetVisibilityFlags ( )
inherited

Get visibility flags for this visual and all children.

Returns
The visiblity flags.
See Also
GZ_VISIBILITY_ALL
GZ_VISIBILITY_GUI
GZ_VISIBILITY_SELECTABLE
bool GetVisible ( ) const
inherited

Get whether the visual is visible.

Returns
True if the visual is visible.
math::Pose GetWorldPose ( ) const
inherited

Get the global pose of the node.

Returns
The pose in the world coordinate frame.
Deprecated:
See ignition::math::Pose3d WorldPose() const.
bool HasAttachedObject ( const std::string &  _name)
inherited

Returns true if an object with _name is attached.

Parameters
[in]_nameName of an object to find.
bool InheritTransparency ( ) const
inherited

Get whether this visual inherits transparency from parent.

Returns
True if the visual inherits transparency.
void Init ( )
inherited

Helper for the contructor.

ignition::math::Pose3d InitialRelativePose ( ) const
inherited

Get the initial relative pose of the visual.

Returns
The visual's initial relative pose.
void InsertMesh ( const std::string &  _meshName,
const std::string &  _subMesh = "",
bool  _centerSubmesh = false 
)
inherited

Insert a mesh into Ogre.

Parameters
[in]_meshNameName of the mesh to insert.
[in]_subMeshName of the mesh within _meshName to insert.
[in]_centerSubmeshTrue to center the submesh.
static void InsertMesh ( const common::Mesh _mesh,
const std::string &  _subMesh = "",
bool  _centerSubmesh = false 
)
staticinherited

Insert a mesh into Ogre.

Parameters
[in]_meshPointer to the mesh to insert.
[in]_subMeshName of the mesh within _meshName to insert.
[in]_centerSubmeshTrue to center the submesh.
bool IsAncestorOf ( const rendering::VisualPtr  _visual) const
inherited

Check if this visual is an ancestor of another visual.

Parameters
[in]_visualThe other visual.
Returns
True if this visual is an ancestor.
bool IsDescendantOf ( const rendering::VisualPtr  _visual) const
inherited

Check if this visual is a descendant of another visual.

Parameters
[in]_visualThe other visual.
Returns
True if this visual is a descendant.
bool IsPlane ( ) const
inherited

Return true if the visual is a plane.

Returns
True if a plane.
bool IsStatic ( ) const
inherited

Return true if the visual is a static geometry.

Returns
True if the visual is static.
void Load ( const msgs::LogicalCameraSensor &  _msg)

Load the Visual.

Parameters
[in]_msgMessage describing the camera sensor.
void Load ( sdf::ElementPtr  _sdf)
inherited

Load the visual with a set of parameters.

Parameters
[in]_sdfLoad from an SDF element.
virtual void Load ( )
virtualinherited

Load the visual with default parameters.

Reimplemented in SelectionObj, ApplyWrenchVisual, SonarVisual, TransmitterVisual, LinkFrameVisual, AxisVisual, OriginVisual, and ArrowVisual.

void LoadFromMsg ( ConstVisualPtr &  _msg)
inherited

Load from a message.

Parameters
[in]_msgA visual message.
void LoadPlugin ( const std::string &  _filename,
const std::string &  _name,
sdf::ElementPtr  _sdf 
)
inherited

Load a plugin.

Parameters
_filenameThe filename of the plugin
_nameA unique name for the plugin
_sdfThe SDF to pass into the plugin.
void MakeStatic ( )
inherited

Make the visual objects static renderables.

void MoveToPosition ( const math::Pose _pose,
double  _time 
)
inherited

Move to a pose and over a given time.

Parameters
[in]_posePose the visual will end at.
[in]_timeTime it takes the visual to move to the pose.
Deprecated:
See version that accepts an ignition math object.
void MoveToPosition ( const ignition::math::Pose3d &  _pose,
const double  _time 
)
inherited

Move to a pose and over a given time.

Parameters
[in]_posePose the visual will end at.
[in]_timeTime it takes the visual to move to the pose.
void MoveToPositions ( const std::vector< math::Pose > &  _pts,
double  _time,
std::function< void()>  _onComplete = nullptr 
)
inherited

Move to a series of pose and over a given time.

Parameters
[in]_posesSeries of poses the visual will move to.
[in]_timeTime it takes the visual to move to the pose.
[in]_onCompleteCallback used when the move is complete.
Deprecated:
See version that accepts an ignition math object.
void MoveToPositions ( const std::vector< ignition::math::Pose3d > &  _pts,
const double  _time,
std::function< void()>  _onComplete = nullptr 
)
inherited

Move to a series of pose and over a given time.

Parameters
[in]_posesSeries of poses the visual will move to.
[in]_timeTime it takes the visual to move to the pose.
[in]_onCompleteCallback used when the move is complete.
std::string Name ( ) const
inherited

Get the name of the visual.

Returns
The name of the visual.
ignition::math::Pose3d Pose ( ) const
inherited

Get the pose of the visual.

Returns
The Visual's pose.
Deprecated:
See ignition::math::Pose3d Pose() const;
ignition::math::Vector3d Position ( ) const
inherited

Get the position of the visual.

Returns
The visual's position.
void ProcessMaterialMsg ( const ignition::msgs::Material &  _msg)
protectedinherited

Process a material message.

Parameters
[in]_msgThe ignition material message.
void RemovePlugin ( const std::string &  _name)
inherited

Remove a running plugin.

Parameters
_nameThe unique name of the plugin to remove
ignition::math::Quaterniond Rotation ( ) const
inherited

Get the rotation of the visual.

Returns
The visual's rotation.
ignition::math::Vector3d Scale ( ) const
inherited

Get the scale.

Returns
The scaling factor.
void SetAmbient ( const common::Color _color,
const bool  _cascade = true 
)
inherited

Set the ambient color of the visual.

Parameters
[in]_colorThe ambient color.
[in]_cascadeWhether to set this parameter in children too.
void SetCastShadows ( bool  _shadows)
inherited

Set whether the visual should cast shadows.

Parameters
[in]_shadowsTrue to enable shadows.
void SetDiffuse ( const common::Color _color,
const bool  _cascade = true 
)
inherited

Set the diffuse color of the visual.

Parameters
[in]_colorSet the diffuse color.
[in]_cascadeWhether to set this parameter in children too.
virtual void SetEmissive ( const common::Color _color,
const bool  _cascade = true 
)
virtualinherited

Set the emissive value.

Parameters
[in]_colorThe emissive color.
[in]_cascadeWhether to set this parameter in children too.

Reimplemented in LaserVisual.

virtual void SetHighlighted ( bool  _highlighted)
virtualinherited

Set the visual to be visually highlighted.

This is most often used when an object is selected by a user via the GUI.

Parameters
[in]_highlightedTrue to enable the highlighting.

Reimplemented in LinkFrameVisual.

void SetId ( uint32_t  _id)
inherited

Set the id associated with this visual.

void SetInheritTransparency ( const bool  _inherit)
inherited

Set whether to inherit transparency from parent.

Parameters
[in]_inheritTrue to inherit transparency.
void SetLayer ( const int32_t  _layer)
inherited

Set the layer this visual belongs to.

Parameters
[in]_layerIndex of the layer.
void SetLighting ( bool  _lighting)
inherited

Set whether or not to enable or disable lighting.

Parameters
[in]_lightingTrue to enable lighting.
void SetMaterial ( const std::string &  _materialName,
bool  _unique = true,
const bool  _cascade = true 
)
inherited

Set the material.

Parameters
[in]_materialNameThe name of the material.
[in]_uniqueTrue to make the material unique, which allows the material to change without changing materials that originally had the same name.
[in]_cascadeWhether to set this parameter in children too.
void SetName ( const std::string &  _name)
inherited

Set the name of the visual.

Parameters
[in]_nameName of the visual
void SetNormalMap ( const std::string &  _nmap)
inherited

Set the normal map.

Parameters
[in]_nmapName of the normal map material.
void SetPose ( const math::Pose _pose)
inherited

Set the pose of the visual.

Parameters
[in]_poseThe new pose of the visual.
Deprecated:
See version that accepts an ignition math object.
void SetPose ( const ignition::math::Pose3d &  _pose)
inherited

Set the pose of the visual.

Parameters
[in]_poseThe new pose of the visual.
void SetPosition ( const math::Vector3 _pos)
inherited

Set the position of the visual.

Parameters
[in]_posThe position to set the visual to.
Deprecated:
See version that accepts ignition math parameters
void SetPosition ( const ignition::math::Vector3d &  _pos)
inherited

Set the position of the visual.

Parameters
[in]_posThe position to set the visual to.
void SetRibbonTrail ( bool  _value,
const common::Color _initialColor,
const common::Color _changeColor 
)
inherited

True on or off a ribbon trail.

Parameters
[in]_valueTrue to enable ribbon trail.
[in]_initialColorThe initial color of the ribbon trail.
[in]_changeColorColor to change too as the trail grows.
void SetRotation ( const math::Quaternion _rot)
inherited

Set the rotation of the visual.

Parameters
[in]_rotThe rotation of the visual.
Deprecated:
See version that accepts an ignition math object.
void SetRotation ( const ignition::math::Quaterniond &  _rot)
inherited

Set the rotation of the visual.

Parameters
[in]_rotThe rotation of the visual.
void SetScale ( const math::Vector3 _scale)
inherited

Set the scale.

Parameters
[in]_scaleThe scaling factor for the visual.
Deprecated:
See version that accepts ignition math parameters.
void SetScale ( const ignition::math::Vector3d &  _scale)
inherited

Set the scale.

Parameters
[in]_scaleThe scaling factor for the visual.
void SetScene ( ScenePtr  _scene)
inherited

Set current scene.

Parameters
[in]_scenePointer to the scene.
void SetShaderType ( const std::string &  _type)
inherited

Set the shader type for the visual's material.

Parameters
[in]_typeShader type string: "vertex", "pixel", "normal_map_object_space", "normal_map_tangent_space".
void SetSkeletonPose ( const msgs::PoseAnimation &  _pose)
inherited

Set animation skeleton pose.

Parameters
[in]_poseSkelton message
void SetSpecular ( const common::Color _color,
const bool  _cascade = true 
)
inherited

Set the specular color of the visual.

Parameters
[in]_colorSpecular color.
[in]_cascadeWhether to set this parameter in children too.
void SetTransparency ( float  _trans)
inherited

Set the transparency.

Parameters
[in]_transThe transparency, between 0 and 1 where 0 is no transparency.
void SetType ( const Visual::VisualType  _type)
inherited

Set type of visual.

Parameters
[in]_typeVisual type.
void SetTypeMsg ( const google::protobuf::Message *  _msg)
inherited

Set a message specific for this visual type.

For example, a link visual will have a link message.

Parameters
[in]_msgMessage for this visual.
void SetVisibilityFlags ( uint32_t  _flags)
inherited

Set visibility flags for this visual and all children.

Parameters
[in]_flagsThe visiblity flags.
See Also
GZ_VISIBILITY_ALL
GZ_VISIBILITY_GUI
GZ_VISIBILITY_SELECTABLE
virtual void SetVisible ( bool  _visible,
bool  _cascade = true 
)
virtualinherited

Set whether the visual is visible.

Parameters
[in]_visibleset this visual visible.
[in]_cascadesetting this parameter in children too.

Reimplemented in JointVisual, and ArrowVisual.

void SetWireframe ( bool  _show)
inherited

Enable or disable wireframe for this visual.

Parameters
[in]_showTrue to enable wireframe for this visual.
void SetWorldPose ( const math::Pose _pose)
inherited

Set the world pose of the visual.

Parameters
[in]_posePose of the visual in the world coordinate frame.
Deprecated:
See version that accepts an ignition math object.
void SetWorldPose ( const ignition::math::Pose3d &  _pose)
inherited

Set the world pose of the visual.

Parameters
[in]_posePose of the visual in the world coordinate frame.
void SetWorldPosition ( const math::Vector3 _pos)
inherited

Set the world linear position of the visual.

Parameters
[in]_posePosition in the world coordinate frame.
Deprecated:
See version that accepts an ignition math object.
void SetWorldPosition ( const ignition::math::Vector3d &  _pos)
inherited

Set the world linear position of the visual.

Parameters
[in]_posePosition in the world coordinate frame.
void SetWorldRotation ( const math::Quaternion _rot)
inherited

Set the world orientation of the visual.

Parameters
[in]_rotRotation in the world coordinate frame.
Deprecated:
See version that accepts an ignition math object.
void SetWorldRotation ( const ignition::math::Quaterniond &  _rot)
inherited

Set the world orientation of the visual.

Parameters
[in]_rotRotation in the world coordinate frame.
void ShowBoundingBox ( )
inherited

Display the bounding box visual.

void ShowCollision ( bool  _show)
inherited

Display the collision visuals.

Parameters
[in]_showTrue to show visuals labeled as collision objects.
void ShowCOM ( bool  _show)
inherited

Display Center of Mass visuals.

Parameters
[in]_showTrue to show center of mass visualizations.
void ShowInertia ( bool  _show)
inherited

Display inertia visuals.

Parameters
[in]_showTrue to show inertia visualizations.
void ShowJoints ( bool  _show)
inherited

Display joint visuals.

Parameters
[in]_showTrue to show joint visualizations.
void ShowLinkFrame ( bool  _show)
inherited

Display link frame visuals.

Parameters
[in]_showTrue to show link frame visualizations.
void ShowSkeleton ( bool  _show)
inherited

Display the skeleton visuals.

Parameters
[in]_showTrue to show skeleton visuals.
void ToggleLayer ( const int32_t  _layer)
inherited

Toggle layer visibility.

If the visual is on the specified layer its visibility will be toggled.

Parameters
[in]_layerIndex of the layer to toggle.
void ToggleVisible ( )
inherited

Toggle whether this visual is visible.

void UpdateFromMsg ( ConstVisualPtr &  _msg)
inherited

Update a visual based on a message.

Parameters
[in]_msgThe visual message.
bool UseRTShader ( ) const
inherited

Get whether this visual uses RT shader system.

Returns
True if RT shader is used.
bool Wireframe ( ) const
inherited

Get whether wireframe is enabled for this visual.

Returns
True if wireframe is enabled for this visual.
ignition::math::Pose3d WorldPose ( ) const
inherited

Get the global pose of the visual.

Returns
The pose in the world coordinate frame.

Member Data Documentation

VisualPrivate* dataPtr
protectedinherited

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