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 | Static Protected Attributes
osgGolems::Grid Class Reference

Class for creating an OpenSceneGraph osg::Geomtry grid of user-specified width, depth and grid square size. More...

#include <Grid.h>

List of all members.

Public Member Functions

 Grid (uint width, uint depth, uint gridSize, const osg::Vec4 &color)
 Constructor for Grid class.
 ~Grid ()
 Destructor for Grid classs.
void setGridColor (const osg::Vec4 &color)

Protected Member Functions

void _createVertices (uint width, uint depth, uint gridSize)
 Creates vertices around the perimeter of the grid according to the width, depth and grid size specified by the user.
void _drawGrid (const osg::Vec4 &color)
 Draw the lines in between the previously created vertices.
uint _makeEven (uint num)
 Makes input number even if odd and does nothing if number is even. It modifies the input number by reference.

Protected Attributes

osg::ref_ptr< osg::Vec3Array > _verts
 Array of vertices corresponding to grid line endpoints.
osg::ref_ptr< osg::Vec4Array > _colors
 Array of colors corresponding to grid line colors.

Static Protected Attributes

static const uint maxLength = 500
 Maximum grid perimeter side length.

Detailed Description

Class for creating an OpenSceneGraph osg::Geomtry grid of user-specified width, depth and grid square size.


Constructor & Destructor Documentation

Grid::Grid ( uint  width,
uint  depth,
uint  gridSize,
const osg::Vec4 &  color 
)

Constructor for Grid class.

Parameters:
widthWidth of the grid.
depthDepth of the grid.
gridSizeLength of a side of each grid square.
colorColor of the grid lines
Returns:
void

Member Function Documentation

void Grid::_createVertices ( uint  width,
uint  depth,
uint  gridSize 
) [protected]

Creates vertices around the perimeter of the grid according to the width, depth and grid size specified by the user.

Parameters:
widthWidth of the grid.
depthDepth of the grid.
gridSizeLength of a side of each grid square.
Returns:
void
void Grid::_drawGrid ( const osg::Vec4 &  color) [protected]

Draw the lines in between the previously created vertices.

Returns:
void
uint Grid::_makeEven ( uint  num) [protected]

Makes input number even if odd and does nothing if number is even. It modifies the input number by reference.

Parameters:
numInteger to make even.
Returns:
void

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