MIRA
Classes | Public Member Functions | Protected Attributes | List of all members
LineStripObject Class Reference

Renders one or more line strips. More...

#include <visualization/3d/LineStripObject.h>

Inheritance diagram for LineStripObject:
Inheritance graph
[legend]

Public Member Functions

 LineStripObject (Ogre::SceneManager *sceneManager, Ogre::SceneNode *parent=NULL)
 
virtual ~LineStripObject ()
 
virtual void setColor (const Ogre::ColourValue &color)
 Resets the color of all elements of the line (overwriting all possible individual colors of the line points) More...
 
virtual void setVisible (bool visible, bool cascade=true)
 
bool isVisible () const
 
void enableAlphaBlending (bool useAlpha=true)
 Enables/disables alpha blending. More...
 
void setLineWidth (float width)
 Sets the width of the line. More...
 
void clear ()
 Clears all line strips and points. More...
 
void begin ()
 Starts a new line strip. More...
 
void end ()
 Finishes the current line strip. More...
 
void point (const Ogre::Vector3 &point)
 Adds another point to the current line strip. This must be called between a call to begin() and end(). More...
 
void point (const Ogre::Vector3 &point, const Ogre::ColourValue &color)
 Adds another point with the specified color to the current line strip. This must be called between a call to begin() and end(). More...
 
void add (const Ogre::Vector3 &point)
 Adds another point to the last line strip. More...
 
void add (const Ogre::Vector3 &point, const Ogre::ColourValue &color)
 Adds another point to the last line strip. More...
 
void addLine (const Ogre::Vector3 &p1, const Ogre::Vector3 &p2)
 Adds a line (a line strip consiting of two points) More...
 
void addLine (const Ogre::Vector3 &p1, const Ogre::Vector3 &p2, const Ogre::ColourValue &color)
 Adds a line with the specified color. More...
 
virtual void setScale (const Ogre::Vector3 &scale)
 
virtual void setScale (const Eigen::Vector3f &scale)
 
virtual void setPosition (const Ogre::Vector3 &position)
 
virtual void setPosition (const Eigen::Vector3f &position)
 
virtual void setOrientation (const Ogre::Quaternion &orientation)
 
virtual void setOrientation (const Eigen::Quaternionf &orientation)
 
virtual void setColor (Color::RGBA color)
 
virtual void setTransform (const RigidTransform2f &transform)
 
virtual void setTransform (const RigidTransform3f &transform)
 
Ogre::SceneNode * getNode ()
 

Protected Attributes

Ogre::SceneManager * mSceneManager
 
Ogre::SceneNode * mNode
 

Detailed Description

Renders one or more line strips.

This class supports lines whose width is larger than one pixel (in contrast to Ogre's build-in line strip support). If the line width is set to 0 or negative, a one pixel wide line is rendered. A new line strip can be added by calling the begin() method, followed by several calls to point() in order to add points to the strip. Finally, the strip must be finished by calling the end() method. All line strips can be cleared using the clear() method. The class also provides support for line lists, which can be produced by creating multiple line strips consisting of two points only, or by using the addLine() methods.

Constructor & Destructor Documentation

◆ LineStripObject()

LineStripObject ( Ogre::SceneManager *  sceneManager,
Ogre::SceneNode *  parent = NULL 
)

◆ ~LineStripObject()

virtual ~LineStripObject ( )
virtual

Member Function Documentation

◆ setColor() [1/2]

virtual void setColor ( const Ogre::ColourValue &  color)
virtual

Resets the color of all elements of the line (overwriting all possible individual colors of the line points)

Reimplemented from VisualizationObject.

◆ setVisible()

virtual void setVisible ( bool  visible,
bool  cascade = true 
)
virtual

Reimplemented from VisualizationObject.

◆ isVisible()

bool isVisible ( ) const
inline

◆ enableAlphaBlending()

void enableAlphaBlending ( bool  useAlpha = true)

Enables/disables alpha blending.

◆ setLineWidth()

void setLineWidth ( float  width)

Sets the width of the line.

If width <= 0 a one pixel wide line will be shown.

◆ clear()

void clear ( )

Clears all line strips and points.

◆ begin()

void begin ( )

Starts a new line strip.

◆ end()

void end ( )

Finishes the current line strip.

◆ point() [1/2]

void point ( const Ogre::Vector3 &  point)

Adds another point to the current line strip. This must be called between a call to begin() and end().

◆ point() [2/2]

void point ( const Ogre::Vector3 &  point,
const Ogre::ColourValue &  color 
)

Adds another point with the specified color to the current line strip. This must be called between a call to begin() and end().

◆ add() [1/2]

void add ( const Ogre::Vector3 &  point)

Adds another point to the last line strip.

This method can be called outside of begin() and end(), but will be much slower than the begin()-point()...-end() procedure described above.

◆ add() [2/2]

void add ( const Ogre::Vector3 &  point,
const Ogre::ColourValue &  color 
)

Adds another point to the last line strip.

This method can be called outside of begin() and end(), but will be much slower than the begin()-point()...-end() procedure described above.

◆ addLine() [1/2]

void addLine ( const Ogre::Vector3 &  p1,
const Ogre::Vector3 &  p2 
)

Adds a line (a line strip consiting of two points)

◆ addLine() [2/2]

void addLine ( const Ogre::Vector3 &  p1,
const Ogre::Vector3 &  p2,
const Ogre::ColourValue &  color 
)

Adds a line with the specified color.

◆ setScale() [1/2]

virtual void setScale ( const Ogre::Vector3 &  scale)
virtualinherited

◆ setScale() [2/2]

virtual void setScale ( const Eigen::Vector3f &  scale)
virtualinherited

◆ setPosition() [1/2]

virtual void setPosition ( const Ogre::Vector3 &  position)
virtualinherited

◆ setPosition() [2/2]

virtual void setPosition ( const Eigen::Vector3f &  position)
virtualinherited

◆ setOrientation() [1/2]

virtual void setOrientation ( const Ogre::Quaternion &  orientation)
virtualinherited

◆ setOrientation() [2/2]

virtual void setOrientation ( const Eigen::Quaternionf orientation)
virtualinherited

◆ setColor() [2/2]

virtual void setColor ( Color::RGBA  color)
inlinevirtualinherited

◆ setTransform() [1/2]

virtual void setTransform ( const RigidTransform2f transform)
virtualinherited

◆ setTransform() [2/2]

virtual void setTransform ( const RigidTransform3f transform)
virtualinherited

◆ getNode()

Ogre::SceneNode* getNode ( )
inlineinherited

Member Data Documentation

◆ mSceneManager

Ogre::SceneManager* mSceneManager
protectedinherited

◆ mNode

Ogre::SceneNode* mNode
protectedinherited

The documentation for this class was generated from the following file: