Gazebo Math
API Reference
7.4.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
include
gz
math
gz/math/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>
25
#include <
gz/math/MaterialType.hh
>
26
#include <gz/utils/ImplPtr.hh>
27
28
namespace
gz
29
{
30
namespace
math
31
{
32
// Inline bracket to help doxygen filtering.
33
inline
namespace
GZ_MATH_VERSION_NAMESPACE {
34
64
class
GZ_MATH_VISIBLE
Material
65
{
67
public
:
Material
();
68
71
public
:
explicit
Material
(
const
MaterialType
_type);
72
76
public
:
explicit
Material
(
const
std::string
&_typename);
77
80
public
:
explicit
Material
(
const
double
_density);
81
85
public
:
static
const
std::map<MaterialType, Material>
&
Predefined
();
86
93
public
:
void
SetToNearestDensity
(
94
const
double
_value,
95
const
double
_epsilon =
std::numeric_limits<double>::max
());
96
100
public
:
bool
operator==
(
const
Material
&_material)
const
;
101
105
public
:
bool
operator!=
(
const
Material
&_material)
const
;
106
109
public
:
MaterialType
Type
()
const
;
110
114
public
:
void
SetType
(
const
MaterialType
_type);
115
121
public
:
std::string
Name
()
const
;
122
126
public
:
void
SetName
(
const
std::string
&_name);
127
130
public
:
double
Density
()
const
;
131
134
public
:
void
SetDensity
(
const
double
_density);
135
137
GZ_UTILS_IMPL_PTR(dataPtr)
138
};
139
}
140
}
141
}
142
#endif