Public Types | Public Member Functions | List of all members
gazebo::rendering::SelectionObj Class Reference

Interactive selection object for models and links. More...

#include <SelectionObj.hh>

Inheritance diagram for gazebo::rendering::SelectionObj:
Inheritance graph
[legend]

Public Types

enum  SelectionMode {
  SELECTION_NONE = 0, TRANS, ROT, SCALE,
  TRANS_X, TRANS_Y, TRANS_Z, ROT_X,
  ROT_Y, ROT_Z, SCALE_X, SCALE_Y,
  SCALE_Z
}
 
- Public Types inherited from gazebo::rendering::Visual
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

 SelectionObj (const std::string &_name, VisualPtr _vis)
 Constructor. More...
 
virtual ~SelectionObj ()
 Deconstructor. More...
 
void Attach (rendering::VisualPtr _vis)
 Attach the selection object to the given visual. More...
 
void Detach ()
 Detach the selection object from the current visual. More...
 
virtual void Fini ()
 Helper for the destructor. More...
 
bool GetHandleVisible (SelectionMode _mode) const
 Get the visibility for a specific handle. More...
 
SelectionMode GetMode ()
 Get the current selection mode. More...
 
SelectionMode GetState ()
 Get the current selection state. More...
 
void Load ()
 Load. More...
 
void SetGlobal (bool _global)
 Set selection object to ignore local transforms. More...
 
void SetHandleMaterial (SelectionMode _mode, const std::string &_material, bool _unique=true)
 Set the material for a specific handle or handle group. More...
 
void SetHandleVisible (SelectionMode _mode, bool _visible)
 Set the visibility for a specific handle or handle group. More...
 
void SetMode (const std::string &_mode)
 Set the manipulation mode. More...
 
void SetMode (SelectionMode _mode)
 Set the selection mode. More...
 
void SetState (const std::string &_state)
 Set state by highlighting the corresponding selection object visual. More...
 
void SetState (SelectionMode _state)
 Set state by highlighting the corresponding selection object visual. More...
 
void UpdateSize ()
 Update selection object size to match the parent visual. More...
 
- Public Member Functions inherited from gazebo::rendering::Visual
 Visual (const std::string &_name, VisualPtr _parent, bool _useRTShader=true)
 Constructor. More...
 
 Visual (const std::string &_name, ScenePtr _scene, bool _useRTShader=true)
 Constructor. More...
 
virtual ~Visual ()
 Destructor. 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...
 
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...
 
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
 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
 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
 Get the pose of the visual. More...
 
math::Vector3 GetPosition () const
 Get the position of the visual. More...
 
VisualPtr GetRootVisual ()
 Get the root visual. More...
 
math::Quaternion GetRotation () const
 Get the rotation of the visual. More...
 
math::Vector3 GetScale ()
 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
 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...
 
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 (sdf::ElementPtr _sdf)
 Load the visual with a set of 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)
 Move to a pose and over a given time. More...
 
void MoveToPositions (const std::vector< math::Pose > &_pts, double _time, boost::function< void()> _onComplete=NULL)
 Move to a series of pose and over a given time. More...
 
void RemovePlugin (const std::string &_name)
 Remove a running plugin. 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 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)
 Set the pose of the visual. More...
 
void SetPosition (const math::Vector3 &_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)
 Set the rotation of the visual. More...
 
void SetScale (const math::Vector3 &_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 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)
 Set the world pose of the visual. More...
 
void SetWorldPosition (const math::Vector3 &_pos)
 Set the world linear position of the visual. More...
 
