35 #include <OgreSceneManager.h> 36 #include <OgreSubEntity.h> 37 #include <OgreMaterialManager.h> 38 #include <OgreTextureManager.h> 39 #include <OgreTechnique.h> 40 #include <OgreAnimation.h> 45 namespace fs = boost::filesystem;
53 m_sceneManager(args.sceneManager)
58 Ogre::Vector3 scale(1,1,1);
60 R_do = Ogre::Matrix3(1,0,0,
86 m_sceneNode->setScale(scalingFactor, scalingFactor, scalingFactor);
120 R_do = Ogre::Matrix3(c,-s,0,
218 Ogre::Vector3 bottomLeft(0, -w, 0), bottomRight(0, 0, 0), topLeft(0, -w, h), topRight(0, 0, h);
252 Ogre::Vector3 offset = Ogre::Vector3(0,-
m_width,0);
253 double factor = 5.0 * M_PI/180.0;
254 double lines_per_angle = ceil(
m_oangle / factor);
255 double angle_dec = 0;
258 for (
int i=0; i < lines_per_angle; i++) {
259 Ogre::Vector3 start_v = offset;
260 Ogre::Vector3 end_v = offset;
261 double s_theta = sin(sign * angle_dec);
262 double c_theta = cos(sign * angle_dec);
263 Ogre::Matrix3 R_start = Ogre::Matrix3(c_theta,-s_theta,0,
267 s_theta = sin(sign * angle_dec);
268 c_theta = cos(sign * angle_dec);
269 Ogre::Matrix3 R_end = Ogre::Matrix3(c_theta,-s_theta,0,
272 start_v = R_start * start_v;
273 end_v = R_end * end_v;
Ogre::SceneManager * m_sceneManager
virtual void setScalingFactor(double scalingFactor)
virtual void setOpeningAngle(double oangle, bool clockwise)
void addPoint(const Ogre::Vector3 &point)
Ogre::SceneNode * m_parentSceneNode
void setVisible(bool visible)
virtual Ogre::Matrix3 getRotationMat()
virtual void setHeight(double height)
DoorVisual(const DoorVisualDefaultArgs &args)
Ogre::SceneNode * parentNode
virtual ~BoundingBoxDoorVisual()
virtual void setWidth(double width)
virtual void update(float deltaTime)
const Ogre::Vector3 & getPosition() const
virtual void setPosition(const Ogre::Vector3 &position)
rviz::BillboardLine * m_baseframe
virtual void setColor(float r, float g, float b, float a)
virtual double getHeight()
Ogre::SceneNode * m_sceneNode
rviz::BillboardLine * m_wireframe
virtual void setColor(const Ogre::ColourValue &c)
virtual void setLineWidth(double lineWidth)
virtual void generateWireframe()
void setNumLines(uint32_t num)
void setMaxPointsPerLine(uint32_t max)
TFSIMD_FORCE_INLINE const tfScalar & w() const
void setPosition(const Ogre::Vector3 &position)
const Ogre::Quaternion & getOrientation() const
Ogre::ColourValue m_color
void setOrientation(const Ogre::Quaternion &orientation)
Ogre::SceneNode * getParentSceneNode()
BoundingBoxDoorVisual(const DoorVisualDefaultArgs &args, double height=1.75, double width=0.6, double scalingFactor=1.0)
virtual Ogre::ColourValue & getColor()
virtual void generateBaseframe()
void setLineWidth(float width)
Base class for all person visualization types.