MaterialDB Class Reference
MaterialDB class. More...
Classes | |
| class | materialPairInfo |
| simple inner class for storing material properties | |
Public Member Functions | |
| bool | createMaterial (QString name) |
| Create a new material It return false if already exists a material with name passed. | |
| void | enableCollision (QString mat1, QString mat2, bool enable=true) |
| Enable/Disable the collision between materials passed. | |
| real | gravityForce (QString mat) |
| Return the corresponding gravity force setted If no setted, that World::gravityForce will be returned. | |
| void | setElasticity (QString mat1, QString mat2, real) |
| configure the default Elasticity between materials specified the order doesn't matter | |
| void | setFrictions (QString mat1, QString mat2, real st, real kn) |
| configure the default Friction between materials specified | |
| void | setGravityForce (QString mat, real force) |
| configure the force gravity that will be applied to object of material specified | |
| void | setProperties (QString mat1, QString mat2, real fs, real fk, real el, real sf, bool en=true) |
| set Frictions, Elasticity, Softness and Enabled/Disable collision between materials | |
| void | setSoftness (QString mat1, QString mat2, real) |
| configure the default Softness between materials specified the order doesn't matter | |
| World * | world () |
| return the world associate with these materials | |
Friends | |
| class | World |
Detailed Description
MaterialDB class.
\
- Motivation
- this object allows to manage the material properties
- Description
- It's not possibile to instantiate it, but it's automatically create when a World is created. For accessing it, use the World::materials() method.
there are some predefined materials:
# Default: with default properties of physic engine used # nonCollidable: a material that doesn't collide with anything
- Warnings
Member Function Documentation
| bool createMaterial | ( | QString | name | ) |
Create a new material It return false if already exists a material with name passed.
Definition at line 64 of file world.cpp.
Referenced by PhyiCub::PhyiCub(), and PhyMarXbot::PhyMarXbot().
| void enableCollision | ( | QString | mat1, |
| QString | mat2, | ||
| bool | enable = true |
||
| ) |
Enable/Disable the collision between materials passed.
the order doesn't matter
Definition at line 143 of file world.cpp.
Referenced by PhyiCub::PhyiCub(), and MaterialDB::setProperties().
| real gravityForce | ( | QString | mat | ) |
Return the corresponding gravity force setted If no setted, that World::gravityForce will be returned.
Definition at line 134 of file world.cpp.
References World::gravityForce().
| void setElasticity | ( | QString | mat1, |
| QString | mat2, | ||
| real | el | ||
| ) |
configure the default Elasticity between materials specified the order doesn't matter
Definition at line 104 of file world.cpp.
Referenced by MaterialDB::setProperties().
| void setFrictions | ( | QString | mat1, |
| QString | mat2, | ||
| real | st, | ||
| real | kn | ||
| ) |
configure the default Friction between materials specified
- Parameters:
-
st Static Friction coefficient kn Kinetic Friction coefficient the order doesn't matter
Definition at line 90 of file world.cpp.
Referenced by MaterialDB::setProperties().
| void setGravityForce | ( | QString | mat, |
| real | force | ||
| ) |
configure the force gravity that will be applied to object of material specified
- Parameters:
-
force the gravity force in m/s^2
Definition at line 130 of file world.cpp.
Referenced by PhyiCub::PhyiCub().
| void setProperties | ( | QString | mat1, |
| QString | mat2, | ||
| real | fs, | ||
| real | fk, | ||
| real | el, | ||
| real | sf, | ||
| bool | en = true |
||
| ) |
set Frictions, Elasticity, Softness and Enabled/Disable collision between materials
- Parameters:
-
fs Static Friction coefficient fk Kinetic Friction coefficient el Elastiticy coefficient sf Softness coefficient en Enable/Disable collisions
Definition at line 155 of file world.cpp.
References MaterialDB::enableCollision(), MaterialDB::setElasticity(), MaterialDB::setFrictions(), and MaterialDB::setSoftness().
Referenced by PhyMarXbot::PhyMarXbot().
| void setSoftness | ( | QString | mat1, |
| QString | mat2, | ||
| real | sf | ||
| ) |
configure the default Softness between materials specified the order doesn't matter
Definition at line 117 of file world.cpp.
Referenced by MaterialDB::setProperties().
| World* world | ( | ) | [inline] |
The documentation for this class was generated from the following files: