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
4548c2ed
Commit
4548c2ed
authored
7 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add rotate(AABB, Matrix3f) and forward declare AABB
parent
8d83cc63
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/hpp/fcl/BV/AABB.h
+15
-0
15 additions, 0 deletions
include/hpp/fcl/BV/AABB.h
include/hpp/fcl/fwd.hh
+2
-0
2 additions, 0 deletions
include/hpp/fcl/fwd.hh
with
17 additions
and
0 deletions
include/hpp/fcl/BV/AABB.h
+
15
−
0
View file @
4548c2ed
...
...
@@ -40,6 +40,7 @@
#include
<stdexcept>
#include
<hpp/fcl/math/vec_3f.h>
#include
<hpp/fcl/math/matrix_3f.h>
namespace
fcl
{
...
...
@@ -243,6 +244,20 @@ static inline AABB translate(const AABB& aabb, const Vec3f& t)
return
res
;
}
static
inline
AABB
rotate
(
const
AABB
&
aabb
,
const
Matrix3f
&
t
)
{
AABB
res
(
t
*
aabb
.
min_
);
Vec3f
corner
(
aabb
.
min_
);
const
std
::
size_t
bit
[
3
]
=
{
1
,
2
,
4
};
for
(
std
::
size_t
ic
=
1
;
ic
<
8
;
++
ic
)
{
// ic = 0 corresponds to aabb.min_. Skip it.
for
(
std
::
size_t
i
=
0
;
i
<
3
;
++
i
)
{
corner
[
i
]
=
(
ic
&&
bit
[
i
])
?
aabb
.
max_
[
i
]
:
aabb
.
min_
[
i
];
}
res
+=
t
*
corner
;
}
return
res
;
}
}
#endif
This diff is collapsed.
Click to expand it.
include/hpp/fcl/fwd.hh
+
2
−
0
View file @
4548c2ed
...
...
@@ -43,4 +43,6 @@ namespace fcl {
typedef
boost
::
shared_ptr
<
const
CollisionGeometry
>
CollisionGeometryConstPtr_t
;
class
Transform3f
;
class
AABB
;
}
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