Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Simox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
Simox
Commits
581197d6
Commit
581197d6
authored
5 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Use simox::meta enable_ifs
parent
e1d6507c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SimoxUtility/math/pose.h
+6
-7
6 additions, 7 deletions
SimoxUtility/math/pose.h
with
6 additions
and
7 deletions
SimoxUtility/math/pose.h
+
6
−
7
View file @
581197d6
...
...
@@ -3,6 +3,8 @@
#include
<Eigen/Core>
#include
<Eigen/Geometry>
#include
<SimoxUtility/meta/eigen/enable_if_compile_time_size.h>
namespace
simox
::
math
{
...
...
@@ -37,11 +39,12 @@ namespace simox::math
/**
* @brief Get the orientation block from the given pose.
*
* You can assign to the result:
* You can assign to the result
or modify it in-place
:
* @code
* Eigen::Matrix4f pose;
* math::orientation(pose) = Eigen::Matrix3f::Identity();
* math::orientation(pose) = Eigen::Quaternionf::Identity().toRotationMatrix();
* math::orientation(pose).transposeInPlace();
* @endcode
*/
template
<
typename
Derived
>
...
...
@@ -84,9 +87,7 @@ namespace simox::math
}
/// Build a pose matrix from the given position with identity orientation.
template
<
typename
Derived
,
std
::
enable_if_t
<
Eigen
::
MatrixBase
<
Derived
>
::
RowsAtCompileTime
==
3
&&
Eigen
::
MatrixBase
<
Derived
>::
ColsAtCompileTime
==
1
,
int
>
=
0
>
template
<
typename
Derived
,
simox
::
meta
::
enable_if_vec3
<
Derived
,
int
>
=
0
>
Eigen
::
Matrix4f
pose
(
const
Eigen
::
MatrixBase
<
Derived
>&
position
)
{
...
...
@@ -94,9 +95,7 @@ namespace simox::math
}
/// Build a pose matrix from the given orientation matrix and zero position.
template
<
typename
Derived
,
std
::
enable_if_t
<
Eigen
::
MatrixBase
<
Derived
>
::
RowsAtCompileTime
==
3
&&
Eigen
::
MatrixBase
<
Derived
>::
ColsAtCompileTime
==
3
,
int
>
=
0
>
template
<
typename
Derived
,
simox
::
meta
::
enable_if_mat3
<
Derived
,
int
>
=
0
>
Eigen
::
Matrix4f
pose
(
const
Eigen
::
MatrixBase
<
Derived
>&
orientation
)
{
...
...
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