geometry.cpp
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2011-2014, Willow Garage, Inc.
5  * Copyright (c) 2014-2016, Open Source Robotics Foundation
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of Open Source Robotics Foundation nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  */
35 
38 #include "fcl/math/geometry-inl.h"
39 
40 namespace fcl {
41 
42 //==============================================================================
43 template
44 void normalize(Vector3d& v, bool* signal);
45 
46 //==============================================================================
47 template
48 void hat(Matrix3d& mat, const Vector3d& vec);
49 
50 //==============================================================================
51 template
52 void eigen(const Matrix3d& m, Vector3d& dout, Matrix3d& vout);
53 
54 //==============================================================================
55 template
56 void eigen_old(const Matrix3d& m, Vector3d& dout, Matrix3d& vout);
57 
58 //==============================================================================
59 template
60 void axisFromEigen(
61  const Matrix3d& eigenV, const Vector3d& eigenS, Matrix3d& axis);
62 
63 //==============================================================================
64 template
65 void axisFromEigen(const Matrix3d& eigenV,
66  const Vector3d& eigenS,
67  Transform3d& tf);
68 
69 //==============================================================================
70 template
72 
73 //==============================================================================
74 template
76  const Vector3d* const ps,
77  const Vector3d* const ps2,
78  Triangle* ts,
79  unsigned int* indices,
80  int n,
81  const Matrix3d& axis,
82  Vector3d& origin,
83  double l[2],
84  double& r);
85 
86 //==============================================================================
87 template
89  const Vector3d* const ps,
90  const Vector3d* const ps2,
91  Triangle* ts,
92  unsigned int* indices,
93  int n,
94  Transform3d& tf,
95  double l[2],
96  double& r);
97 
98 //==============================================================================
99 template
101  const Vector3d& a,
102  const Vector3d& b,
103  const Vector3d& c,
104  Vector3d& center,
105  double& radius);
106 
107 //==============================================================================
108 template
109 double maximumDistance(
110  const Vector3d* const ps,
111  const Vector3d* const ps2,
112  Triangle* ts,
113  unsigned int* indices,
114  int n,
115  const Vector3d& query);
116 
117 //==============================================================================
118 template
119 void getExtentAndCenter(
120  const Vector3d* const ps,
121  const Vector3d* const ps2,
122  Triangle* ts,
123  unsigned int* indices,
124  int n,
125  const Matrix3d& axis,
126  Vector3d& center,
127  Vector3d& extent);
128 
129 //==============================================================================
130 template
131 void getCovariance(
132  const Vector3d* const ps,
133  const Vector3d* const ps2,
134  Triangle* ts,
135  unsigned int* indices,
136  int n, Matrix3d& M);
137 
138 //==============================================================================
139 namespace detail {
140 //==============================================================================
141 
142 //==============================================================================
143 template
144 double maximumDistance_mesh(
145  const Vector3d* const ps,
146  const Vector3d* const ps2,
147  Triangle* ts,
148  unsigned int* indices,
149  int n,
150  const Vector3d& query);
151 
152 //==============================================================================
153 template
155  const Vector3d* const ps,
156  const Vector3d* const ps2,
157  unsigned int* indices,
158  int n,
159  const Vector3d& query);
160 
161 //==============================================================================
162 template
164  const Vector3d* const ps,
165  const Vector3d* const ps2,
166  unsigned int* indices,
167  int n,
168  const Matrix3d& axis,
169  Vector3d& center,
170  Vector3d& extent);
171 
172 //==============================================================================
173 template
175  const Vector3d* const ps,
176  const Vector3d* const ps2,
177  Triangle* ts,
178  unsigned int* indices,
179  int n,
180  const Matrix3d& axis,
181  Vector3d& center,
182  Vector3d& extent);
183 
184 //==============================================================================
185 } // namespace detail
186 //==============================================================================
187 
188 } // namespace fcl
fcl::circumCircleComputation
template void circumCircleComputation(const Vector3d &a, const Vector3d &b, const Vector3d &c, Vector3d &center, double &radius)
fcl::axisFromEigen
template void axisFromEigen(const Matrix3d &eigenV, const Vector3d &eigenS, Matrix3d &axis)
fcl::detail::maximumDistance_mesh
FCL_EXPORT S maximumDistance_mesh(const Vector3< S > *const ps, const Vector3< S > *const ps2, Triangle *ts, unsigned int *indices, int n, const Vector3< S > &query)
Definition: geometry-inl.h:149
fcl::Transform3d
Transform3< double > Transform3d
Definition: types.h:117
fcl::normalize
template void normalize(Vector3d &v, bool *signal)
fcl::detail::getExtentAndCenter_mesh
FCL_EXPORT void getExtentAndCenter_mesh(const Vector3< S > *const ps, const Vector3< S > *const ps2, Triangle *ts, unsigned int *indices, int n, const Matrix3< S > &axis, Vector3< S > &center, Vector3< S > &extent)
Compute the bounding volume extent and center for a set or subset of points. The bounding volume axes...
Definition: geometry-inl.h:294
fcl::detail::maximumDistance_pointcloud
FCL_EXPORT S maximumDistance_pointcloud(const Vector3< S > *const ps, const Vector3< S > *const ps2, unsigned int *indices, int n, const Vector3< S > &query)
Definition: geometry-inl.h:194
fcl::getCovariance
template void getCovariance(const Vector3d *const ps, const Vector3d *const ps2, Triangle *ts, unsigned int *indices, int n, Matrix3d &M)
fcl::maximumDistance
template double maximumDistance(const Vector3d *const ps, const Vector3d *const ps2, Triangle *ts, unsigned int *indices, int n, const Vector3d &query)
fcl::detail::getExtentAndCenter_pointcloud
FCL_EXPORT void getExtentAndCenter_pointcloud(const Vector3< S > *const ps, const Vector3< S > *const ps2, unsigned int *indices, int n, const Matrix3< S > &axis, Vector3< S > &center, Vector3< S > &extent)
Compute the bounding volume extent and center for a set or subset of points. The bounding volume axes...
Definition: geometry-inl.h:229
r
S r
Definition: test_sphere_box.cpp:171
Vector3d
fcl::Vector3d Vector3d
Definition: test_broadphase_dynamic_AABB_tree.cpp:48
fcl::eigen_old
template void eigen_old(const Matrix3d &m, Vector3d &dout, Matrix3d &vout)
fcl::generateCoordinateSystem
template Matrix3d generateCoordinateSystem(const Vector3d &x_axis)
fcl::getExtentAndCenter
template void getExtentAndCenter(const Vector3d *const ps, const Vector3d *const ps2, Triangle *ts, unsigned int *indices, int n, const Matrix3d &axis, Vector3d &center, Vector3d &extent)
fcl::getRadiusAndOriginAndRectangleSize
template void getRadiusAndOriginAndRectangleSize(const Vector3d *const ps, const Vector3d *const ps2, Triangle *ts, unsigned int *indices, int n, const Matrix3d &axis, Vector3d &origin, double l[2], double &r)
fcl::hat
template void hat(Matrix3d &mat, const Vector3d &vec)
fcl::Matrix3d
Matrix3< double > Matrix3d
Definition: types.h:115
fcl::eigen
template void eigen(const Matrix3d &m, Vector3d &dout, Matrix3d &vout)
geometry-inl.h
fcl
Main namespace.
Definition: broadphase_bruteforce-inl.h:45


fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:48