RobWorkProject  23.9.11-
Classes | Public Member Functions | List of all members
ContactDataMap Class Reference

This class is a storage component for storing collision/contact data information. More...

#include <ContactDataMap.hpp>

Classes

struct  ChatterjeeData
 Data required for the Chatterjee collision model. More...
 
struct  NewtonData
 Data required for the Newton collision model. More...
 

Public Member Functions

 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
 
void addChatterjeeData (const std::string &nameA, const std::string &nameB, const ChatterjeeData &data)
 adds chatterjee data description to the collision between nameA and nameB
 
const NewtonDatagetNewtonData (const std::string &nameA, const std::string &nameB) const
 Get Newton data for a pair of object types. More...
 
const NewtonDatagetNewtonData (int idA, int idB) const
 Get Newton data for a pair of object type ids. More...
 
const ChatterjeeDatagetChatterjeeData (const std::string &nameA, const std::string nameB) const
 Get Chatterjee data for a pair of object types. More...
 

Detailed Description

This class is a storage component for storing collision/contact data information.

Member Function Documentation

◆ 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
matIdthe Object ID
Returns
a string Description of the Material

◆ getMaxID()

int getMaxID ( ) const
inline

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
id[in] the id.
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.

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