Store state information of a Light object. More...
#include <physics/physics.hh>
Inherits State.
Public Member Functions | |
LightState ()=default | |
Default constructor. More... | |
LightState (const LightPtr _light, const common::Time &_realTime, const common::Time &_simTime, const uint64_t _iterations) | |
Constructor. More... | |
LightState (const sdf::ElementPtr _sdf) | |
Constructor. More... | |
void | FillSDF (sdf::ElementPtr _sdf) |
Populate a state SDF element with data from the object. More... | |
uint64_t | GetIterations () const |
Get the iterations when this state was generated. More... | |
std::string | GetName () const |
Get the name associated with this State. More... | |
common::Time | GetRealTime () const |
Get the real time when this state was generated. More... | |
common::Time | GetSimTime () const |
Get the sim time when this state was generated. More... | |
common::Time | GetWallTime () const |
Get the wall time when this state was generated. More... | |
bool | IsZero () const |
Return true if the values in the state are zero. More... | |
virtual void | Load (const sdf::ElementPtr _elem) |
Load state from SDF element. More... | |
void | Load (const LightPtr _light, const common::Time &_realTime, const common::Time &_simTime, const uint64_t _iterations) |
Load state from Light pointer. More... | |
LightState | operator+ (const LightState &_state) const |
Addition operator. More... | |
State | operator- (const State &_state) const |
Subtraction operator. More... | |
LightState | operator- (const LightState &_state) const |
Subtraction operator. More... | |
LightState & | operator= (const LightState &_state) |
Assignment operator. More... | |
const ignition::math::Pose3d | Pose () const |
Get the stored light pose. More... | |
virtual void | SetIterations (const uint64_t _iterations) |
Set the iterations when this state was generated. More... | |
void | SetName (const std::string &_name) |
Set the name associated with this State. More... | |
virtual void | SetRealTime (const common::Time &_time) |
Set the real time when this state was generated. More... | |
virtual void | SetSimTime (const common::Time &_time) |
Set the sim time when this state was generated. More... | |
virtual void | SetWallTime (const common::Time &_time) |
Set the wall time when this state was generated. More... | |
Protected Attributes | |
uint64_t | iterations = 0 |
The number of simulation iterations when this state was generated. More... | |
std::string | name |
Name associated with this State. More... | |
common::Time | realTime |
common::Time | simTime |
common::Time | wallTime |
Times for the state data. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const gazebo::physics::LightState &_state) |
Stream insertion operator. More... | |
Store state information of a Light object.
This class captures the entire state of a Light at one specific time during a simulation run.
|
default |
Default constructor.
LightState | ( | const LightPtr | _light, |
const common::Time & | _realTime, | ||
const common::Time & | _simTime, | ||
const uint64_t | _iterations | ||
) |
Constructor.
Build a LightState from an existing Light.
[in] | _light | Pointer to the light from which to gather state info. |
[in] | _realTime | Real time stamp. |
[in] | _simTime | Sim time stamp. |
[in] | _iterations | Simulation iterations. |
|
explicit |
Constructor.
Build a LightState from SDF data
[in] | _sdf | SDF data to load a light state from. |
void FillSDF | ( | sdf::ElementPtr | _sdf | ) |
Populate a state SDF element with data from the object.
[out] | _sdf | SDF element to populate. |
|
inherited |
Get the iterations when this state was generated.
|
inherited |
|
inherited |
Get the real time when this state was generated.
|
inherited |
Get the sim time when this state was generated.
|
inherited |
Get the wall time when this state was generated.
bool IsZero | ( | ) | const |
Return true if the values in the state are zero.
|
virtual |
Load state from SDF element.
Load LightState information from stored data in and SDF::Element
[in] | _elem | Pointer to the SDF::Element containing state info. |
Reimplemented from State.
void Load | ( | const LightPtr | _light, |
const common::Time & | _realTime, | ||
const common::Time & | _simTime, | ||
const uint64_t | _iterations | ||
) |
Load state from Light pointer.
Build a LightState from an existing Light.
[in] | _light | Pointer to the light from which to gather state info. |
[in] | _realTime | Real time stamp. |
[in] | _simTime | Sim time stamp. |
[in] | _iterations | Simulation iterations. |
LightState operator+ | ( | const LightState & | _state | ) | const |
Addition operator.
[in] | _pt | A state to substract. |
Subtraction operator.
[in] | _pt | A state to substract. |
LightState operator- | ( | const LightState & | _state | ) | const |
Subtraction operator.
[in] | _pt | A state to substract. |
LightState& operator= | ( | const LightState & | _state | ) |
const ignition::math::Pose3d Pose | ( | ) | const |
Get the stored light pose.
|
virtualinherited |
Set the iterations when this state was generated.
[in] | _iterations | Iterations when the data was recorded. |
Reimplemented in ModelState, WorldState, and LinkState.
|
inherited |
|
virtualinherited |
Set the real time when this state was generated.
[in] | _time | Clock time since simulation was stated. |
Reimplemented in ModelState, WorldState, and LinkState.
|
virtualinherited |
Set the sim time when this state was generated.
[in] | _time | Simulation time when the data was recorded. |
Reimplemented in ModelState, WorldState, and LinkState.
|
virtualinherited |
Set the wall time when this state was generated.
[in] | _time | The absolute clock time when the State data was recorded. |
Reimplemented in ModelState, WorldState, and LinkState.
|
friend |
Stream insertion operator.
[in] | _out | output stream. |
[in] | _state | Light state to output. |
|
protectedinherited |
The number of simulation iterations when this state was generated.
|
protectedinherited |
Name associated with this State.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Times for the state data.