Gazebo Math

API Reference

8.0.0~pre1
Material.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16*/
17#ifndef GZ_MATH_MATERIAL_HH_
18#define GZ_MATH_MATERIAL_HH_
19
20#include <limits>
21#include <map>
22#include <string>
23#include <gz/math/Export.hh>
24#include <gz/math/config.hh>
26#include <gz/utils/ImplPtr.hh>
27
28namespace gz::math
29{
30 // Inline bracket to help doxygen filtering.
31 inline namespace GZ_MATH_VERSION_NAMESPACE {
32
63 {
65 public: Material();
66
69 public: explicit Material(const MaterialType _type);
70
74 public: explicit Material(const std::string &_typename);
75
78 public: explicit Material(const double _density);
79
84
91 public: void SetToNearestDensity(
92 const double _value,
94
98 public: bool operator==(const Material &_material) const;
99
103 public: bool operator!=(const Material &_material) const;
104
107 public: MaterialType Type() const;
108
112 public: void SetType(const MaterialType _type);
113
119 public: std::string Name() const;
120
124 public: void SetName(const std::string &_name);
125
128 public: double Density() const;
129
132 public: void SetDensity(const double _density);
133
135 GZ_UTILS_IMPL_PTR(dataPtr)
136 };
137 } // namespace GZ_MATH_VERSION_NAMESPACE
138} // namespace gz::math
139#endif // GZ_MATH_MATERIAL_HH_