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. More... | |
void | enableCollision (QString mat1, QString mat2, bool enable=true) |
Enable/Disable the collision between materials passed. More... | |
real | gravityForce (QString mat) |
Return the corresponding gravity force setted If no setted, that World::gravityForce will be returned. More... | |
void | setElasticity (QString mat1, QString mat2, real) |
configure the default Elasticity between materials specified the order doesn't matter More... | |
void | setFrictions (QString mat1, QString mat2, real st, real kn) |
configure the default Friction between materials specified More... | |
void | setGravityForce (QString mat, real force) |
configure the force gravity that will be applied to object of material specified More... | |
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 More... | |
void | setSoftness (QString mat1, QString mat2, real) |
configure the default Softness between materials specified the order doesn't matter More... | |
World * | world () |
return the world associate with these materials More... | |
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 40 of file world.cpp.
Referenced by PhyEpuck::PhyEpuck(), 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 119 of file world.cpp.
Referenced by 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 110 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 80 of file world.cpp.
Referenced by PhyMarXbot::PhyMarXbot(), and MaterialDB::setProperties().
configure the default Friction between materials specified
- Parameters
-
st Static Friction coefficient kn Kinetic Friction coefficient the order doesn't matter
Definition at line 66 of file world.cpp.
Referenced by MaterialDB::setProperties().
void setGravityForce | ( | QString | mat, |
real | force | ||
) |
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 131 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 93 of file world.cpp.
Referenced by PhyMarXbot::PhyMarXbot(), and MaterialDB::setProperties().
|
inline |
The documentation for this class was generated from the following files: