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);
208 public:
void SetTransparency(
float _trans);
212 public:
float GetTransparency();
217 public:
void SetHighlighted(
bool _highlighted);
222 public:
bool GetHighlighted()
const;
226 public:
virtual void SetEmissive(
const common::Color &_color);
230 public:
void SetCastShadows(
bool _shadows);
235 public:
void SetVisible(
bool _visible,
bool _cascade =
true);
238 public:
void ToggleVisible();
242 public:
bool GetVisible()
const;
254 public:
void SetPose(
const math::Pose &_pose);
274 public:
void SetWorldPose(
const math::Pose &_pose);
286 public: Ogre::SceneNode *GetSceneNode()
const;
289 public:
void MakeStatic();
293 public:
bool IsStatic()
const;
297 public:
void EnableTrackVisual(
VisualPtr _vis);
300 public:
void DisableTrackVisual();
304 public: std::string GetNormalMap()
const;
308 public:
void SetNormalMap(
const std::string &_nmap);
314 public:
void SetRibbonTrail(
bool _value,
320 public:
math::Box GetBoundingBox()
const;
336 unsigned int _index);
340 public: std::string GetMaterialName()
const;
346 public:
void InsertMesh(
const std::string &_meshName,
347 const std::string &_subMesh =
"",
348 bool _centerSubmesh =
false);
354 public:
static void InsertMesh(
const common::Mesh *_mesh,
355 const std::string &_subMesh =
"",
356 bool _centerSubmesh =
false);
360 public:
void UpdateFromMsg(ConstVisualPtr &_msg);
364 public:
bool IsPlane()
const;
378 public: std::string GetShaderType()
const;
383 public:
void SetShaderType(
const std::string &_type);
388 public:
void MoveToPosition(
const math::Pose &_pose,
double _time);
394 public:
void MoveToPositions(
const std::vector<math::Pose> &_pts,
396 boost::function<
void()> _onComplete =
NULL);
403 public:
void SetVisibilityFlags(uint32_t _flags);
410 public: uint32_t GetVisibilityFlags();
413 public:
void ShowBoundingBox();
418 public:
void ShowCollision(
bool _show);
422 public:
void ShowSkeleton(
bool _show);
426 public:
void SetScene(
ScenePtr _scene);
434 public:
void ShowJoints(
bool _show);
438 public:
void ShowCOM(
bool _show);
442 public:
void SetSkeletonPose(
const msgs::PoseAnimation &_pose);
448 public:
void LoadPlugin(
const std::string &_filename,
449 const std::string &_name,
450 sdf::ElementPtr _sdf);
454 public:
void RemovePlugin(
const std::string &_name);
457 public: uint32_t GetId()
const;
460 public:
void SetId(uint32_t _id);
464 public: std::string GetMeshName()
const;
469 public: std::string GetSubMeshName()
const;
472 public:
void ClearParent();
482 const std::string &_name,
VisualPtr _parent,
483 bool _useRTShader =
true);
493 const std::string &_name,
ScenePtr _scene,
494 bool _useRTShader =
true);
502 private:
void Init(
const std::string &_name,
ScenePtr _scene,
511 private:
void Init(
const std::string &_name,
VisualPtr _parent,
516 private:
void LoadPlugins();
518 private:
void LoadPlugin(sdf::ElementPtr _sdf);
523 private:
void GetBoundsHelper(Ogre::SceneNode *_node,
529 private:
bool GetCenterSubMesh()
const;
533 private:
void DestroyAllAttachedMovableObjects(
534 Ogre::SceneNode *_sceneNode);
A 3D mesh.
Definition: Mesh.hh:40
VisualPrivate * dataPtr
Definition: Visual.hh:543
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:162
A quaternion class.
Definition: Quaternion.hh:45
A strip of connected lines, 1 vertex per line plus 1 start vertex.
Definition: RenderTypes.hh:172
#define NULL
Definition: CommonTypes.hh:30
Defines a color.
Definition: Color.hh:39
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:72
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:100
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48