void SetWorldRotation (const math::Quaternion &_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 Update ()
 Update the visual. 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from gazebo::rendering::Visual
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 inherited from gazebo::rendering::Visual
 Visual (VisualPrivate &_dataPtr, const std::string &_name, VisualPtr _parent, bool _useRTShader=true)
 
 Visual (VisualPrivate &_dataPtr, const std::string &_name, ScenePtr _scene, bool _useRTShader=true)
 
- Protected Attributes inherited from gazebo::rendering::Visual
VisualPrivatedataPtr
 

Detailed Description

Interactive selection object for models and links.

Member Enumeration Documentation

Enumerator
SELECTION_NONE 

Translation in x.

TRANS 

Translation mode.

ROT 

Rotation mode.

SCALE 

Scale mode.

TRANS_X 

Translation in x.

TRANS_Y 

Translation in y.

TRANS_Z 

Translation in z.

ROT_X 

Rotation in x.

ROT_Y 

Rotation in y.

ROT_Z 

Rotation in z.

SCALE_X 

Scale in x.

SCALE_Y 

Scale in y.

SCALE_Z 

Scale in z.

Constructor & Destructor Documentation

gazebo::rendering::SelectionObj::SelectionObj ( const std::string &  _name,
VisualPtr  _vis 
)

Constructor.

Parameters
[in]_nameName of selection object.
[in]_visParent visual that the selection object is attached to.
virtual gazebo::rendering::SelectionObj::~SelectionObj ( )
virtual

Deconstructor.

Member Function Documentation

void gazebo::rendering::SelectionObj::Attach ( rendering::VisualPtr  _vis)

Attach the selection object to the given visual.

Parameters
[in]_visPointer to visual to which the selection object will be attached.
void gazebo::rendering::SelectionObj::Detach ( )

Detach the selection object from the current visual.

virtual void gazebo::rendering::SelectionObj::Fini ( )
virtual

Helper for the destructor.

Reimplemented from gazebo::rendering::Visual.

bool gazebo::rendering::SelectionObj::GetHandleVisible ( SelectionMode  _mode) const

Get the visibility for a specific handle.

If a handle group is specified, the X component's visibility is returned.

Parameters
[in]_modeManipulation mode corresponding to the handle.
Returns
Whether it is visible or not.
SelectionMode gazebo::rendering::SelectionObj::GetMode ( )

Get the current selection mode.

SelectionMode gazebo::rendering::SelectionObj::GetState ( )

Get the current selection state.

void gazebo::rendering::SelectionObj::Load ( )
virtual

Load.

Reimplemented from gazebo::rendering::Visual.

void gazebo::rendering::SelectionObj::SetGlobal ( bool  _global)

Set selection object to ignore local transforms.

Parameters
[in]_globalTrue to set the visuals to be in global frame.
void gazebo::rendering::SelectionObj::SetHandleMaterial ( SelectionMode  _mode,
const std::string &  _material,
bool  _unique = true 
)

Set the material for a specific handle or handle group.

Parameters
[in]_modeManipulation mode corresponding to the handle.
[in]_materialMaterial name.
[in]_uniqueTrue to make the material unique, which allows the material to change without changing materials that originally had the same name.
void gazebo::rendering::SelectionObj::SetHandleVisible ( SelectionMode  _mode,
bool  _visible 
)

Set the visibility for a specific handle or handle group.

Parameters
[in]_modeManipulation mode corresponding to the handle.
[in]_visibleWhether to show or not.
void gazebo::rendering::SelectionObj::SetMode ( const std::string &  _mode)

Set the manipulation mode.

Parameters
[in]_modeManipulation mode in string: translate rotate, scale.
void gazebo::rendering::SelectionObj::SetMode ( SelectionMode  _mode)

Set the selection mode.

_name Selection mode: TRANS, ROT, SCALE.

void gazebo::rendering::SelectionObj::SetState ( const std::string &  _state)

Set state by highlighting the corresponding selection object visual.

Parameters
[in]_stateSelection state in string format.
void gazebo::rendering::SelectionObj::SetState ( SelectionMode  _state)

Set state by highlighting the corresponding selection object visual.

Parameters
[in]_stateSelection state.
See Also
SelectionMode
void gazebo::rendering::SelectionObj::UpdateSize ( )

Update selection object size to match the parent visual.


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