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() [1/3]
sdf::v9::Physics::Physics |
( |
| ) |
|
◆ Physics() [2/3]
sdf::v9::Physics::Physics |
( |
const Physics & |
_physics | ) |
|
Copy constructor.
- Parameters
-
◆ Physics() [3/3]
sdf::v9::Physics::Physics |
( |
Physics && |
_physics | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
◆ ~Physics()
sdf::v9::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::v9::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::v9::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::v9::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::v9::Physics::Name |
( |
| ) |
const |
Get the name of this set of physics parameters.
- Returns
- Name of the physics profile.
◆ operator=() [1/2]
Copy assignment operator.
- Parameters
-
- Returns
- Reference to this.
◆ operator=() [2/2]
Move assignment operator.
- Parameters
-
- Returns
- Reference to this.
◆ RealTimeFactor()
double sdf::v9::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::v9::Physics::SetDefault |
( |
const bool |
_default | ) |
const |
Set whether this physics profile is the default.
- Parameters
-
[in] | _default | True to make this profile default. |
◆ SetEngineType()
void sdf::v9::Physics::SetEngineType |
( |
const std::string & |
_type | ) |
|
Set the physics profile dynamics engine type.
- Parameters
-
[in] | _type | The type of dynamics engine. |
◆ SetMaxStepSize()
void sdf::v9::Physics::SetMaxStepSize |
( |
const double |
_step | ) |
|
Set the max step size in seconds.
- Parameters
-
[in] | _step | The max step size in seconds. |
◆ SetName()
void sdf::v9::Physics::SetName |
( |
const std::string & |
_name | ) |
const |
Set the name of this set of physics parameters.
- Parameters
-
[in] | _name | Name of the physics profile. |
◆ SetRealTimeFactor()
void sdf::v9::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: