Encapsulates density types.
More...
#include <MaterialDensity.hh>
|
static double | Density (const std::string &_material) |
| Return the density of the given material name, or -1 if the material is not found. More...
|
|
static double | Density (const MaterialType _material) |
| Return the density of a material. More...
|
|
static const std::map
< MaterialType, double > & | Materials () |
| Accessor for retrieving density entries. More...
|
|
static std::tuple
< MaterialType, double > | Nearest (const double _value, const double _epsilon=IGN_DBL_MAX) |
| Return the material with the closest density value within _epsilon, or MATERIAL_TYPE_END if not found. More...
|
|
static MaterialType | NearestMaterial (const double _value, const double _epsilon=IGN_DBL_MAX) |
| Return the material with the closest density value within _epsilon, or MATERIAL_TYPE_END if not found. More...
|
|
Encapsulates density types.
static double Density |
( |
const std::string & |
_material | ) |
|
|
static |
Return the density of the given material name, or -1 if the material is not found.
- Parameters
-
[in] | _material | Name of the material, See MaterialType. |
- Returns
- Matching density if found, otherwise -1.
Return the density of a material.
- Parameters
-
[in] | _material | Type of the material, See MaterialType. |
- Returns
- Matching density if found, otherwise -1.
Accessor for retrieving density entries.
- Returns
- List of entries.
static std::tuple<MaterialType, double> Nearest |
( |
const double |
_value, |
|
|
const double |
_epsilon = IGN_DBL_MAX |
|
) |
| |
|
static |
Return the material with the closest density value within _epsilon, or MATERIAL_TYPE_END if not found.
- Parameters
-
[in] | _value | Density value of entry to match. |
[in] | _epsilon | Allowable range of difference between _value, and a material's density. |
- Returns
- A tuple where the first element is the MaterialType, and the second the density. A value of {MATERIAL_TYPE_END, -1} is returned on error.
static MaterialType NearestMaterial |
( |
const double |
_value, |
|
|
const double |
_epsilon = IGN_DBL_MAX |
|
) |
| |
|
static |
Return the material with the closest density value within _epsilon, or MATERIAL_TYPE_END if not found.
- Parameters
-
[in] | _value | Density value of entry to match. |
[in] | _epsilon | Allowable range of difference between _value, and a material's density. |
- Returns
- The nearest material type. MATERIAL_TYPE_END on error.
The documentation for this class was generated from the following file: