Specialization of the BodyTrait class template for the 'hierarchical hash-grid' algorithm.
This specialization of the BodyTrait class template adapts rigid bodies to the hierarchical hash-grid coarse collision detection algorithm.
#include <HashGridsBodyTrait.h>
Public Member Functions | |
Get functions | |
void * | getGrid () const |
Returns the grid the rigid body is currently assigned to. More... | |
size_t | getHash () const |
Returns the current hash value of the rigid body. More... | |
size_t | getCellId () const |
Returns the current body container index within the cell the body is currently assigned to. More... | |
Set functions | |
void | setGrid (void *grid) |
Setting the grid the rigid body is associated with. More... | |
void | setHash (size_t hash) |
Setting the hash value of the rigid body. More... | |
void | setCellId (size_t cell) |
Setting the body container index within the cell the body is currently assigned to. More... | |
Protected Member Functions | |
Constructor | |
HashGridsBodyTrait () | |
Constructor for the BodyTrait<HashGrids> specialization. More... | |
Protected Attributes | |
Member variables | |
void * | grid_ |
Pointer to the hash grid this rigid body is currently assigned to. More... | |
size_t | hash_ |
Current hash value of this rigid body. More... | |
size_t | cellId_ |
The body's index in the body container of the grid cell this rigid body is currently assigned to. More... | |
|
inlineexplicitprotected |
Constructor for the BodyTrait<HashGrids> specialization.
body | The rigid body containing this bounding box. |
|
inline |
Returns the current body container index within the cell the body is currently assigned to.
|
inline |
Returns the grid the rigid body is currently assigned to.
|
inline |
Returns the current hash value of the rigid body.
|
inline |
Setting the body container index within the cell the body is currently assigned to.
cell | The new body container index. |
|
inline |
Setting the grid the rigid body is associated with.
grid | The grid the rigid body is assigned to. |
|
inline |
Setting the hash value of the rigid body.
hash | The new hash value of the rigid body. |
|
protected |
The body's index in the body container of the grid cell this rigid body is currently assigned to.
|
protected |
Pointer to the hash grid this rigid body is currently assigned to.
|
protected |
Current hash value of this rigid body.