The physics element specifies the type and properties of a dynamics engine.
More...
#include <Physics.hh>
The physics element specifies the type and properties of a dynamics engine.
◆ Physics()
sdf::v11::Physics::Physics |
( |
| ) |
|
◆ Element()
Get a pointer to the SDF element that was used during load.
- Returns
- SDF element pointer. The value will be nullptr if Load has not been called.
◆ EngineType()
std::string sdf::v11::Physics::EngineType |
( |
| ) |
const |
Get the physics profile dynamics engine type.
Current options are ode, bullet, simbody and dart. Defaults to ode if left unspecified.
- Returns
- The type of dynamics engine.
◆ IsDefault()
bool sdf::v11::Physics::IsDefault |
( |
| ) |
const |
Get whether this physics profile is marked as default.
If true, this physics profile is set as the default physics profile for the World. If multiple default physics elements exist, the first physics profile marked as default is chosen. If no default physics element exists, the first physics element is chosen.
- Returns
- True if this profile is the default.
◆ Load()
Load the physics based on an element pointer.
This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.
- Parameters
-
- Returns
- Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.
◆ MaxStepSize()
double sdf::v11::Physics::MaxStepSize |
( |
| ) |
const |
Get the max step size in seconds.
The Maximum time step size at which every system in simulation can interact with the states of the world.
- Returns
- The max step size in seconds.
◆ Name()
std::string sdf::v11::Physics::Name |
( |
| ) |
const |
Get the name of this set of physics parameters.
- Returns
- Name of the physics profile.
◆ RealTimeFactor()
double sdf::v11::Physics::RealTimeFactor |
( |
| ) |
const |
Get the target real time factor.
Target simulation speedup factor, defined by ratio of simulation time to real-time.
- Returns
- The target real time factor.
◆ SetDefault()
void sdf::v11::Physics::SetDefault |
( |
const bool |
_default | ) |
|
Set whether this physics profile is the default.
- Parameters
-
[in] | _default | True to make this profile default. |
◆ SetEngineType()
void sdf::v11::Physics::SetEngineType |
( |
const std::string & |
_type | ) |
|
Set the physics profile dynamics engine type.
- Parameters
-
[in] | _type | The type of dynamics engine. |
◆ SetMaxStepSize()
void sdf::v11::Physics::SetMaxStepSize |
( |
const double |
_step | ) |
|
Set the max step size in seconds.
- Parameters
-
[in] | _step | The max step size in seconds. |
◆ SetName()
void sdf::v11::Physics::SetName |
( |
const std::string & |
_name | ) |
|
Set the name of this set of physics parameters.
- Parameters
-
[in] | _name | Name of the physics profile. |
◆ SetRealTimeFactor()
void sdf::v11::Physics::SetRealTimeFactor |
( |
const double |
_factor | ) |
|
Set the target realtime factor.
- Parameters
-
[in] | _factor | The target real time factor. |
The documentation for this class was generated from the following file: