opensurgsim
Public Member Functions | Protected Attributes | List of all members
SurgSim::Physics::Mass Class Reference

Public Member Functions

 Mass (double mass=0.0)
 Constructor. More...
 
void setMass (double mass)
 Sets the mass. More...
 
double getMass () const
 Gets the mass. More...
 
bool operator== (const Mass &m) const
 Comparison operator (equality) More...
 
bool operator!= (const Mass &m) const
 Comparison operator (inequality) More...
 

Protected Attributes

double m_mass
 Mass (in kg)
 

Constructor & Destructor Documentation

§ Mass()

SurgSim::Physics::Mass::Mass ( double  mass = 0.0)
inlineexplicit

Constructor.

Parameters
massThe mass (in Kg) default value is 0

Member Function Documentation

§ getMass()

double SurgSim::Physics::Mass::getMass ( ) const
inline

Gets the mass.

Returns
The mass stored (in Kg)

§ operator!=()

bool SurgSim::Physics::Mass::operator!= ( const Mass m) const
inline

Comparison operator (inequality)

Parameters
mMass to compare it to
Returns
False if the 2 Mass contains the same information, True otherwise

§ operator==()

bool SurgSim::Physics::Mass::operator== ( const Mass m) const
inline

Comparison operator (equality)

Parameters
mMass to compare it to
Returns
True if the 2 Mass contains the same information, false otherwise

§ setMass()

void SurgSim::Physics::Mass::setMass ( double  mass)
inline

Sets the mass.

Parameters
massThe mass to be stored (in Kg)

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