This class is a storage component for storing collision/contact data information.
More...
#include <ContactDataMap.hpp>
|
| ContactDataMap () |
| Constructor.
|
|
virtual | ~ContactDataMap () |
| Destructor.
|
|
void | add (const std::string &name, const std::string &desc) |
| add an object type to the contact data map and associates it with a description. More...
|
|
int | getDataID (const std::string &objType) const |
| converts a string of object type name to an int identifier. More...
|
|
const std::string & | getObjectTypeName (int id) const |
| Get name of object type with id. More...
|
|
const std::vector< std::string > & | getObjectTypes () |
| Get a list of all object types. More...
|
|
std::string | getDesctiption (const std::string &matId) |
| Get Object Description. More...
|
|
int | getMaxID () const |
| Get the maximum id. More...
|
|
void | addNewtonData (const std::string &nameA, const std::string &nameB, const NewtonData &data) |
| adds newton data description to the collision between nameA and nameB if any data already exists it will be overwritten.
|
|
void | setNewtonData (const std::string &nameA, const std::string &nameB, double restitution) |
| Set the restitution coefficient for the collision between nameA and nameB. More...
|
|
void | addChatterjeeData (const std::string &nameA, const std::string &nameB, const ChatterjeeData &data) |
| adds chatterjee data description to the collision between nameA and nameB if any data already exists it will be overwritten.
|
|
const NewtonData & | getNewtonData (const std::string &nameA, const std::string &nameB) const |
| Get Newton data for a pair of object types. More...
|
|
const NewtonData & | getNewtonData (int idA, int idB) const |
| Get Newton data for a pair of object type ids. More...
|
|
const ChatterjeeData & | getChatterjeeData (const std::string &nameA, const std::string nameB) const |
| Get Chatterjee data for a pair of object types. More...
|
|
This class is a storage component for storing collision/contact data information.
◆ add()
void add |
( |
const std::string & |
name, |
|
|
const std::string & |
desc |
|
) |
| |
|
inline |
add an object type to the contact data map and associates it with a description.
- Parameters
-
name | [in] the name of the object type |
desc | [in] the description of the object type |
◆ getChatterjeeData()
const ChatterjeeData& getChatterjeeData |
( |
const std::string & |
nameA, |
|
|
const std::string |
nameB |
|
) |
| const |
Get Chatterjee data for a pair of object types.
- Parameters
-
nameA | [in] name of first type. |
nameB | [in] name of second type. |
- Returns
- the Chatterjee data.
◆ getDataID()
int getDataID |
( |
const std::string & |
objType | ) |
const |
converts a string of object type name to an int identifier.
- Parameters
-
objType | [in] name of object type. |
- Returns
- integer id.
◆ getDesctiption()
std::string getDesctiption |
( |
const std::string & |
matId | ) |
|
|
inline |
Get Object Description.
- Parameters
-
- Returns
- a string Description of the Material
◆ getMaxID()
Get the maximum id.
- Returns
- the maximum id.
◆ getNewtonData() [1/2]
const NewtonData& getNewtonData |
( |
const std::string & |
nameA, |
|
|
const std::string & |
nameB |
|
) |
| const |
Get Newton data for a pair of object types.
- Parameters
-
nameA | [in] name of first type. |
nameB | [in] name of second type. |
- Returns
- the NewtonData.
◆ getNewtonData() [2/2]
const NewtonData& getNewtonData |
( |
int |
idA, |
|
|
int |
idB |
|
) |
| const |
Get Newton data for a pair of object type ids.
- Parameters
-
idA | [in] id of first type. |
idB | [in] id of second type. |
- Returns
- the NewtonData.
◆ getObjectTypeName()
const std::string& getObjectTypeName |
( |
int |
id | ) |
const |
|
inline |
Get name of object type with id.
- Parameters
-
- Returns
- the name of the object type.
◆ getObjectTypes()
const std::vector<std::string>& getObjectTypes |
( |
| ) |
|
|
inline |
Get a list of all object types.
- Returns
- vector of names.
◆ setNewtonData()
void setNewtonData |
( |
const std::string & |
nameA, |
|
|
const std::string & |
nameB, |
|
|
double |
restitution |
|
) |
| |
Set the restitution coefficient for the collision between nameA and nameB.
- Parameters
-
nameA | [in] name of first type. |
nameB | [in] name of second type. |
restitution | [in] the coefficient of restitution [0->1]. |
The documentation for this class was generated from the following file: