31 #ifndef PERSON_VISUAL_H 32 #define PERSON_VISUAL_H 37 #include <OgreSceneNode.h> 38 #include <OgreAnimation.h> 39 #include <OgreSharedPtr.h> 40 #include <OgreEntity.h> 43 #include <boost/algorithm/string/predicate.hpp> 44 #include <boost/filesystem.hpp> 46 namespace fs = boost::filesystem;
57 PersonVisualDefaultArgs(Ogre::SceneManager* sceneManager, Ogre::SceneNode* parentNode) : sceneManager(sceneManager), parentNode(parentNode) {}
69 void setPosition(
const Ogre::Vector3& position);
71 const Ogre::Vector3& getPosition()
const;
73 void setOrientation(
const Ogre::Quaternion& orientation);
75 const Ogre::Quaternion& getOrientation()
const;
77 virtual void setScalingFactor(
double scalingFactor);
79 void setVisible(
bool visible);
81 Ogre::SceneNode* getParentSceneNode();
83 virtual void update(
float deltaTime);
85 virtual void setColor(
const Ogre::ColourValue& c) = 0;
87 virtual Ogre::ColourValue& getColor() = 0;
89 virtual double getHeight() = 0;
104 virtual Ogre::DataStreamPtr resourceLoading(
const Ogre::String &name,
const Ogre::String &group, Ogre::Resource *resource);
106 virtual void resourceStreamOpened(
const Ogre::String &name,
const Ogre::String &group, Ogre::Resource *resource, Ogre::DataStreamPtr& dataStream);
108 virtual bool resourceCollision(Ogre::Resource *resource, Ogre::ResourceManager *resourceManager);
122 virtual void setColor(
const Ogre::ColourValue& c);
124 virtual Ogre::ColourValue& getColor();
126 virtual double getHeight();
139 virtual void setColor(
const Ogre::ColourValue& c);
141 virtual Ogre::ColourValue& getColor();
143 virtual double getHeight();
152 virtual void generateWireframe();
156 double m_width, m_height, m_scalingFactor, m_lineWidth;
174 virtual void update(
float deltaTime);
176 virtual void setColor(
const Ogre::ColourValue& c);
178 virtual Ogre::ColourValue& getColor();
180 void setAnimationState(
const std::string& nameOfAnimationState);
182 void setWalkingSpeed(
float walkingSpeed);
195 #endif // PERSON_VISUAL_H Visualization of a person as a mesh (walking human)
rviz::Shape * m_headShape
Ogre::AnimationState * m_animationState
Ogre::ColourValue m_color
Ogre::SceneManager * m_sceneManager
virtual double getHeight()
void update(const std::string &key, const XmlRpc::XmlRpcValue &v)
Ogre::SceneNode * m_childSceneNode
Ogre::SceneNode * m_sceneNode
Ogre::SceneManager * sceneManager
rviz::BillboardLine * m_wireframe
Visualization of a person as a wireframe bounding box.
std::set< Ogre::MaterialPtr > materials_
PersonVisualDefaultArgs(Ogre::SceneManager *sceneManager, Ogre::SceneNode *parentNode)
Visualization of a person as cylinder (body) + sphere (head)
Ogre::SceneNode * parentNode
resource_retriever::MemoryResource _lastResource
const fs::path & _parentPath
virtual void setScalingFactor(double scalingFactor)
Base class for all person visualization types.
virtual void setLineWidth(double lineWidth)=0