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

# OdeHandle Class Reference

Data structure for accessing the ODE. More...

`#include <odehandle.h>`

Collaboration diagram for OdeHandle:
[legend]

List of all members.

## Public Member Functions
| OdeHandle ()
| OdeHandle (dWorldID _world, dSpaceID _space, dJointGroupID _jointGroup)
void | init (double *time)
| creates world at global space and so on and sets global time pointer.
void | close ()
| deletes the world and global data
void | createNewSimpleSpace (dSpaceID parentspace, bool ignore_inside_collisions)
| use this function to create a new space with optional ignored collisions, use deleteSpace to destroy it
void | createNewHashSpace (dSpaceID parentspace, bool ignore_inside_collisions)
| like createNewSimpleSpace but with a HashSpace.
void | deleteSpace ()
| destroys the space and unregisters them in the global lists
void | addSpace (dSpaceID g)
| adds a space to the list of spaces for collision detection (ignored spaces do not need to be insered)
void | removeSpace (dSpaceID g)
| removes a space from the list of ignored spaces for collision detection
void | destroySpaces ()
| deletes all associated memory objects, handle with care - use only when program exits
const std::vector< dSpaceID > & | getSpaces ()
| returns list of all spaces (as vector for parallelisation
double | getTime ()
void | addIgnoredPair (dGeomID g1, dGeomID g2)
| adds a pair of geoms to the list of ignored geom pairs for collision detection
void | addIgnoredPair (Primitive *p1, Primitive *p2)
| like addIgnoredPair(dGeomID g1, dGeomID g2) just with primitives (provided for convinience)
void | removeIgnoredPair (dGeomID g1, dGeomID g2)
| removes pair of geoms from the list of ignored geom pairs for collision detection
void | removeIgnoredPair (Primitive *p1, Primitive *p2)
| like removeIgnoredPair(dGeomID g1, dGeomID g2) just with primitives (provided for convinience)
bool | isIgnoredPair (dGeomID g1, dGeomID g2) const
| checks whether a pair of geoms is an ignored pair for collision detection
## Public Attributes
dWorldID | world
dSpaceID | space
dJointGroupID | jointGroup
Substance | substance
## Protected Attributes
double * | time
std::vector< dSpaceID > * | spaces
| list of spaces, except ignored spaces
HashSet< long > * | ignoredSpaces
| set of ignored spaces
HashSet< std::pair< long, long > , geomPairHash > * | ignoredPairs
| set of ignored geom pairs for collision

## Detailed Description

Data structure for accessing the ODE.

Examples:

  template_sphererobot/main.cpp.

## Constructor & Destructor Documentation

OdeHandle | ( |  | ) |

OdeHandle | ( | dWorldID | _world,
|  | dSpaceID | _space,
|  | dJointGroupID | _jointGroup |
| ) |  |  |

## Member Function Documentation

void addIgnoredPair | ( | Primitive * | p1,
|  | Primitive * | p2 |
| ) |  |  |

like addIgnoredPair(dGeomID g1, dGeomID g2) just with primitives (provided for convinience)

void addIgnoredPair | ( | dGeomID | g1,
|  | dGeomID | g2 |
| ) |  |  |

adds a pair of geoms to the list of ignored geom pairs for collision detection

void addSpace | ( | dSpaceID | g | ) |

adds a space to the list of spaces for collision detection (ignored spaces do not need to be insered)

void close | ( |  | ) |

deletes the world and global data

void createNewHashSpace | ( | dSpaceID | parentspace,
|  | bool | ignore_inside_collisions |
| ) |  |  |

like createNewSimpleSpace but with a HashSpace.

More efficient for large objects

void createNewSimpleSpace | ( | dSpaceID | parentspace,
|  | bool | ignore_inside_collisions |
| ) |  |  |

use this function to create a new space with optional ignored collisions, use deleteSpace to destroy it

All primitives initialised with this handle are within this space.

void deleteSpace | ( |  | ) |

destroys the space and unregisters them in the global lists

void destroySpaces | ( |  | ) |

deletes all associated memory objects, handle with care - use only when program exits

const std::vector< dSpaceID > & getSpaces | ( |  | ) |

returns list of all spaces (as vector for parallelisation

double getTime | ( |  | ) | `[inline]`

void init | ( | double * | time | ) |

creates world at global space and so on and sets global time pointer.

bool isIgnoredPair | ( | dGeomID | g1,
|  | dGeomID | g2 |
| ) |  |  | const`[inline]`

checks whether a pair of geoms is an ignored pair for collision detection

void removeIgnoredPair | ( | Primitive * | p1,
|  | Primitive * | p2 |
| ) |  |  |

like removeIgnoredPair(dGeomID g1, dGeomID g2) just with primitives (provided for convinience)

void removeIgnoredPair | ( | dGeomID | g1,
|  | dGeomID | g2 |
| ) |  |  |

removes pair of geoms from the list of ignored geom pairs for collision detection

void removeSpace | ( | dSpaceID | g | ) |

removes a space from the list of ignored spaces for collision detection

## Member Data Documentation

HashSet<std::pair<long,long>, geomPairHash >* ignoredPairs`[protected]`

set of ignored geom pairs for collision

HashSet<long>* ignoredSpaces`[protected]`

set of ignored spaces

dJointGroupID jointGroup

dSpaceID space

std::vector<dSpaceID>* spaces`[protected]`

list of spaces, except ignored spaces

Substance substance

double* time`[protected]`

dWorldID world

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

- odehandle.h
- odehandle.cpp