Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-fcl
Commits
a1edfb87
Commit
a1edfb87
authored
May 10, 2017
by
Joseph Mirabel
Committed by
Joseph Mirabel
May 10, 2017
Browse files
Fix some uninitialized Vec3f
parent
f77bad18
Changes
2
Show whitespace changes
Inline
Side-by-side
include/hpp/fcl/math/transform.h
View file @
a1edfb87
...
...
@@ -100,8 +100,8 @@ public:
/// @brief Construct transform from rotation
Transform3f
(
const
Matrix3f
&
R_
)
:
matrix_set
(
true
),
T
(
Vec3f
::
Zero
()
),
R
(
R_
)
R
(
R_
),
T
(
Vec3f
::
Zero
()
)
{
q
=
Quaternion3f
(
R_
);
}
...
...
src/narrowphase/narrowphase.cpp
View file @
a1edfb87
...
...
@@ -142,7 +142,7 @@ bool sphereSphereIntersect(const Sphere& s1, const Transform3f& tf1,
const
Sphere
&
s2
,
const
Transform3f
&
tf2
,
Vec3f
*
contact_points
,
FCL_REAL
*
penetration_depth
,
Vec3f
*
normal
)
{
Vec3f
diff
=
tf2
.
transform
(
Vec3f
())
-
tf1
.
transform
(
Vec3f
()
);
Vec3f
diff
=
tf2
.
getTranslation
()
-
tf1
.
getTranslation
(
);
FCL_REAL
len
=
diff
.
norm
();
if
(
len
>
s1
.
radius
+
s2
.
radius
)
return
false
;
...
...
@@ -161,7 +161,7 @@ bool sphereSphereIntersect(const Sphere& s1, const Transform3f& tf1,
}
if
(
contact_points
)
*
contact_points
=
tf1
.
transform
(
Vec3f
(
0
,
0
,
0
)
)
+
diff
*
s1
.
radius
/
(
s1
.
radius
+
s2
.
radius
);
*
contact_points
=
tf1
.
getTranslation
(
)
+
diff
*
s1
.
radius
/
(
s1
.
radius
+
s2
.
radius
);
return
true
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment