Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-fcl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Saurel
hpp-fcl
Commits
2f7ddb4d
Commit
2f7ddb4d
authored
5 years ago
by
Joseph Mirabel
Browse files
Options
Downloads
Patches
Plain Diff
Implement AABB::overlap with distance lower bound.
parent
b4b7cd61
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/hpp/fcl/BV/AABB.h
+2
-6
2 additions, 6 deletions
include/hpp/fcl/BV/AABB.h
src/BV/AABB.cpp
+16
-1
16 additions, 1 deletion
src/BV/AABB.cpp
with
18 additions
and
7 deletions
include/hpp/fcl/BV/AABB.h
+
2
−
6
View file @
2f7ddb4d
...
...
@@ -97,12 +97,8 @@ public:
}
/// Not implemented
inline
bool
overlap
(
const
AABB
&
other
,
const
CollisionRequest
&
,
FCL_REAL
&
sqrDistLowerBound
)
const
{
sqrDistLowerBound
=
sqrt
(
-
1
);
return
overlap
(
other
);
}
bool
overlap
(
const
AABB
&
other
,
const
CollisionRequest
&
request
,
FCL_REAL
&
sqrDistLowerBound
)
const
;
/// @brief Check whether the AABB contains another AABB
inline
bool
contain
(
const
AABB
&
other
)
const
...
...
This diff is collapsed.
Click to expand it.
src/BV/AABB.cpp
+
16
−
1
View file @
2f7ddb4d
...
...
@@ -38,7 +38,7 @@
#include
<hpp/fcl/BV/AABB.h>
#include
<limits>
#include
<
iostream
>
#include
<
hpp/fcl/collision_data.h
>
namespace
hpp
{
...
...
@@ -50,6 +50,21 @@ AABB::AABB() : min_(Vec3f::Constant(std::numeric_limits<FCL_REAL>::max())),
{
}
bool
AABB
::
overlap
(
const
AABB
&
other
,
const
CollisionRequest
&
request
,
FCL_REAL
&
sqrDistLowerBound
)
const
{
const
FCL_REAL
breakDistance
(
request
.
break_distance
+
request
.
security_margin
);
const
FCL_REAL
breakDistance2
=
breakDistance
*
breakDistance
;
sqrDistLowerBound
=
(
min_
-
other
.
max_
).
array
().
max
(
0
).
matrix
().
squaredNorm
();
if
(
sqrDistLowerBound
>
breakDistance2
)
return
false
;
sqrDistLowerBound
=
(
other
.
min_
-
max_
).
array
().
max
(
0
).
matrix
().
squaredNorm
();
if
(
sqrDistLowerBound
>
breakDistance2
)
return
false
;
return
true
;
}
FCL_REAL
AABB
::
distance
(
const
AABB
&
other
,
Vec3f
*
P
,
Vec3f
*
Q
)
const
{
FCL_REAL
result
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment