34 #include <OgreSceneNode.h> 35 #include <OgreSceneManager.h> 36 #include <OgreManualObject.h> 37 #include <OgreMaterialManager.h> 38 #include <OgreTechnique.h> 42 Line::Line(Ogre::SceneManager* manager, Ogre::SceneNode* parent_node) :
Object(manager)
46 parent_node = manager->getRootSceneNode();
53 ss <<
"LineMaterial" << count++;
130 setColor(Ogre::ColourValue(r, g, b, a));
void setUserData(const Ogre::Any &data) override
Set the user data on this object.
void setScale(const Ogre::Vector3 &scale) override
Set the scale of the object. Always relative to the identity orientation of the object.
Ogre::SceneNode * scene_node_
Base class for visible objects, providing a minimal generic interface.
Ogre::MaterialPtr manual_object_material_
void setOrientation(const Ogre::Quaternion &orientation) override
Set the orientation of the object.
const Ogre::Vector3 & getPosition() override
Get the local position of this object.
void setPoints(Ogre::Vector3 start, Ogre::Vector3 end)
Set the start and end point of the line.
const Ogre::Quaternion & getOrientation() override
Get the local orientation of this object.
Ogre::ManualObject * manual_object_
void setColor(float r, float g, float b, float a) override
Set the color of the object. Values are in the range [0, 1].
Ogre::SceneManager * scene_manager_
Ogre scene manager this object is part of.
Line(Ogre::SceneManager *manager, Ogre::SceneNode *parent_node=nullptr)
Constructor.
void setVisible(bool visible)
void setPosition(const Ogre::Vector3 &position) override
Set the position of this object.