Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
coal
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
Coal
coal
Commits
5741939b
Commit
5741939b
authored
8 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Rename Quaternion3f::Transform to transform_return_type
parent
0cf03ade
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
include/hpp/fcl/math/transform.h
+18
-17
18 additions, 17 deletions
include/hpp/fcl/math/transform.h
with
18 additions
and
17 deletions
include/hpp/fcl/math/transform.h
+
18
−
17
View file @
5741939b
...
...
@@ -52,7 +52,22 @@ private:
typedef
Eigen
::
Matrix
<
FCL_REAL
,
4
,
1
>
Vec4f
;
typedef
typename
Vec4f
::
FixedSegmentReturnType
<
3
>::
Type
XYZ_t
;
typedef
typename
Vec4f
::
ConstFixedSegmentReturnType
<
3
>::
Type
XYZConst_t
;
public:
template
<
typename
Derived
>
struct
transform_return_type
{
typedef
typename
XYZConst_t
::
cross_product_return_type
<
Derived
>::
type
Cross_t
;
typedef
Eigen
::
CwiseBinaryOp
<
Eigen
::
internal
::
scalar_sum_op
<
FCL_REAL
>
,
const
typename
Derived
::
ScalarMultipleReturnType
,
const
typename
Cross_t
::
ScalarMultipleReturnType
>
RightSum_t
;
typedef
Eigen
::
CwiseBinaryOp
<
Eigen
::
internal
::
scalar_sum_op
<
FCL_REAL
>
,
const
typename
XYZConst_t
::
ScalarMultipleReturnType
,
const
RightSum_t
>
Type
;
};
enum
{
W
=
0
,
X
=
1
,
...
...
@@ -168,24 +183,10 @@ public:
if
(
n
>
0
)
data
*=
1
/
sqrt
(
n
);
}
template
<
typename
Derived
>
struct
Transform
{
typedef
typename
XYZConst_t
::
cross_product_return_type
<
Derived
>::
type
Cross_t
;
typedef
Eigen
::
CwiseBinaryOp
<
Eigen
::
internal
::
scalar_sum_op
<
FCL_REAL
>
,
const
typename
Derived
::
ScalarMultipleReturnType
,
const
typename
Cross_t
::
ScalarMultipleReturnType
>
RightSum_t
;
typedef
Eigen
::
CwiseBinaryOp
<
Eigen
::
internal
::
scalar_sum_op
<
FCL_REAL
>
,
const
typename
XYZConst_t
::
ScalarMultipleReturnType
,
const
RightSum_t
>
Type
;
};
/// @brief rotate a vector
template
<
typename
Derived
>
/*inline Vec3f transform(const Eigen::MatrixBase<Derived>& v) const*/
inline
typename
T
ransform
<
Derived
>::
Type
inline
typename
t
ransform
_return_type
<
Derived
>::
Type
transform
(
const
Eigen
::
MatrixBase
<
Derived
>&
v
)
const
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE
(
Derived
,
3
);
...
...
@@ -194,8 +195,8 @@ public:
/*return 2*u.dot(v)*u + (s*s - u.dot(u))*v + 2*s*u.cross(v);*/
const
FCL_REAL
uDv
=
u
.
dot
(
v
);
const
FCL_REAL
uDu
=
u
.
dot
(
u
);
const
typename
T
ransform
<
Derived
>::
RightSum_t
rhs
((
s
*
s
-
uDu
)
*
v
,
2
*
s
*
u
.
cross
(
v
.
derived
()));
return
typename
T
ransform
<
Derived
>::
Type
(
2
*
uDv
*
u
,
rhs
);
const
typename
t
ransform
_return_type
<
Derived
>::
RightSum_t
rhs
((
s
*
s
-
uDu
)
*
v
,
2
*
s
*
u
.
cross
(
v
.
derived
()));
return
typename
t
ransform
_return_type
<
Derived
>::
Type
(
2
*
uDv
*
u
,
rhs
);
}
bool
operator
==
(
const
Quaternion3f
&
other
)
const
...
...
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