Grip-Reloaded
Grip version visualizaiton interface for DART (DynamicAnimationandRoboticsToolkits)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Member Functions | Protected Attributes
osgGolems::Line Class Reference

Class that subclasses osg::Geode to create x,y,z axes. More...

#include <Line.h>

List of all members.

Public Member Functions

 Line (lineType_t lineType, float length=0.5f, float width=3)
 Constructs a line object.
std::string lineTypeToString (lineType_t lineType)
 Converts enum to string for lineType enum.
void setLength (float length)
 Sets the length of the line.
void setWidth (float width)
 Sets the width of the line.
void setColor (const osg::Vec4 &newColor)
 Sets the color of the line.

Protected Member Functions

void _createLine ()
 Creates line vertices depending on the line type specified by the user.

Protected Attributes

osg::Vec3Array * _verts
 Array of vertices.
osg::Vec4Array * _color
 Array of colors. Only holds one color.
osg::LineWidth * _lineWidth
 Line width object for specifying the width of the line.
const lineType_t _lineType
 Linetype enum constant which is set by the user upon construction.

Detailed Description

Class that subclasses osg::Geode to create x,y,z axes.


Constructor & Destructor Documentation

osgGolems::Line::Line ( lineType_t  lineType,
float  length = 0.5f,
float  width = 3 
) [inline]

Constructs a line object.

Parameters:
lineTypeType of line to create, specified by lineType_t
lengthLength of the line in meter
widthWidth of the line. Normal values are between 1 and 10

Member Function Documentation

void osgGolems::Line::_createLine ( ) [inline, protected]

Creates line vertices depending on the line type specified by the user.

Returns:
void
std::string osgGolems::Line::lineTypeToString ( lineType_t  lineType) [inline]

Converts enum to string for lineType enum.

Parameters:
lineTypelineType enum to convert to a string
Returns:
std::string representing the lineType enum
void osgGolems::Line::setColor ( const osg::Vec4 &  newColor) [inline]

Sets the color of the line.

Parameters:
newColorosg::Vec4 reference representing the desired color of the line in rgba format in range (0,1)
Returns:
void
void osgGolems::Line::setLength ( float  length) [inline]

Sets the length of the line.

Parameters:
lengthA float representing the desired length of the line
Returns:
void
void osgGolems::Line::setWidth ( float  width) [inline]

Sets the width of the line.

Parameters:
widthfloat representing the desired width of the line
Returns:
void

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator