RobWorkProject
24.12.4-
|
A map of materials and friction models defined between materials. More...
#include <MaterialDataMap.hpp>
Public Member Functions | |
MaterialDataMap () | |
Constructor. | |
virtual | ~MaterialDataMap () |
Destructor. | |
void | add (const std::string &name, const std::string &desc) |
Add a material name with a description. More... | |
int | getDataID (const std::string &material) const |
Converts a string of material type name to an int identifier. More... | |
const std::string & | getMaterialName (int id) const |
Convert an id of a material to the name of the material. More... | |
const std::vector< std::string > & | getMaterials () |
Get a list of the names of all materials. More... | |
std::string | getDescription (const std::string &matId) |
Get Material Description. More... | |
int | getMaxMatID () const |
Get the number of materials. More... | |
bool | hasFrictionData (int matAID, int matBID, int dataType=Coulomb) const |
Test if the given material pair has friction data in map. More... | |
bool | hasFrictionData (const std::string &matAID, const std::string &matBID, int dataType=Coulomb) const |
Test if the given material pair has friction data in map. More... | |
const FrictionData & | getFrictionData (int matAID, int matBID, int dataType=Coulomb) const |
Get a specific friction model for a pair of materials. More... | |
const std::vector< FrictionData > | getFrictionDatas (int matAID, int matBID) const |
Get all friction data associated to the given pair of materials. More... | |
const FrictionData & | getFrictionData (const std::string &matAID, const std::string &matBID, int dataType=Coulomb) const |
Get a specific friction model for a pair of materials. More... | |
const std::vector< FrictionData > | getFrictionDatas (const std::string &matAID, const std::string &matBID) const |
Get all friction data associated to the given pair of materials. More... | |
void | addFrictionData (const std::string &materialA, const std::string &materialB, const FrictionData &data) |
Add friction data for the given pair of materials. More... | |
void | clearFrictionData (const std::string &materialA, const std::string &materialB) |
Remove all friction data for the given pair of materials. More... | |
const FrictionData & | getDefaultFriction (int type) const |
Get the default friction model. More... | |
A map of materials and friction models defined between materials.
void add | ( | const std::string & | name, |
const std::string & | desc | ||
) |
Add a material name with a description.
name | [in] name of material. |
desc | [in] description of material. |
void addFrictionData | ( | const std::string & | materialA, |
const std::string & | materialB, | ||
const FrictionData & | data | ||
) |
Add friction data for the given pair of materials.
materialA | [in] the name of the first material. |
materialB | [in] the name of the second material. |
data | [in] the data to add. |
void clearFrictionData | ( | const std::string & | materialA, |
const std::string & | materialB | ||
) |
Remove all friction data for the given pair of materials.
materialA | [in] the name of the first material. |
materialB | [in] the name of the second material. |
int getDataID | ( | const std::string & | material | ) | const |
Converts a string of material type name to an int identifier.
material | [in] name of material. |
const FrictionData& getDefaultFriction | ( | int | type | ) | const |
Get the default friction model.
type | [in] the type of model. |
|
inline |
Get Material Description.
matId | the MAterial ID |
const FrictionData& getFrictionData | ( | const std::string & | matAID, |
const std::string & | matBID, | ||
int | dataType = Coulomb |
||
) | const |
Get a specific friction model for a pair of materials.
matAID | [in] the name of the first material. |
matBID | [in] the name of the second material. |
dataType | [in] the type of friction data (default is Coulomb). |
const FrictionData& getFrictionData | ( | int | matAID, |
int | matBID, | ||
int | dataType = Coulomb |
||
) | const |
Get a specific friction model for a pair of materials.
matAID | [in] id of first material. |
matBID | [in] id of second material. |
dataType | [in] the type of friction data (default is Coulomb). |
const std::vector<FrictionData> getFrictionDatas | ( | const std::string & | matAID, |
const std::string & | matBID | ||
) | const |
Get all friction data associated to the given pair of materials.
matAID | [in] the name of the first material. |
matBID | [in] the name of the second material. |
const std::vector<FrictionData> getFrictionDatas | ( | int | matAID, |
int | matBID | ||
) | const |
Get all friction data associated to the given pair of materials.
matAID | [in] the id of the first material. |
matBID | [in] the id of the second material. |
const std::string& getMaterialName | ( | int | id | ) | const |
Convert an id of a material to the name of the material.
id | [in] the id of the material. |
const std::vector<std::string>& getMaterials | ( | ) |
Get a list of the names of all materials.
int getMaxMatID | ( | ) | const |
Get the number of materials.
bool hasFrictionData | ( | const std::string & | matAID, |
const std::string & | matBID, | ||
int | dataType = Coulomb |
||
) | const |
Test if the given material pair has friction data in map.
matAID | [in] the name of the first material. |
matBID | [in] the name of the second material. |
dataType | [in] the type of friction data (default is Coulomb). |
bool hasFrictionData | ( | int | matAID, |
int | matBID, | ||
int | dataType = Coulomb |
||
) | const |
Test if the given material pair has friction data in map.
matAID | [in] id of first material. |
matBID | [in] id of second material. |
dataType | [in] the type of friction data (default is Coulomb). |