25 #include <boost/enable_shared_from_this.hpp>
36 #include "gazebo/msgs/MessageTypes.hh"
70 bool _useRTShader =
true);
78 bool _useRTShader =
true);
97 public:
void LoadFromMsg(ConstVisualPtr &_msg);
101 public:
void Load(sdf::ElementPtr _sdf);
104 public:
virtual void Load();
107 public:
void Update();
111 public:
void SetName(
const std::string &_name);
115 public: std::string GetName()
const;
119 public:
void AttachVisual(
VisualPtr _vis);
123 public:
void DetachVisual(
VisualPtr _vis);
127 public:
void DetachVisual(
const std::string &_name);
131 public:
void AttachObject(Ogre::MovableObject *_obj);
135 public:
bool HasAttachedObject(
const std::string &_name);
139 public:
unsigned int GetAttachedObjectCount()
const;
142 public:
void DetachObjects();
146 public:
unsigned int GetChildCount();
152 public:
VisualPtr GetChild(
unsigned int _index);
161 public: Ogre::MovableObject *AttachMesh(
const std::string &_meshName,
162 const std::string &_subMesh=
"",
163 bool _centerSubmesh =
false,
164 const std::string &_objName=
"");
176 public:
void SetLighting(
bool _lighting);
183 public:
void SetMaterial(
const std::string &_materialName,
184 bool _unique =
true);
199 public:
void AttachAxes();
203 public:
void SetWireframe(
bool _show);
207 private:
void SetTransparencyInnerLoop();
212 public:
void SetTransparency(
float _trans);
216 public:
float GetTransparency();
221 public:
void SetHighlighted(
bool _highlighted);
226 public:
bool GetHighlighted()
const;
230 public:
virtual void SetEmissive(
const common::Color &_color);
234 public:
void SetCastShadows(
bool _shadows);
239 public:
void SetVisible(
bool _visible,
bool _cascade =
true);
242 public:
void ToggleVisible();
246 public:
bool GetVisible()
const;
258 public:
void SetPose(
const math::Pose &_pose);
278 public:
void SetWorldPose(
const math::Pose &_pose);
290 public: Ogre::SceneNode *GetSceneNode()
const;
293 public:
void MakeStatic();
297 public:
bool IsStatic()
const;
301 public:
void EnableTrackVisual(
VisualPtr _vis);
304 public:
void DisableTrackVisual();
308 public: std::string GetNormalMap()
const;
312 public:
void SetNormalMap(
const std::string &_nmap);
318 public:
void SetRibbonTrail(
bool _value,
324 public:
math::Box GetBoundingBox()
const;
340 unsigned int _index);
344 public: std::string GetMaterialName()
const;
350 public:
void InsertMesh(
const std::string &_meshName,
351 const std::string &_subMesh =
"",
352 bool _centerSubmesh =
false);
358 public:
static void InsertMesh(
const common::Mesh *_mesh,
359 const std::string &_subMesh =
"",
360 bool _centerSubmesh =
false);
364 public:
void UpdateFromMsg(ConstVisualPtr &_msg);
368 public:
bool IsPlane()
const;
382 public: std::string GetShaderType()
const;
387 public:
void SetShaderType(
const std::string &_type);
392 public:
void MoveToPosition(
const math::Pose &_pose,
double _time);
398 public:
void MoveToPositions(
const std::vector<math::Pose> &_pts,
400 boost::function<
void()> _onComplete =
NULL);
407 public:
void SetVisibilityFlags(uint32_t _flags);
414 public: uint32_t GetVisibilityFlags();
417 public:
void ShowBoundingBox();
422 public:
void ShowCollision(
bool _show);
426 public:
void ShowSkeleton(
bool _show);
430 public:
void SetScene(
ScenePtr _scene);
438 public:
void ShowJoints(
bool _show);
442 public:
void ShowCOM(
bool _show);
446 public:
void SetSkeletonPose(
const msgs::PoseAnimation &_pose);
452 public:
void LoadPlugin(
const std::string &_filename,
453 const std::string &_name,
454 sdf::ElementPtr _sdf);
458 public:
void RemovePlugin(
const std::string &_name);
461 public: uint32_t GetId()
const;
464 public:
void SetId(uint32_t _id);
468 public: std::string GetMeshName()
const;
473 public: std::string GetSubMeshName()
const;
476 public:
void ClearParent();
486 const std::string &_name,
VisualPtr _parent,
487 bool _useRTShader =
true);
497 const std::string &_name,
ScenePtr _scene,
498 bool _useRTShader =
true);
506 private:
void Init(
const std::string &_name,
ScenePtr _scene,
515 private:
void Init(
const std::string &_name,
VisualPtr _parent,
520 private:
void LoadPlugins();
522 private:
void LoadPlugin(sdf::ElementPtr _sdf);
527 private:
void GetBoundsHelper(Ogre::SceneNode *_node,
533 private:
bool GetCenterSubMesh()
const;
537 private:
void DestroyAllAttachedMovableObjects(
538 Ogre::SceneNode *_sceneNode);
A 3D mesh.
Definition: Mesh.hh:40
VisualPrivate * dataPtr
Definition: Visual.hh:547
Class for drawing lines that can change.
Definition: DynamicLines.hh:43
Encapsulates a position and rotation in three space.
Definition: Pose.hh:40
Private data for the Visual class.
Definition: VisualPrivate.hh:56
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
Mathematical representation of a box and related functions.
Definition: Box.hh:33
A renderable object.
Definition: Visual.hh:62
RenderOpType
Type of render operation for a drawable.
Definition: RenderTypes.hh:172
A quaternion class.
Definition: Quaternion.hh:41
A strip of connected lines, 1 vertex per line plus 1 start vertex.
Definition: RenderTypes.hh:182
#define NULL
Definition: CommonTypes.hh:30
Defines a color.
Definition: Color.hh:39
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:74
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:102
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48