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
Humanoid Path Planner
hpp-fcl
Commits
c60dd501
Commit
c60dd501
authored
Sep 02, 2019
by
Joseph Mirabel
Browse files
[GJK] Code cleaning.
parent
0e08752e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
include/hpp/fcl/narrowphase/gjk.h
View file @
c60dd501
...
...
@@ -114,7 +114,7 @@ struct GJK
{
/// @brief support vector for shape 0 and 1.
Vec3f
w0
,
w1
;
/// @brie
g
support vector (i.e., the furthest point on the shape along the support direction)
/// @brie
f
support vector (i.e., the furthest point on the shape along the support direction)
Vec3f
w
;
};
...
...
@@ -125,12 +125,12 @@ struct GJK
/// @brief size of simplex (number of vertices)
short
rank
;
Simplex
()
:
rank
(
0
)
{}
Simplex
()
{}
};
enum
Status
{
Valid
,
Inside
,
Failed
};
MinkowskiDiff
shape
;
MinkowskiDiff
const
*
shape
;
Vec3f
ray
;
FCL_REAL
distance
;
Simplex
simplices
[
2
];
...
...
@@ -145,7 +145,7 @@ struct GJK
void
initialize
();
/// @brief GJK algorithm, given the initial value guess
Status
evaluate
(
const
MinkowskiDiff
&
shape
_
,
const
Vec3f
&
guess
);
Status
evaluate
(
const
MinkowskiDiff
&
shape
,
const
Vec3f
&
guess
);
/// @brief apply the support function along a direction, the result is return in sv
void
getSupport
(
const
Vec3f
&
d
,
bool
dIsNormalized
,
SimplexV
&
sv
)
const
;
...
...
@@ -175,8 +175,8 @@ struct GJK
private:
SimplexV
store_v
[
4
];
SimplexV
*
free_v
[
4
];
s
ize_
t
nfree
;
s
ize_
t
current
;
s
hor
t
nfree
;
s
hor
t
current
;
Simplex
*
simplex
;
Status
status
;
...
...
@@ -184,13 +184,13 @@ private:
FCL_REAL
tolerance
;
/// @brief Project origin (0) onto line a-b
FCL_REAL
projectLineOrigin
(
const
Simplex
&
current
,
Simplex
&
next
);
bool
projectLineOrigin
(
const
Simplex
&
current
,
Simplex
&
next
);
/// @brief Project origin (0) onto triangle a-b-c
FCL_REAL
projectTriangleOrigin
(
const
Simplex
&
current
,
Simplex
&
next
);
bool
projectTriangleOrigin
(
const
Simplex
&
current
,
Simplex
&
next
);
/// @brief Project origin (0) onto tetrahedran a-b-c-d
FCL_REAL
projectTetrahedraOrigin
(
const
Simplex
&
current
,
Simplex
&
next
);
bool
projectTetrahedraOrigin
(
const
Simplex
&
current
,
Simplex
&
next
);
};
...
...
src/narrowphase/gjk.cpp
View file @
c60dd501
This diff is collapsed.
Click to expand it.
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