Skip to content
GitLab
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
80a11c75
Commit
80a11c75
authored
Mar 09, 2013
by
Ioan Sucan
Browse files
fix some warnings
parent
465feee0
Changes
7
Hide whitespace changes
Inline
Side-by-side
CMakeModules/FCLVersion.cmake
View file @
80a11c75
# set the version in a way CMake can use
set
(
FCL_MAJOR_VERSION 0
)
set
(
FCL_MINOR_VERSION 2
)
set
(
FCL_PATCH_VERSION
7
)
set
(
FCL_PATCH_VERSION
8
)
set
(
FCL_VERSION
"
${
FCL_MAJOR_VERSION
}
.
${
FCL_MINOR_VERSION
}
.
${
FCL_PATCH_VERSION
}
"
)
# increment this when we have ABI changes
...
...
include/fcl/broadphase/hierarchy_tree.hxx
View file @
80a11c75
...
...
@@ -1032,7 +1032,7 @@ void HierarchyTree<BV>::init_1(NodeType* leaves, int n_leaves_)
SortByMorton
comp
;
comp
.
nodes
=
nodes
;
std
::
sort
(
ids
,
ids
+
n_leaves
,
comp
);
root_node
=
mortonRecurse_0
(
ids
,
ids
+
n_leaves
,
(
1
<<
coder
.
bits
()
-
1
),
coder
.
bits
()
-
1
);
root_node
=
mortonRecurse_0
(
ids
,
ids
+
n_leaves
,
(
1
<<
(
coder
.
bits
()
-
1
)
)
,
coder
.
bits
()
-
1
);
delete
[]
ids
;
refit
();
...
...
@@ -1076,7 +1076,7 @@ void HierarchyTree<BV>::init_2(NodeType* leaves, int n_leaves_)
SortByMorton
comp
;
comp
.
nodes
=
nodes
;
std
::
sort
(
ids
,
ids
+
n_leaves
,
comp
);
root_node
=
mortonRecurse_1
(
ids
,
ids
+
n_leaves
,
(
1
<<
coder
.
bits
()
-
1
),
coder
.
bits
()
-
1
);
root_node
=
mortonRecurse_1
(
ids
,
ids
+
n_leaves
,
(
1
<<
(
coder
.
bits
()
-
1
)
)
,
coder
.
bits
()
-
1
);
delete
[]
ids
;
refit
();
...
...
src/BVH/BVH_model.cpp
View file @
80a11c75
...
...
@@ -44,6 +44,7 @@ namespace fcl
template
<
typename
BV
>
BVHModel
<
BV
>::
BVHModel
(
const
BVHModel
<
BV
>&
other
)
:
CollisionGeometry
(
other
),
boost
::
noncopyable
(),
num_tris
(
other
.
num_tris
),
num_vertices
(
other
.
num_vertices
),
build_state
(
other
.
build_state
),
...
...
src/BVH/BVH_utility.cpp
View file @
80a11c75
...
...
@@ -659,7 +659,7 @@ static inline FCL_REAL maximumDistance_pointcloud(Vec3f* ps, Vec3f* ps2, unsigne
if
(
!
indices
)
indirect_index
=
false
;
FCL_REAL
maxD
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
n
;
++
i
)
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
int
index
=
indirect_index
?
indices
[
i
]
:
i
;
...
...
src/broadphase/broadphase_SaP.cpp
View file @
80a11c75
...
...
@@ -123,7 +123,7 @@ void SaPCollisionManager::registerObjects(const std::vector<CollisionObject*>& o
endpoints
[
0
]
->
prev
[
coord
]
=
NULL
;
endpoints
[
0
]
->
next
[
coord
]
=
endpoints
[
1
];
for
(
in
t
i
=
1
;
i
<
endpoints
.
size
()
-
1
;
++
i
)
for
(
size_
t
i
=
1
;
i
<
endpoints
.
size
()
-
1
;
++
i
)
{
endpoints
[
i
]
->
prev
[
coord
]
=
endpoints
[
i
-
1
];
endpoints
[
i
]
->
next
[
coord
]
=
endpoints
[
i
+
1
];
...
...
@@ -498,7 +498,7 @@ bool SaPCollisionManager::collide_(CollisionObject* obj, void* cdata, CollisionC
const
AABB
&
obj_aabb
=
obj
->
getAABB
();
FCL_REAL
min_val
=
obj_aabb
.
min_
[
axis
];
FCL_REAL
max_val
=
obj_aabb
.
max_
[
axis
];
//
FCL_REAL max_val = obj_aabb.max_[axis];
EndPoint
dummy
;
SaPAABB
dummy_aabb
;
...
...
@@ -564,7 +564,7 @@ bool SaPCollisionManager::distance_(CollisionObject* obj, void* cdata, DistanceC
{
old_min_distance
=
min_dist
;
FCL_REAL
min_val
=
aabb
.
min_
[
axis
];
FCL_REAL
max_val
=
aabb
.
max_
[
axis
];
//
FCL_REAL max_val = aabb.max_[axis];
EndPoint
dummy
;
SaPAABB
dummy_aabb
;
...
...
src/narrowphase/gjk.cpp
View file @
80a11c75
...
...
@@ -141,7 +141,7 @@ Vec3f getSupport(const ShapeBase* shape, const Vec3f& dir)
FCL_REAL
maxdot
=
-
std
::
numeric_limits
<
FCL_REAL
>::
max
();
Vec3f
*
curp
=
convex
->
points
;
Vec3f
bestv
;
for
(
size_
t
i
=
0
;
i
<
convex
->
num_points
;
++
i
,
curp
+=
1
)
for
(
in
t
i
=
0
;
i
<
convex
->
num_points
;
++
i
,
curp
+=
1
)
{
FCL_REAL
dot
=
dir
.
dot
(
*
curp
);
if
(
dot
>
maxdot
)
...
...
@@ -402,6 +402,7 @@ GJK::Status GJK::evaluate(const MinkowskiDiff& shape_, const Vec3f& guess)
{
case
Valid
:
distance
=
ray
.
length
();
break
;
case
Inside
:
distance
=
0
;
break
;
default:
break
;
}
return
status
;
}
...
...
@@ -509,8 +510,6 @@ bool EPA::getEdgeDist(SimplexF* face, SimplexV* a, SimplexV* b, FCL_REAL& dist)
if
(
a_dot_nab
<
0
)
// the origin is on the outside part of ab
{
FCL_REAL
ba_l2
=
ba
.
sqrLength
();
// following is similar to projectOrigin for two points
// however, as we dont need to compute the parameterization, dont need to compute 0 or 1
FCL_REAL
a_dot_ba
=
a
->
w
.
dot
(
ba
);
...
...
src/narrowphase/gjk_libccd.cpp
View file @
80a11c75
...
...
@@ -87,6 +87,7 @@ struct ccd_triangle_t : public ccd_obj_t
ccd_vec3_t
c
;
};
/*
static void tripleCross(const ccd_vec3_t* a, const ccd_vec3_t* b,
const ccd_vec3_t* c, ccd_vec3_t* d)
{
...
...
@@ -338,6 +339,7 @@ static int doSimplex4Dist(ccd_simplex_t *simplex, ccd_vec3_t *dir, ccd_real_t* d
return doSimplex3Dist(simplex, dir, dist);
}
static int doSimplexDist(ccd_simplex_t *simplex, ccd_vec3_t *dir, ccd_real_t* dist)
{
if(ccdSimplexSize(simplex) == 2)
...
...
@@ -360,6 +362,7 @@ static int doSimplexDist(ccd_simplex_t *simplex, ccd_vec3_t *dir, ccd_real_t* di
}
static ccd_real_t __ccdGJKDist(const void *obj1, const void *obj2,
const ccd_t *ccd, ccd_simplex_t *simplex,
ccd_real_t tolerance)
...
...
@@ -435,7 +438,7 @@ static ccd_real_t __ccdGJKDist(const void *obj1, const void *obj2,
// intersection wasn't found
return min_dist;
}
*/
/** Basic shape to ccd shape */
static
void
shapeToGJK
(
const
ShapeBase
&
s
,
const
Transform3f
&
tf
,
ccd_obj_t
*
o
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment