Go to the documentation of this file.
30 #include <OgrePlane.h>
32 #include <OgreSceneNode.h>
33 #include <OgreViewport.h>
63 setStatus(
"Click and drag mouse to set position/orientation.");
80 Ogre::Vector3 intersection;
81 Ogre::Plane ground_plane(Ogre::Vector3::UNIT_Z, 0.0
f);
91 else if (event.
type == QEvent::MouseMove && event.
left())
96 Ogre::Vector3 cur_pos;
97 Ogre::Plane ground_plane(Ogre::Vector3::UNIT_Z, 0.0
f);
100 double angle = atan2(cur_pos.y -
pos_.y, cur_pos.x -
pos_.x);
106 Ogre::Quaternion orient_x =
107 Ogre::Quaternion(Ogre::Radian(-Ogre::Math::HALF_PI), Ogre::Vector3::UNIT_Y);
120 Ogre::Vector3 cur_pos;
121 Ogre::Plane ground_plane(Ogre::Vector3::UNIT_Z, 0.0
f);
124 double angle = atan2(cur_pos.y -
pos_.y, cur_pos.x -
pos_.x);
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
An arrow consisting of a cylinder and a cone.
void setOrientation(const Ogre::Quaternion &orientation) override
Set the orientation.
bool getPointOnPlaneFromWindowXY(Ogre::Viewport *viewport, Ogre::Plane &plane, int window_x, int window_y, Ogre::Vector3 &intersection_out)
Given a viewport and an x,y position in window-pixel coordinates, find the point on a plane directly ...
Ogre::Viewport * viewport
void setPosition(const Ogre::Vector3 &position) override
Set the position of the base of the arrow.
Ogre::SceneNode * getSceneNode()
Get the scene node associated with this arrow.
void setColor(float r, float g, float b, float a) override
Set the color of this arrow. Sets both the head and shaft color to the same value....
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:10