the MaterialDB class managea the material properties More...
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
the MaterialDB class managea the material properties
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
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 50 of file world.cpp.
Referenced by PhyEpuck::PhyEpuck(), PhyiCub::PhyiCub(), PhyKhepera::PhyKhepera(), 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 129 of file world.cpp.
Referenced by PhyiCub::PhyiCub(), PhyMarXbot::PhyMarXbot(), 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 120 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 90 of file world.cpp.
Referenced by PhyMarXbot::PhyMarXbot(), and 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 76 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 116 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 141 of file world.cpp.
References MaterialDB::enableCollision(), MaterialDB::setElasticity(), MaterialDB::setFrictions(), and MaterialDB::setSoftness().
Referenced by PhyEpuck::PhyEpuck(), and PhyKhepera::PhyKhepera().
| void setSoftness | ( | QString | mat1, | 
| QString | mat2, | ||
| real | sf | ||
| ) | 
configure the default Softness between materials specified the order doesn't matter
Definition at line 103 of file world.cpp.
Referenced by PhyMarXbot::PhyMarXbot(), and MaterialDB::setProperties().
      
  | 
  inline | 
The documentation for this class was generated from the following files: