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
7f436317
Commit
7f436317
authored
Sep 03, 2019
by
Lucile Remigy
Browse files
Start renaming of BVTesting
parent
075a5d7c
Changes
8
Hide whitespace changes
Inline
Side-by-side
include/hpp/fcl/traversal/traversal_node_base.h
View file @
7f436317
...
...
@@ -139,10 +139,10 @@ public:
/// @brief BV test between b1 and b2
/// \return a lower bound of the distance between the two BV.
/// \note except for OBB, this method returns the distance.
virtual
FCL_REAL
BV
Testing
(
int
b1
,
int
b2
)
const
;
virtual
FCL_REAL
BV
Disjoints
(
int
b1
,
int
b2
)
const
;
/// @brief Leaf test between node b1 and b2, if they are both leafs
virtual
void
leaf
Testing
(
int
b1
,
int
b2
)
const
=
0
;
virtual
void
leaf
Collides
(
int
b1
,
int
b2
)
const
=
0
;
/// @brief Check whether the traversal can stop
virtual
bool
canStop
(
FCL_REAL
c
)
const
;
...
...
include/hpp/fcl/traversal/traversal_node_bvh_shape.h
View file @
7f436317
...
...
@@ -166,7 +166,7 @@ public:
}
/// @brief BV culling test in one BVTT node
bool
BV
Testing
(
int
b1
,
int
/*b2*/
)
const
bool
BV
Disjoints
(
int
b1
,
int
/*b2*/
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
if
(
RTIsIdentity
)
...
...
@@ -180,7 +180,7 @@ public:
/// \retval sqrDistLowerBound square of a lower bound of the minimal
/// distance between bounding volumes.
/// @brief BV culling test in one BVTT node
bool
BV
Testing
(
int
b1
,
int
/*b2*/
,
FCL_REAL
&
sqrDistLowerBound
)
const
bool
BV
Disjoints
(
int
b1
,
int
/*b2*/
,
FCL_REAL
&
sqrDistLowerBound
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
bool
res
;
...
...
@@ -195,7 +195,7 @@ public:
}
/// @brief Intersection testing between leaves (one triangle and one shape)
void
leaf
Testing
(
int
b1
,
int
/*b2*/
,
FCL_REAL
&
sqrDistLowerBound
)
const
void
leaf
Collides
(
int
b1
,
int
/*b2*/
,
FCL_REAL
&
sqrDistLowerBound
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_leaf_tests
++
;
const
BVNode
<
BV
>&
node
=
this
->
model1
->
getBV
(
b1
);
...
...
@@ -327,7 +327,7 @@ public:
/// BV test between b1 and b2
/// \param b2 Bounding volumes to test,
bool
BV
Testing
(
int
/*b1*/
,
int
b2
)
const
bool
BV
Disjoints
(
int
/*b1*/
,
int
b2
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
if
(
RTIsIdentity
)
...
...
@@ -340,7 +340,7 @@ public:
/// \param b2 Bounding volumes to test,
/// \retval sqrDistLowerBound square of a lower bound of the minimal
/// distance between bounding volumes.
bool
BV
Testing
(
int
/*b1*/
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
bool
BV
Disjoints
(
int
/*b1*/
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
bool
res
;
...
...
@@ -355,7 +355,7 @@ public:
}
/// @brief Intersection testing between leaves (one shape and one triangle)
void
leaf
Testing
(
int
/*b1*/
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
void
leaf
Collides
(
int
/*b1*/
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_leaf_tests
++
;
const
BVNode
<
BV
>&
node
=
this
->
model2
->
getBV
(
b2
);
...
...
@@ -493,7 +493,7 @@ public:
}
/// @brief BV culling test in one BVTT node
FCL_REAL
BV
Testing
(
int
b1
,
int
/*b2*/
)
const
FCL_REAL
BV
Disjoints
(
int
b1
,
int
/*b2*/
)
const
{
return
model1
->
getBV
(
b1
).
bv
.
distance
(
model2_bv
);
}
...
...
@@ -541,7 +541,7 @@ public:
}
/// @brief BV culling test in one BVTT node
FCL_REAL
BV
Testing
(
int
b1
,
int
b2
)
const
FCL_REAL
BV
Disjoints
(
int
b1
,
int
b2
)
const
{
return
model1_bv
.
distance
(
model2
->
getBV
(
b2
).
bv
);
}
...
...
@@ -573,7 +573,7 @@ public:
}
/// @brief Distance testing between leaves (one triangle and one shape)
void
leaf
Testing
(
int
b1
,
int
/*b2*/
)
const
void
leaf
Collides
(
int
b1
,
int
/*b2*/
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_leaf_tests
++
;
...
...
@@ -700,13 +700,13 @@ public:
{
}
FCL_REAL
BV
Testing
(
int
b1
,
int
/*b2*/
)
const
FCL_REAL
BV
Disjoints
(
int
b1
,
int
/*b2*/
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
return
distance
(
this
->
tf1
.
getRotation
(),
this
->
tf1
.
getTranslation
(),
this
->
model2_bv
,
this
->
model1
->
getBV
(
b1
).
bv
);
}
void
leaf
Testing
(
int
b1
,
int
b2
)
const
void
leaf
Collides
(
int
b1
,
int
b2
)
const
{
details
::
meshShapeDistanceOrientedNodeLeafTesting
(
b1
,
b2
,
this
->
model1
,
*
(
this
->
model2
),
this
->
vertices
,
this
->
tri_indices
,
this
->
tf1
,
this
->
tf2
,
this
->
nsolver
,
this
->
enable_statistics
,
this
->
num_leaf_tests
,
this
->
request
,
*
(
this
->
result
));
...
...
@@ -732,13 +732,13 @@ public:
{
}
FCL_REAL
BV
Testing
(
int
b1
,
int
/*b2*/
)
const
FCL_REAL
BV
Disjoints
(
int
b1
,
int
/*b2*/
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
return
distance
(
this
->
tf1
.
getRotation
(),
this
->
tf1
.
getTranslation
(),
this
->
model2_bv
,
this
->
model1
->
getBV
(
b1
).
bv
);
}
void
leaf
Testing
(
int
b1
,
int
b2
)
const
void
leaf
Collides
(
int
b1
,
int
b2
)
const
{
details
::
meshShapeDistanceOrientedNodeLeafTesting
(
b1
,
b2
,
this
->
model1
,
*
(
this
->
model2
),
this
->
vertices
,
this
->
tri_indices
,
this
->
tf1
,
this
->
tf2
,
this
->
nsolver
,
this
->
enable_statistics
,
this
->
num_leaf_tests
,
this
->
request
,
*
(
this
->
result
));
...
...
@@ -765,13 +765,13 @@ public:
}
FCL_REAL
BV
Testing
(
int
b1
,
int
/*b2*/
)
const
FCL_REAL
BV
Disjoints
(
int
b1
,
int
/*b2*/
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
return
distance
(
this
->
tf1
.
getRotation
(),
this
->
tf1
.
getTranslation
(),
this
->
model2_bv
,
this
->
model1
->
getBV
(
b1
).
bv
);
}
void
leaf
Testing
(
int
b1
,
int
b2
)
const
void
leaf
Collides
(
int
b1
,
int
b2
)
const
{
details
::
meshShapeDistanceOrientedNodeLeafTesting
(
b1
,
b2
,
this
->
model1
,
*
(
this
->
model2
),
this
->
vertices
,
this
->
tri_indices
,
this
->
tf1
,
this
->
tf2
,
this
->
nsolver
,
this
->
enable_statistics
,
this
->
num_leaf_tests
,
this
->
request
,
*
(
this
->
result
));
...
...
@@ -796,7 +796,7 @@ public:
}
/// @brief Distance testing between leaves (one shape and one triangle)
void
leaf
Testing
(
int
b1
,
int
b2
)
const
void
leaf
Collides
(
int
b1
,
int
b2
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_leaf_tests
++
;
...
...
@@ -856,13 +856,13 @@ public:
{
}
FCL_REAL
BV
Testing
(
int
b1
,
int
b2
)
const
FCL_REAL
BV
Disjoints
(
int
b1
,
int
b2
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
return
distance
(
this
->
tf2
.
getRotation
(),
this
->
tf2
.
getTranslation
(),
this
->
model1_bv
,
this
->
model2
->
getBV
(
b2
).
bv
);
}
void
leaf
Testing
(
int
b1
,
int
b2
)
const
void
leaf
Collides
(
int
b1
,
int
b2
)
const
{
details
::
meshShapeDistanceOrientedNodeLeafTesting
(
b2
,
b1
,
this
->
model2
,
*
(
this
->
model1
),
this
->
vertices
,
this
->
tri_indices
,
this
->
tf2
,
this
->
tf1
,
this
->
nsolver
,
this
->
enable_statistics
,
this
->
num_leaf_tests
,
this
->
request
,
*
(
this
->
result
));
...
...
@@ -888,13 +888,13 @@ public:
{
}
FCL_REAL
BV
Testing
(
int
b1
,
int
b2
)
const
FCL_REAL
BV
Disjoints
(
int
b1
,
int
b2
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
return
distance
(
this
->
tf2
.
getRotation
(),
this
->
tf2
.
getTranslation
(),
this
->
model1_bv
,
this
->
model2
->
getBV
(
b2
).
bv
);
}
void
leaf
Testing
(
int
b1
,
int
b2
)
const
void
leaf
Collides
(
int
b1
,
int
b2
)
const
{
details
::
meshShapeDistanceOrientedNodeLeafTesting
(
b2
,
b1
,
this
->
model2
,
*
(
this
->
model1
),
this
->
vertices
,
this
->
tri_indices
,
this
->
tf2
,
this
->
tf1
,
this
->
nsolver
,
this
->
enable_statistics
,
this
->
num_leaf_tests
,
this
->
request
,
*
(
this
->
result
));
...
...
@@ -920,13 +920,13 @@ public:
{
}
FCL_REAL
BV
Testing
(
int
b1
,
int
b2
)
const
FCL_REAL
BV
Disjoints
(
int
b1
,
int
b2
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
return
distance
(
this
->
tf2
.
getRotation
(),
this
->
tf2
.
getTranslation
(),
this
->
model1_bv
,
this
->
model2
->
getBV
(
b2
).
bv
);
}
void
leaf
Testing
(
int
b1
,
int
b2
)
const
void
leaf
Collides
(
int
b1
,
int
b2
)
const
{
details
::
meshShapeDistanceOrientedNodeLeafTesting
(
b2
,
b1
,
this
->
model2
,
*
(
this
->
model1
),
this
->
vertices
,
this
->
tri_indices
,
this
->
tf2
,
this
->
tf1
,
this
->
nsolver
,
this
->
enable_statistics
,
this
->
num_leaf_tests
,
this
->
request
,
*
(
this
->
result
));
...
...
include/hpp/fcl/traversal/traversal_node_bvhs.h
View file @
7f436317
...
...
@@ -157,7 +157,7 @@ public:
}
/// @brief BV culling test in one BVTT node
bool
BV
Testing
(
int
b1
,
int
b2
)
const
bool
BV
Disjoints
(
int
b1
,
int
b2
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
if
(
RTIsIdentity
)
...
...
@@ -171,7 +171,7 @@ public:
/// \param b1, b2 Bounding volumes to test,
/// \retval sqrDistLowerBound square of a lower bound of the minimal
/// distance between bounding volumes.
bool
BV
Testing
(
int
b1
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
bool
BV
Disjoints
(
int
b1
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_bv_tests
++
;
if
(
RTIsIdentity
)
...
...
@@ -200,7 +200,7 @@ public:
/// \note If the distance between objects is less than the security margin,
/// and the object are not colliding, the penetration depth is
/// negative.
void
leaf
Testing
(
int
b1
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
void
leaf
Collides
(
int
b1
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_leaf_tests
++
;
...
...
@@ -361,7 +361,7 @@ public:
}
/// @brief BV culling test in one BVTT node
FCL_REAL
BV
Testing
(
int
b1
,
int
b2
)
const
FCL_REAL
BV
Disjoints
(
int
b1
,
int
b2
)
const
{
if
(
enable_statistics
)
num_bv_tests
++
;
return
details
::
DistanceTraversalBVTesting_impl
<
BV
>
...
...
@@ -397,7 +397,7 @@ public:
}
/// @brief Distance testing between leaves (two triangles)
void
leaf
Testing
(
int
b1
,
int
b2
)
const
void
leaf
Collides
(
int
b1
,
int
b2
)
const
{
if
(
this
->
enable_statistics
)
this
->
num_leaf_tests
++
;
...
...
@@ -457,7 +457,7 @@ public:
void
postprocess
();
FCL_REAL
BV
Testing
(
int
b1
,
int
b2
)
const
;
FCL_REAL
BV
Disjoints
(
int
b1
,
int
b2
)
const
;
void
leafTesting
(
int
b1
,
int
b2
)
const
;
...
...
@@ -475,7 +475,7 @@ public:
void
postprocess
();
FCL_REAL
BV
Testing
(
int
b1
,
int
b2
)
const
;
FCL_REAL
BV
Disjoints
(
int
b1
,
int
b2
)
const
;
void
leafTesting
(
int
b1
,
int
b2
)
const
;
...
...
@@ -492,9 +492,9 @@ public:
void
postprocess
();
FCL_REAL
BV
Testing
(
int
b1
,
int
b2
)
const
;
FCL_REAL
BV
Disjoints
(
int
b1
,
int
b2
)
const
;
FCL_REAL
BV
Testing
(
int
b1
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
;
FCL_REAL
BV
Disjoints
(
int
b1
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
;
void
leafTesting
(
int
b1
,
int
b2
)
const
;
...
...
@@ -525,4 +525,4 @@ inline const Matrix3f& getBVAxes<OBBRSS>(const OBBRSS& bv)
}
// namespace hpp
#endif
#endif
\ No newline at end of file
include/hpp/fcl/traversal/traversal_node_octree.h
View file @
7f436317
...
...
@@ -903,17 +903,17 @@ public:
otsolver
=
NULL
;
}
bool
BV
Testing
(
int
,
int
)
const
bool
BV
Disjoints
(
int
,
int
)
const
{
return
false
;
}
bool
BV
Testing
(
int
,
int
,
FCL_REAL
&
)
const
bool
BV
Disjoints
(
int
,
int
,
FCL_REAL
&
)
const
{
return
false
;
}
void
leaf
Testing
(
int
,
int
,
FCL_REAL
&
)
const
void
leaf
Collides
(
int
,
int
,
FCL_REAL
&
)
const
{
otsolver
->
OcTreeIntersect
(
model1
,
model2
,
tf1
,
tf2
,
request
,
*
result
);
}
...
...
@@ -940,17 +940,17 @@ public:
}
FCL_REAL
BV
Testing
(
int
,
int
)
const
FCL_REAL
BV
Disjoints
(
int
,
int
)
const
{
return
-
1
;
}
bool
BV
Testing
(
int
,
int
,
FCL_REAL
&
)
const
bool
BV
Disjoints
(
int
,
int
,
FCL_REAL
&
)
const
{
return
false
;
}
void
leaf
Testing
(
int
,
int
)
const
void
leaf
Collides
(
int
,
int
)
const
{
otsolver
->
OcTreeDistance
(
model1
,
model2
,
tf1
,
tf2
,
request
,
*
result
);
}
...
...
@@ -975,17 +975,17 @@ public:
otsolver
=
NULL
;
}
bool
BV
Testing
(
int
,
int
)
const
bool
BV
Disjoints
(
int
,
int
)
const
{
return
false
;
}
bool
BV
Testing
(
int
,
int
,
FCL_REAL
&
)
const
bool
BV
Disjoints
(
int
,
int
,
FCL_REAL
&
)
const
{
return
false
;
}
void
leaf
Testing
(
int
,
int
,
FCL_REAL
&
)
const
void
leaf
Collides
(
int
,
int
,
FCL_REAL
&
)
const
{
otsolver
->
OcTreeShapeIntersect
(
model2
,
*
model1
,
tf2
,
tf1
,
request
,
*
result
);
}
...
...
@@ -1012,17 +1012,17 @@ public:
otsolver
=
NULL
;
}
bool
BV
Testing
(
int
,
int
)
const
bool
BV
Disjoints
(
int
,
int
)
const
{
return
false
;
}
bool
BV
Testing
(
int
,
int
,
fcl
::
FCL_REAL
&
)
const
bool
BV
Disjoints
(
int
,
int
,
fcl
::
FCL_REAL
&
)
const
{
return
false
;
}
void
leaf
Testing
(
int
,
int
,
FCL_REAL
&
)
const
void
leaf
Collides
(
int
,
int
,
FCL_REAL
&
)
const
{
otsolver
->
OcTreeShapeIntersect
(
model1
,
*
model2
,
tf1
,
tf2
,
request
,
*
result
);
}
...
...
@@ -1048,12 +1048,12 @@ public:
otsolver
=
NULL
;
}
FCL_REAL
BV
Testing
(
int
,
int
)
const
FCL_REAL
BV
Disjoints
(
int
,
int
)
const
{
return
-
1
;
}
void
leaf
Testing
(
int
,
int
)
const
void
leaf
Collides
(
int
,
int
)
const
{
otsolver
->
OcTreeShapeDistance
(
model2
,
*
model1
,
tf2
,
tf1
,
request
,
*
result
);
}
...
...
@@ -1077,12 +1077,12 @@ public:
otsolver
=
NULL
;
}
FCL_REAL
BV
Testing
(
int
,
int
)
const
FCL_REAL
BV
Disjoints
(
int
,
int
)
const
{
return
-
1
;
}
void
leaf
Testing
(
int
,
int
)
const
void
leaf
Collides
(
int
,
int
)
const
{
otsolver
->
OcTreeShapeDistance
(
model1
,
*
model2
,
tf1
,
tf2
,
request
,
*
result
);
}
...
...
@@ -1107,17 +1107,17 @@ public:
otsolver
=
NULL
;
}
bool
BV
Testing
(
int
,
int
)
const
bool
BV
Disjoints
(
int
,
int
)
const
{
return
false
;
}
bool
BV
Testing
(
int
,
int
,
FCL_REAL
&
)
const
bool
BV
Disjoints
(
int
,
int
,
FCL_REAL
&
)
const
{
return
false
;
}
void
leaf
Testing
(
int
,
int
,
FCL_REAL
&
)
const
void
leaf
Collides
(
int
,
int
,
FCL_REAL
&
)
const
{
otsolver
->
OcTreeMeshIntersect
(
model2
,
model1
,
tf2
,
tf1
,
request
,
*
result
);
}
...
...
@@ -1144,17 +1144,17 @@ public:
otsolver
=
NULL
;
}
bool
BV
Testing
(
int
,
int
)
const
bool
BV
Disjoints
(
int
,
int
)
const
{
return
false
;
}
bool
BV
Testing
(
int
,
int
,
FCL_REAL
&
)
const
bool
BV
Disjoints
(
int
,
int
,
FCL_REAL
&
)
const
{
return
false
;
}
void
leaf
Testing
(
int
,
int
,
FCL_REAL
&
)
const
void
leaf
Collides
(
int
,
int
,
FCL_REAL
&
)
const
{
otsolver
->
OcTreeMeshIntersect
(
model1
,
model2
,
tf1
,
tf2
,
request
,
*
result
);
}
...
...
@@ -1180,12 +1180,12 @@ public:
otsolver
=
NULL
;
}
FCL_REAL
BV
Testing
(
int
,
int
)
const
FCL_REAL
BV
Disjoints
(
int
,
int
)
const
{
return
-
1
;
}
void
leaf
Testing
(
int
,
int
)
const
void
leaf
Collides
(
int
,
int
)
const
{
otsolver
->
OcTreeMeshDistance
(
model2
,
model1
,
tf2
,
tf1
,
request
,
*
result
);
}
...
...
@@ -1210,12 +1210,12 @@ public:
otsolver
=
NULL
;
}
FCL_REAL
BV
Testing
(
int
,
int
)
const
FCL_REAL
BV
Disjoints
(
int
,
int
)
const
{
return
-
1
;
}
void
leaf
Testing
(
int
,
int
)
const
void
leaf
Collides
(
int
,
int
)
const
{
otsolver
->
OcTreeMeshDistance
(
model1
,
model2
,
tf1
,
tf2
,
request
,
*
result
);
}
...
...
include/hpp/fcl/traversal/traversal_node_shapes.h
View file @
7f436317
...
...
@@ -67,19 +67,19 @@ public:
}
/// @brief BV culling test in one BVTT node
bool
BV
Testing
(
int
,
int
)
const
bool
BV
Disjoints
(
int
,
int
)
const
{
return
false
;
}
/// @brief BV culling test in one BVTT node
bool
BV
Testing
(
int
,
int
,
FCL_REAL
&
)
const
bool
BV
Disjoints
(
int
,
int
,
FCL_REAL
&
)
const
{
throw
std
::
runtime_error
(
"Not implemented"
);
}
/// @brief Intersection testing between leaves (two shapes)
void
leaf
Testing
(
int
,
int
,
FCL_REAL
&
)
const
void
leaf
Collides
(
int
,
int
,
FCL_REAL
&
)
const
{
bool
is_collision
=
false
;
if
(
request
.
enable_contact
)
...
...
@@ -128,13 +128,13 @@ public:
}
/// @brief BV culling test in one BVTT node
FCL_REAL
BV
Testing
(
int
,
int
)
const
FCL_REAL
BV
Disjoints
(
int
,
int
)
const
{
return
-
1
;
// should not be used
}
/// @brief Distance testing between leaves (two shapes)
void
leaf
Testing
(
int
,
int
)
const
void
leaf
Collides
(
int
,
int
)
const
{
FCL_REAL
distance
;
Vec3f
closest_p1
,
closest_p2
,
normal
;
...
...
src/traversal/traversal_node_base.cpp
View file @
7f436317
...
...
@@ -97,7 +97,7 @@ DistanceTraversalNodeBase::~DistanceTraversalNodeBase()
{
}
FCL_REAL
DistanceTraversalNodeBase
::
BV
Testing
(
int
/*b1*/
,
int
/*b2*/
)
const
FCL_REAL
DistanceTraversalNodeBase
::
BV
Disjoints
(
int
/*b1*/
,
int
/*b2*/
)
const
{
return
std
::
numeric_limits
<
FCL_REAL
>::
max
();
}
...
...
src/traversal/traversal_node_bvhs.cpp
View file @
7f436317
...
...
@@ -152,7 +152,7 @@ void MeshDistanceTraversalNodeRSS::postprocess()
details
::
distancePostprocessOrientedNode
(
model1
,
model2
,
tf1
,
request
,
*
result
);
}
FCL_REAL
MeshDistanceTraversalNodeRSS
::
BV
Testing
(
int
b1
,
int
b2
)
const
FCL_REAL
MeshDistanceTraversalNodeRSS
::
BV
Disjoints
(
int
b1
,
int
b2
)
const
{
if
(
enable_statistics
)
num_bv_tests
++
;
return
distance
(
R
,
T
,
model1
->
getBV
(
b1
).
bv
,
model2
->
getBV
(
b2
).
bv
);
...
...
@@ -180,7 +180,7 @@ void MeshDistanceTraversalNodekIOS::postprocess()
details
::
distancePostprocessOrientedNode
(
model1
,
model2
,
tf1
,
request
,
*
result
);
}
FCL_REAL
MeshDistanceTraversalNodekIOS
::
BV
Testing
(
int
b1
,
int
b2
)
const
FCL_REAL
MeshDistanceTraversalNodekIOS
::
BV
Disjoints
(
int
b1
,
int
b2
)
const
{
if
(
enable_statistics
)
num_bv_tests
++
;
return
distance
(
R
,
T
,
model1
->
getBV
(
b1
).
bv
,
model2
->
getBV
(
b2
).
bv
);
...
...
@@ -208,7 +208,7 @@ void MeshDistanceTraversalNodeOBBRSS::postprocess()
details
::
distancePostprocessOrientedNode
(
model1
,
model2
,
tf1
,
request
,
*
result
);
}
FCL_REAL
MeshDistanceTraversalNodeOBBRSS
::
BV
Testing
(
int
b1
,
int
b2
)
const
FCL_REAL
MeshDistanceTraversalNodeOBBRSS
::
BV
Disjoints
(
int
b1
,
int
b2
)
const
{
if
(
enable_statistics
)
num_bv_tests
++
;
return
distance
(
R
,
T
,
model1
->
getBV
(
b1
).
bv
,
model2
->
getBV
(
b2
).
bv
);
...
...
src/traversal/traversal_recurse.cpp
View file @
7f436317
...
...
@@ -169,7 +169,7 @@ void distanceRecurse(DistanceTraversalNodeBase* node, int b1, int b2, BVHFrontLi
{
updateFrontList
(
front_list
,
b1
,
b2
);
node
->
leaf
Testing
(
b1
,
b2
);
node
->
leaf
Collides
(
b1
,
b2
);
return
;
}
...
...
@@ -190,8 +190,8 @@ void distanceRecurse(DistanceTraversalNodeBase* node, int b1, int b2, BVHFrontLi
c2
=
node
->
getSecondRightChild
(
b2
);
}
FCL_REAL
d1
=
node
->
BV
Testing
(
a1
,
a2
);
FCL_REAL
d2
=
node
->
BV
Testing
(
c1
,
c2
);
FCL_REAL
d1
=
node
->
BV
Disjoints
(
a1
,
a2
);
FCL_REAL
d2
=
node
->
BV
Disjoints
(
c1
,
c2
);
if
(
d2
<
d1
)
{
...
...
@@ -298,7 +298,7 @@ void distanceQueueRecurse(DistanceTraversalNodeBase* node, int b1, int b2, BVHFr
{
updateFrontList
(
front_list
,
min_test
.
b1
,
min_test
.
b2
);
node
->
leaf
Testing
(
min_test
.
b1
,
min_test
.
b2
);
node
->
leaf
Collides
(
min_test
.
b1
,
min_test
.
b2
);
}
else
if
(
bvtq
.
full
())
{
...
...
@@ -317,11 +317,11 @@ void distanceQueueRecurse(DistanceTraversalNodeBase* node, int b1, int b2, BVHFr
int
c2
=
node
->
getFirstRightChild
(
min_test
.
b1
);
bvt1
.
b1
=
c1
;
bvt1
.
b2
=
min_test
.
b2
;
bvt1
.
d
=
node
->
BV
Testing
(
bvt1
.
b1
,
bvt1
.
b2
);
bvt1
.
d
=
node
->
BV
Disjoints
(
bvt1
.
b1
,
bvt1
.
b2
);
bvt2
.
b1
=
c2
;
bvt2
.
b2
=
min_test
.
b2
;
bvt2
.
d
=
node
->
BV
Testing
(
bvt2
.
b1
,
bvt2
.
b2
);
bvt2
.
d
=
node
->
BV
Disjoints
(
bvt2
.
b1
,
bvt2
.
b2
);
}
else
{
...
...
@@ -329,11 +329,11 @@ void distanceQueueRecurse(DistanceTraversalNodeBase* node, int b1, int b2, BVHFr
int
c2
=
node
->
getSecondRightChild
(
min_test
.
b2
);
bvt1
.
b1
=
min_test
.
b1
;
bvt1
.
b2
=
c1
;
bvt1
.
d
=
node
->
BV
Testing
(
bvt1
.
b1
,
bvt1
.
b2
);
bvt1
.
d
=
node
->
BV
Disjoints
(
bvt1
.
b1
,
bvt1
.
b2
);
bvt2
.
b1
=
min_test
.
b1
;
bvt2
.
b2
=
c2
;
bvt2
.
d
=
node
->
BV
Testing
(
bvt2
.
b1
,
bvt2
.
b2
);
bvt2
.
d
=
node
->
BV
Disjoints
(
bvt2
.
b1
,
bvt2
.
b2
);
}
bvtq
.
push
(
bvt1
);
...
...
@@ -378,7 +378,7 @@ void propagateBVHFrontListCollisionRecurse
}
else
{
if
(
!
node
->
BV
Testing
(
b1
,
b2
,
sqrDistLowerBound
))
{
if
(
!
node
->
BV
Disjoints
(
b1
,
b2
,
sqrDistLowerBound
))
{
front_iter
->
valid
=
false
;
if
(
node
->
firstOverSecond
(
b1
,
b2
))
{
int
c1
=
node
->
getFirstLeftChild
(
b1
);
...
...
Write
Preview