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
ff8b2c31
Commit
ff8b2c31
authored
8 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make Eigen a required dependency and add fcl::Vec3fX::derived() (same
for Matrix3fX
parent
0ca44f58
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+4
-7
4 additions, 7 deletions
CMakeLists.txt
include/hpp/fcl/math/matrix_3fx.h
+11
-0
11 additions, 0 deletions
include/hpp/fcl/math/matrix_3fx.h
include/hpp/fcl/math/vec_3fx.h
+7
-0
7 additions, 0 deletions
include/hpp/fcl/math/vec_3fx.h
with
22 additions
and
7 deletions
CMakeLists.txt
+
4
−
7
View file @
ff8b2c31
...
...
@@ -48,13 +48,10 @@ setup_project()
set
(
FCL_HAVE_SSE FALSE CACHE BOOL
"Enable SSE vectorization"
)
add_optional_dependency
(
"eigen3 >= 3.0.0"
)
set
(
FCL_HAVE_EIGEN
${
EIGEN3_FOUND
}
CACHE BOOL
"Use eigen matrix type when possible"
)
if
(
EIGEN3_FOUND
)
if
(
FCL_HAVE_EIGEN
)
include_directories
(
${
EIGEN3_INCLUDE_DIRS
}
)
endif
(
FCL_HAVE_EIGEN
)
endif
(
EIGEN3_FOUND
)
# add_optional_dependency("eigen3 >= 3.0.0")
add_required_dependency
(
"eigen3 >= 3.0.0"
)
set
(
FCL_HAVE_EIGEN TRUE CACHE BOOL
"Use eigen matrix type when possible"
)
include_directories
(
${
EIGEN3_INCLUDE_DIRS
}
)
# Required dependencies
add_required_dependency
(
"ccd >= 1.4"
)
...
...
This diff is collapsed.
Click to expand it.
include/hpp/fcl/math/matrix_3fx.h
+
11
−
0
View file @
ff8b2c31
...
...
@@ -39,6 +39,7 @@
#define FCL_MATRIX_3FX_H
#include
<hpp/fcl/math/vec_3f.h>
#include
<Eigen/Core>
namespace
fcl
{
...
...
@@ -50,6 +51,7 @@ class Matrix3fX
public:
typedef
typename
T
::
meta_type
U
;
typedef
typename
T
::
vector_type
S
;
typedef
Eigen
::
Matrix
<
U
,
3
,
3
>
EigenType
;
T
data
;
Matrix3fX
()
{}
...
...
@@ -75,6 +77,15 @@ public:
return
Vec3fX
<
S
>
(
data
.
getRow
(
i
));
}
inline
EigenType
derived
()
const
{
EigenType
ret
;
for
(
int
i
=
0
;
i
<
3
;
++
i
)
for
(
int
j
=
0
;
j
<
3
;
++
j
)
ret
(
i
,
j
)
=
data
(
i
,
j
);
return
ret
;
}
inline
U
operator
()
(
size_t
i
,
size_t
j
)
const
{
return
data
(
i
,
j
);
...
...
This diff is collapsed.
Click to expand it.
include/hpp/fcl/math/vec_3fx.h
+
7
−
0
View file @
ff8b2c31
...
...
@@ -45,6 +45,7 @@
#include
<iostream>
#include
<limits>
#include
<Eigen/Core>
namespace
fcl
{
...
...
@@ -55,6 +56,7 @@ class Vec3fX
{
public:
typedef
typename
T
::
meta_type
U
;
typedef
Eigen
::
Matrix
<
U
,
3
,
1
>
EigenType
;
/// @brief interval vector3 data
T
data
;
...
...
@@ -71,6 +73,11 @@ public:
/// @brief create vector using the internal data type
Vec3fX
(
const
T
&
data_
)
:
data
(
data_
)
{}
inline
EigenType
derived
()
const
{
return
EigenType
(
data
[
0
],
data
[
1
],
data
[
2
]);
}
inline
U
operator
[]
(
size_t
i
)
const
{
return
data
[
i
];
}
inline
U
&
operator
[]
(
size_t
i
)
{
return
data
[
i
];
}
...
...
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