34 #include <OGRE/OgreVector3.h> 35 #include <OGRE/OgreSceneNode.h> 36 #include <OGRE/OgreSceneManager.h> 37 #include <OGRE/OgreEntity.h> 38 #include <OGRE/OgreMeshManager.h> 46 Ogre::Plane imagePlane;
47 imagePlane.normal = Ogre::Vector3::UNIT_Z;
50 Ogre::MeshManager::getSingleton().createPlane(
"imagePlane",
51 Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
56 Ogre::Vector3::UNIT_X);
59 Ogre::MaterialPtr planeMaterial = Ogre::MaterialManager::getSingleton().create(
"imagePlaneMaterial", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
60 planeMaterial->setCullingMode(Ogre::CULL_NONE);
61 planeMaterial->setSceneBlending(Ogre::SBT_REPLACE);
62 planeMaterial->setReceiveShadows(
false);
63 planeMaterial->getTechnique(0)->setLightingEnabled(
false);
65 Ogre::TextureUnitState *tu = planeMaterial->getTechnique(0)->getPass(0)->createTextureUnitState();
66 tu->setTextureName(
"textures/marker_rect_icon.png");
67 tu->setTextureFiltering(Ogre::TFO_NONE);
68 tu->setAlphaOperation(Ogre::LBX_SOURCE1, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, 0.0);
75 Marker::Marker(Ogre::SceneManager *scene_manager, Ogre::SceneNode *parent_node,
int id)
76 :
rviz::Object(scene_manager) {
void setUserData(const Ogre::Any &data)
virtual const Ogre::Quaternion & getOrientation()
virtual void setOrientation(const Ogre::Quaternion &orientation)
Ogre::SceneNode * text_node_
virtual void setScale(const Ogre::Vector3 &scale)
void setShowLabel(bool showLabel)
Ogre::Entity * markerEntity_
rviz::MovableText * text_
Marker(Ogre::SceneManager *scene_manager, Ogre::SceneNode *parent_node=0, int id=-1)
void setTextAlignment(const HorizontalAlignment &horizontalAlignment, const VerticalAlignment &verticalAlignment)
void setShowMarker(bool showMarker)
virtual const Ogre::Vector3 & getPosition()
void setColor(const Ogre::ColourValue &color)
Ogre::SceneNode * markerNode_
void setShowAxes(bool showAxes)
Ogre::SceneManager * scene_manager_
Ogre::SceneNode * getSceneNode()
void setUserData(const Ogre::Any &data)
virtual void setPosition(const Ogre::Vector3 &position)
void setColorLabel(Ogre::ColourValue color)
static MarkerResources static_resources_
virtual void setColor(float r, float g, float b, float a)
Ogre::SceneNode * scene_node_