25 #include <boost/enable_shared_from_this.hpp>
51 class SkeletonInstance;
65 class Visual :
public boost::enable_shared_from_this<Visual>
73 bool _useRTShader =
true);
81 bool _useRTShader =
true);
104 public:
void Load(sdf::ElementPtr _sdf);
107 public:
virtual void Load();
114 public:
void SetName(
const std::string &_name);
118 public: std::string
GetName()
const;
164 public: Ogre::MovableObject *
AttachMesh(
const std::string &_meshName,
165 const std::string &_subMesh=
"",
166 bool _centerSubmesh =
false,
167 const std::string &_objName=
"");
182 public:
void SetMaterial(
const std::string &_materialName,
183 bool _unique =
true);
229 public:
void SetVisible(
bool _visible,
bool _cascade =
true);
330 unsigned int _index);
340 public:
void InsertMesh(
const std::string &_meshName,
341 const std::string &_subMesh =
"",
342 bool _centerSubmesh =
false);
349 const std::string &_subMesh =
"",
350 bool _centerSubmesh =
false);
390 boost::function<
void()> _onComplete =
NULL);
432 public:
void ShowCOM(
bool _show);
442 public:
void LoadPlugin(
const std::string &_filename,
443 const std::string &_name,
444 sdf::ElementPtr _sdf);
451 public: uint32_t
GetId()
const;
454 public:
void SetId(uint32_t _id);
459 private:
void LoadPlugins();
461 private:
void LoadPlugin(sdf::ElementPtr _sdf);
463 private: std::vector<VisualPluginPtr> plugins;
468 private:
void GetBoundsHelper(Ogre::SceneNode *_node,
495 private:
bool GetCenterSubMesh()
const;
499 private:
void DestroyAllAttachedMovableObjects(
500 Ogre::SceneNode *_sceneNode);
503 private: sdf::ElementPtr sdf;
506 private: std::string myMaterialName;
509 private: std::string origMaterialName;
512 private:
float transparency;
516 private:
bool isStatic;
519 private: Ogre::StaticGeometry *staticGeom;
522 private:
bool visible;
525 private: Ogre::RibbonTrail *ribbonTrail;
528 private: Ogre::SkeletonInstance *skeleton;
534 private: std::list<DynamicLines*> lines;
537 private: std::list< std::pair<DynamicLines*, unsigned int> > lineVertices;
540 private: std::string name;
543 private: std::vector<VisualPtr> children;
546 private: Ogre::AnimationState *animState;
552 private: boost::function<void()> onAnimationComplete;
555 private:
bool useRTShader;
558 private:
bool initialized;
564 private: uint32_t id;
567 private:
static uint32_t visualIdCount;