Material.hh
Go to the documentation of this file.
bool operator!=(const Material &_material) const
Inequality operator. This compares type and density values.
void SetName(const std::string &_name)
Set the name of the material.
void SetDensity(const double _density)
Set the density value of the material in kg/m^3.
bool operator==(const Material &_material) const
Equality operator. This compares type and density values.
std::string Name() const
Get the name of the material. This will match the enum type names used in MaterialType,...
double Density() const
Get the density value of the material in kg/m^3.
Material(const double _density)
Construct a material based on a density value.
static const std::map< MaterialType, Material > & Predefined()
Get all the built-in materials.
Material(const std::string &_typename)
Construct a material based on a type name.
Material(const MaterialType _type)
Construct a material based on a type.
void SetType(const MaterialType _type)
Set the material's type. This will only set the type value. Other properties, such as density,...
void SetToNearestDensity(const double _value, const double _epsilon=std::numeric_limits< double >::max())
Set this Material to the built-in Material with the nearest density value within _epsilon....
MaterialType
This enum lists the supported material types. A value can be used to create a Material instance....
Definition: MaterialType.hh:38
Definition: Angle.hh:43