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/Ellipsoid.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 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_ELLIPSOID_HH_
18
#define GZ_MATH_ELLIPSOID_HH_
19
20
#include <optional>
21
#include "
gz/math/MassMatrix3.hh
"
22
#include "
gz/math/Material.hh
"
23
24
namespace
gz
25
{
26
namespace
math
27
{
28
// Inline bracket to help doxygen filtering.
29
inline
namespace
GZ_MATH_VERSION_NAMESPACE {
30
//
38
template
<
typename
Precision>
39
class
Ellipsoid
40
{
43
public
:
Ellipsoid
() =
default
;
44
47
public
:
explicit
Ellipsoid
(
const
Vector3<Precision>
&_radii);
48
52
public
:
Ellipsoid
(
const
Vector3<Precision>
&_radii,
53
const
Material
&_mat);
54
57
public
:
Vector3<Precision>
Radii
()
const
;
58
61
public
:
void
SetRadii
(
const
Vector3<Precision>
&_radii);
62
65
public
:
const
Material
&
Mat
()
const
;
66
69
public
:
void
SetMat
(
const
Material
&_mat);
70
77
public
: std::optional< MassMatrix3<Precision> >
MassMatrix
()
const
;
78
81
public
:
bool
operator==
(
const
Ellipsoid
&_ellipsoid)
const
;
82
85
public
: Precision
Volume
()
const
;
86
95
public
: Precision
DensityFromMass
(
const
Precision _mass)
const
;
96
109
public
:
bool
SetDensityFromMass
(
const
Precision _mass);
110
112
private
:
Vector3<Precision>
radii =
Vector3<Precision>::Zero
;
113
115
private
:
Material
material;
116
};
117
120
typedef
Ellipsoid<int>
Ellipsoidi
;
121
124
typedef
Ellipsoid<double>
Ellipsoidd
;
125
128
typedef
Ellipsoid<float>
Ellipsoidf
;
129
}
130
}
131
}
132
#include "gz/math/detail/Ellipsoid.hh"
133
134
#endif