walberla::pe::ccd::HashGridsBodyTrait Class Reference

Detailed Description

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>

+ Inheritance diagram for walberla::pe::ccd::HashGridsBodyTrait:

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...
 

Constructor & Destructor Documentation

◆ HashGridsBodyTrait()

walberla::pe::ccd::HashGridsBodyTrait::HashGridsBodyTrait ( )
inlineexplicitprotected

Constructor for the BodyTrait<HashGrids> specialization.

Parameters
bodyThe rigid body containing this bounding box.

Member Function Documentation

◆ getCellId()

size_t walberla::pe::ccd::HashGridsBodyTrait::getCellId ( ) const
inline

Returns the current body container index within the cell the body is currently assigned to.

Returns
The current body container index.

◆ getGrid()

void * walberla::pe::ccd::HashGridsBodyTrait::getGrid ( ) const
inline

Returns the grid the rigid body is currently assigned to.

Returns
The grid the rigid body is currently assigned to.

◆ getHash()

size_t walberla::pe::ccd::HashGridsBodyTrait::getHash ( ) const
inline

Returns the current hash value of the rigid body.

Returns
The current hash value of the rigid body.

◆ setCellId()

void walberla::pe::ccd::HashGridsBodyTrait::setCellId ( size_t  cell)
inline

Setting the body container index within the cell the body is currently assigned to.

Parameters
cellThe new body container index.
Returns
void

◆ setGrid()

void walberla::pe::ccd::HashGridsBodyTrait::setGrid ( void *  grid)
inline

Setting the grid the rigid body is associated with.

Parameters
gridThe grid the rigid body is assigned to.
Returns
void

◆ setHash()

void walberla::pe::ccd::HashGridsBodyTrait::setHash ( size_t  hash)
inline

Setting the hash value of the rigid body.

Parameters
hashThe new hash value of the rigid body.
Returns
void

Member Data Documentation

◆ cellId_

size_t walberla::pe::ccd::HashGridsBodyTrait::cellId_
protected

The body's index in the body container of the grid cell this rigid body is currently assigned to.

◆ grid_

void* walberla::pe::ccd::HashGridsBodyTrait::grid_
protected

Pointer to the hash grid this rigid body is currently assigned to.

◆ hash_

size_t walberla::pe::ccd::HashGridsBodyTrait::hash_
protected

Current hash value of this rigid body.


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