Robot Simulator of the Robotics Group for Self-Organization of Control: Ray Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Ray Class Reference

Ray primitive The actual visual representation can have different length than the ray object. More...

`#include <primitive.h>`

Inherits Primitive.

Inheritance diagram for Ray:

[legend]
Collaboration diagram for Ray:

[legend]
List of all members.

## Public Member Functions
| Ray (double range, float thickness, float length)
virtual | ~Ray ()
virtual void | init (const OdeHandle &odeHandle, double mass, const OsgHandle &osgHandle, char mode=Geom|Draw)
| registers primitive in ODE and OSG.
void | setLength (float len)
virtual void | update ()
| Updates the OSG nodes with ODE coordinates.
virtual OSGPrimitive * | getOSGPrimitive ()
| returns the assoziated osg primitive if there or 0
virtual void | setMass (double mass)
| sets the mass of the body (uniform)
## Protected Attributes
double | range
float | thickness
float | length
OSGBox * | osgbox

## Detailed Description

Ray primitive The actual visual representation can have different length than the ray object.

This is specified by length. SetLength is an efficient way to change the length at runtime.

## Constructor & Destructor Documentation

Ray | ( | double | range,
|  | float | thickness,
|  | float | length |
| ) |  |  |

~Ray | ( |  | ) | `[virtual]`

## Member Function Documentation

OSGPrimitive * getOSGPrimitive | ( |  | ) | `[virtual]`

returns the assoziated osg primitive if there or 0

Implements Primitive.

void init | ( | const OdeHandle & | odeHandle,
|  | double | mass,
|  | const OsgHandle & | osgHandle,
|  | char | mode = `Geom|Draw` |
| ) |  |  | `[virtual]`

registers primitive in ODE and OSG.

Parameters:

  | osgHandle | scruct with ODE variables inside (to specify space, world...)
  | mass | Mass of the object in ODE (if withBody = true)
  | osgHandle | scruct with OSG variables inside (scene node, color ...)
  | mode | is a conjuction of Modes.

Implements Primitive.

void setLength | ( | float | len | ) |

void setMass | ( | double | mass | ) | `[virtual]`

sets the mass of the body (uniform)

Implements Primitive.

void update | ( |  | ) | `[virtual]`

Updates the OSG nodes with ODE coordinates.

This function must be overloaded (usually calls setMatrix of OsgPrimitives)

Implements Primitive.

## Member Data Documentation

float length`[protected]`

OSGBox* osgbox`[protected]`

double range`[protected]`

float thickness`[protected]`

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

- primitive.h
- primitive.cpp