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

- Class List
- Class Hierarchy
- Class Members

# col::Request Struct Reference

Each request from the application is encapsulated by an instance of this class. More...

Collaboration diagram for col::Request:

[legend]
List of all members.

## Public Member Functions
| Request (RequestE req, Callback *callback)
| Create a "two objects request".
| Request (RequestE req, osg::NodePtr node)
void | operator= (const Request &source)
void | process (bool show_hulls, AlgoE algo, Matrix *colmatrix, std::vector< ColObj > *colobjs, std::vector< Callback * > cycle_callbacks, bool useHulls, Grid *grid)
| Process a request to the collision detection module.
const char * | getName (void) const
## Public Attributes
RequestE | req
osg::GeometryPtr | geom
osg::NodePtr | node
Callback * | callback
## Static Public Attributes
static const char * | Names []

## Detailed Description

Each request from the application is encapsulated by an instance of this class.

In order for the CollisionPipeline to be able to run in parallel to the main ailpcation, requests (such as "register an object") must be queued. This class aides that.

## Constructor & Destructor Documentation

Request::Request | ( | RequestE | inreq,
|  | Callback * | incallback |
| ) |  |  |

Create a "two objects request".

Parameters:

  | inreq | the request (ADD_OBJECT,ACTIVATE_OBJECT)
  | incallback | a collision callback

Precondition:
  callback should be valid.

Warning:
  The constructor does not check if the objects in callback have already been registered with the collision detection module.

Exceptions:

  | XCollision | If the type of request is not a two object request.
  | XCollision | If callback seems to be improperly constructed.

## Member Function Documentation

void Request::process | ( | bool | show_hulls,
|  | AlgoE | algo,
|  | Matrix * | collmatrix,
|  | std::vector< ColObj > * | colobjs,
|  | std::vector< Callback * > | cycle_callbacks,
|  | bool | useHulls,
|  | Grid * | grid |
| ) |  |  |

Process a request to the collision detection module.

Warning:
  This function probably runs in a different thread than the constructor!

Todo:
  - Some types not yet implementated.
  - process()const machen, wenn OSG erlaubt
  - `show_hulls` anders (z.B. als define) implementieren

## Member Data Documentation

const char * Request::Names`[static]`

Initial value:

    {
        "Add object",
        "Add callback",
        "Remove callback",
        "Activate object",
        "Deactivate object",
        "Add cycle callback"
    }

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

- ColRequest.h
- ColRequest.cpp