RobWorkProject  23.9.11-
Public Member Functions | Static Public Member Functions | List of all members
BtMaterial Class Reference

Used as body userdata to be able to determine friction and restitution on contact pairs. More...

#include <BtMaterial.hpp>

Public Member Functions

 BtMaterial (const rwsim::dynamics::MaterialDataMap *frictionMap, const std::string &material, const rwsim::dynamics::ContactDataMap *collisionMap, const std::string &objectType)
 Construct new material definition. More...
 
virtual ~BtMaterial ()
 Destructor.
 
const rwsim::dynamics::MaterialDataMapgetFrictionMap () const
 Get the friction map. More...
 
const rwsim::dynamics::ContactDataMapgetContactDataMap () const
 Get the collision map. More...
 
const std::string & getMaterial () const
 Get the friction material. More...
 
const std::string & getObjectType () const
 Get the type of object (for collisions). More...
 

Static Public Member Functions

static double getFriction (const BtMaterial *a, const BtMaterial *b)
 Get Coulomb friction value between two materials. More...
 
static double getRestitution (const BtMaterial *a, const BtMaterial *b)
 Get Newton restitution value between two objects. More...
 

Detailed Description

Used as body userdata to be able to determine friction and restitution on contact pairs.

Constructor & Destructor Documentation

◆ BtMaterial()

BtMaterial ( const rwsim::dynamics::MaterialDataMap frictionMap,
const std::string &  material,
const rwsim::dynamics::ContactDataMap collisionMap,
const std::string &  objectType 
)

Construct new material definition.

Parameters
frictionMap[in] the friction map to look up in (must point to the same map for two objects in contact).
material[in] the name of the friction material.
collisionMap[in] the collision map to look up in (must point to the same map for two objects in contact).
objectType[in] the type of collision object.

Member Function Documentation

◆ getContactDataMap()

const rwsim::dynamics::ContactDataMap* getContactDataMap ( ) const

Get the collision map.

Returns
a pointer to a read-only collision map.

◆ getFriction()

static double getFriction ( const BtMaterial a,
const BtMaterial b 
)
static

Get Coulomb friction value between two materials.

Parameters
a[in] first material.
b[in] second material.
Returns
the friction value.
Exceptions
Exceptionif materials does not refer to the same map or the pair of materials did not exist in map.

◆ getFrictionMap()

const rwsim::dynamics::MaterialDataMap* getFrictionMap ( ) const

Get the friction map.

Returns
a pointer to a read-only friction map.

◆ getMaterial()

const std::string& getMaterial ( ) const

Get the friction material.

Returns
the name of the material.

◆ getObjectType()

const std::string& getObjectType ( ) const

Get the type of object (for collisions).

Returns
the name of the object type.

◆ getRestitution()

static double getRestitution ( const BtMaterial a,
const BtMaterial b 
)
static

Get Newton restitution value between two objects.

Parameters
a[in] first material.
b[in] second material.
Returns
the restitution value.
Exceptions
Exceptionif materials does not refer to the same map.

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