All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
gazebo::physics::CollisionState Class Reference

Store state information of a physics::Collision object. More...

#include <physics/phyiscs.hh>

Inheritance diagram for gazebo::physics::CollisionState:
Inheritance graph
[legend]

Public Member Functions

 CollisionState ()
 Default constructor.
 
 CollisionState (const CollisionPtr _collision)
 Constructor.
 
 CollisionState (const sdf::ElementPtr _sdf)
 Constructor.
 
virtual ~CollisionState ()
 Destructor.
 
const math::PoseGetPose () const
 Get the Collision pose.
 
bool IsZero () const
 Return true if the values in the state are zero.
 
virtual void Load (const sdf::ElementPtr _elem)
 Load state from SDF element.
 
CollisionState operator+ (const CollisionState &_state) const
 Addition operator.
 
CollisionState operator- (const CollisionState &_state) const
 Subtraction operator.
 
CollisionStateoperator= (const CollisionState &_state)
 Assignment operator.
 
- Public Member Functions inherited from gazebo::physics::State
 State ()
 Default constructor.
 
 State (const std::string &_name, const common::Time &_realTime, const common::Time &_simTime)
 Constructor.
 
virtual ~State ()
 Destructor.
 
std::string GetName () const
 Get the name associated with this State.
 
common::Time GetRealTime () const
 Get the real time when this state was generated.
 
common::Time GetSimTime () const
 Get the sim time when this state was generated.
 
common::Time GetWallTime () const
 Get the wall time when this state was generated.
 
State operator- (const State &_state) const
 Subtraction operator.
 
Stateoperator= (const State &_state)
 Assignment operator.
 
void SetName (const std::string &_name)
 Set the name associated with this State.
 

Friends

std::ostream & operator<< (std::ostream &_out, const gazebo::physics::CollisionState &_state)
 Stream insertion operator.
 

Additional Inherited Members

- Protected Attributes inherited from gazebo::physics::State
std::string name
 Name associated with this State.
 
common::Time realTime
 
common::Time simTime
 
common::Time wallTime
 Times for the state data.
 

Detailed Description

Store state information of a physics::Collision object.

This class captures the entire state of a Collision at one specific time during a simulation run.

State of a Collision is its Pose.

Constructor & Destructor Documentation

gazebo::physics::CollisionState::CollisionState ( )

Default constructor.

gazebo::physics::CollisionState::CollisionState ( const CollisionPtr  _collision)
explicit

Constructor.

Build a CollisionState from an existing Collision.

Parameters
[in]_modelPointer to the Link from which to gather state info.
gazebo::physics::CollisionState::CollisionState ( const sdf::ElementPtr  _sdf)
explicit

Constructor.

Build a CollisionState from SDF data

Parameters
[in]_sdfSDF data to load a collision state from.
virtual gazebo::physics::CollisionState::~CollisionState ( )
virtual

Destructor.

Member Function Documentation

const math::Pose& gazebo::physics::CollisionState::GetPose ( ) const

Get the Collision pose.

Returns
The pose of the CollisionState
bool gazebo::physics::CollisionState::IsZero ( ) const

Return true if the values in the state are zero.

Returns
True if the values in the state are zero.
virtual void gazebo::physics::CollisionState::Load ( const sdf::ElementPtr  _elem)
virtual

Load state from SDF element.

Load CollisionState information from stored data in and SDF::Element

Parameters
[in]_elemPointer to the SDF::Element containing state info.

Reimplemented from gazebo::physics::State.

CollisionState gazebo::physics::CollisionState::operator+ ( const CollisionState _state) const

Addition operator.

Parameters
[in]_ptA state to add.
Returns
The resulting state.
CollisionState gazebo::physics::CollisionState::operator- ( const CollisionState _state) const

Subtraction operator.

Parameters
[in]_ptA state to substract.
Returns
The resulting state.
CollisionState& gazebo::physics::CollisionState::operator= ( const CollisionState _state)

Assignment operator.

Parameters
[in]_stateState value
Returns
Reference to this

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  _out,
const gazebo::physics::CollisionState _state 
)
friend

Stream insertion operator.

Parameters
[in]_outoutput stream
[in]_stateCollision state to output
Returns
the stream

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