MaterialDB Class Reference

MaterialDB class. More...

List of all members.

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
Worldworld ()
 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

Definition at line 193 of file world.h.


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:
stStatic Friction coefficient
knKinetic 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:
forcethe 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:
fsStatic Friction coefficient
fkKinetic Friction coefficient
elElastiticy coefficient
sfSoftness coefficient
enEnable/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]

return the world associate with these materials

Definition at line 196 of file world.h.


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