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
c60dd501
Commit
c60dd501
authored
5 years ago
by
Joseph Mirabel
Browse files
Options
Downloads
Patches
Plain Diff
[GJK] Code cleaning.
parent
0e08752e
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/hpp/fcl/narrowphase/gjk.h
+9
-9
9 additions, 9 deletions
include/hpp/fcl/narrowphase/gjk.h
src/narrowphase/gjk.cpp
+59
-73
59 additions, 73 deletions
src/narrowphase/gjk.cpp
with
68 additions
and
82 deletions
include/hpp/fcl/narrowphase/gjk.h
+
9
−
9
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
);
};
...
...
This diff is collapsed.
Click to expand it.
src/narrowphase/gjk.cpp
+
59
−
73
View file @
c60dd501
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