Commit b36e78ec authored by jpan's avatar jpan
Browse files

some more refactoring.


git-svn-id: https://kforge.ros.org/fcl/fcl_ros@105 253336fb-580f-4252-a368-f3cef5a2a82b
parent f6bfb30b
......@@ -37,7 +37,7 @@ link_directories(${CCD_LIBRARY_DIRS})
add_definitions(-DUSE_SVMLIGHT=0)
add_library(${PROJECT_NAME} SHARED src/BV/AABB.cpp src/BV/OBB.cpp src/BV/RSS.cpp src/BV/kIOS.cpp src/traversal_node_base.cpp src/traversal_node_bvhs.cpp src/intersect.cpp src/motion.cpp src/BV_fitter.cpp src/BV_splitter.cpp src/BVH_model.cpp src/BVH_utility.cpp src/transform.cpp src/simple_setup.cpp src/geometric_shapes.cpp src/geometric_shapes_utility.cpp src/gjk_libccd.cpp src/collision_node.cpp src/traversal_recurse.cpp src/broad_phase_collision.cpp src/collision.cpp src/collision_func_matrix.cpp src/interval_tree.cpp src/conservative_advancement.cpp src/matrix_3f.cpp src/interval.cpp src/interval_vector.cpp src/interval_matrix.cpp src/taylor_model.cpp src/taylor_vector.cpp src/taylor_matrix.cpp src/distance_func_matrix.cpp src/distance.cpp src/gjk.cpp)
add_library(${PROJECT_NAME} SHARED src/BV/AABB.cpp src/BV/OBB.cpp src/BV/RSS.cpp src/BV/kIOS.cpp src/BV/OBBRSS.cpp src/traversal_node_base.cpp src/traversal_node_bvhs.cpp src/intersect.cpp src/motion.cpp src/BV_fitter.cpp src/BV_splitter.cpp src/BVH_model.cpp src/BVH_utility.cpp src/transform.cpp src/simple_setup.cpp src/geometric_shapes.cpp src/geometric_shapes_utility.cpp src/gjk_libccd.cpp src/collision_node.cpp src/traversal_recurse.cpp src/broad_phase_collision.cpp src/collision.cpp src/collision_func_matrix.cpp src/interval_tree.cpp src/conservative_advancement.cpp src/matrix_3f.cpp src/interval.cpp src/interval_vector.cpp src/interval_matrix.cpp src/taylor_model.cpp src/taylor_vector.cpp src/taylor_matrix.cpp src/distance_func_matrix.cpp src/distance.cpp src/gjk.cpp)
target_link_libraries(${PROJECT_NAME} ${FLANN_LIBRARIES} ${CCD_LIBRARIES})
......
......@@ -40,7 +40,8 @@
#include "fcl/BVH_internal.h"
#include "fcl/vec_3f.h"
#include "fcl/matrix_3f.h"
#include "fcl/BV/OBB.h"
#include "fcl/BV/RSS.h"
namespace fcl
{
......@@ -127,15 +128,9 @@ public:
};
static bool overlap(const Matrix3f& R0, const Vec3f& T0, const OBBRSS& b1, const OBBRSS& b2)
{
return overlap(R0, T0, b1.obb, b2.obb);
}
bool overlap(const Matrix3f& R0, const Vec3f& T0, const OBBRSS& b1, const OBBRSS& b2);
static BVH_REAL distance(const Matrix3f& R0, const Vec3f& T0, const OBBRSS& b1, const OBBRSS& b2, Vec3f* P = NULL, Vec3f* Q = NULL)
{
return distance(R0, T0, b1.rss, b2.rss, P, Q);
}
BVH_REAL distance(const Matrix3f& R0, const Vec3f& T0, const OBBRSS& b1, const OBBRSS& b2, Vec3f* P = NULL, Vec3f* Q = NULL);
}
......
......@@ -44,8 +44,8 @@
#if USE_SVMLIGHT
extern "C"
{
# include <svm_light/svm_common.h>
# include <svm_light/svm_learn.h>
#include <svm_light/svm_common.h>
#include <svm_light/svm_learn.h>
}
#endif
......
......@@ -158,14 +158,15 @@ bool initialize(ShapeMeshCollisionTraversalNode<S, BV, NarrowPhaseSolver>& node,
}
namespace details
{
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for OBB type */
template<typename S, typename NarrowPhaseSolver>
bool initialize(MeshShapeCollisionTraversalNodeOBB<S, NarrowPhaseSolver>& node,
const BVHModel<OBB>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
int num_max_contacts = 1, bool exhaustive = false, bool enable_contact = false)
template<typename BV, typename S, typename NarrowPhaseSolver, template<typename, typename> class OrientedNode>
static inline bool setupMeshShapeCollisionOrientedNode(OrientedNode<S, NarrowPhaseSolver>& node,
const BVHModel<BV>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
int num_max_contacts, bool exhaustive, bool enable_contact)
{
if(model1.getModelType() != BVH_MODEL_TRIANGLES)
return false;
......@@ -190,39 +191,21 @@ bool initialize(MeshShapeCollisionTraversalNodeOBB<S, NarrowPhaseSolver>& node,
return true;
}
}
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for OBB type */
template<typename S, typename NarrowPhaseSolver>
bool initialize(ShapeMeshCollisionTraversalNodeOBB<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<OBB>& model2, const SimpleTransform& tf2,
bool initialize(MeshShapeCollisionTraversalNodeOBB<S, NarrowPhaseSolver>& node,
const BVHModel<OBB>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
int num_max_contacts = 1, bool exhaustive = false, bool enable_contact = false)
{
if(model2.getModelType() != BVH_MODEL_TRIANGLES)
return false;
node.model1 = &model1;
node.tf1 = tf1;
node.model2 = &model2;
node.tf2 = tf2;
node.nsolver = nsolver;
computeBV(model1, tf1, node.model1_bv);
node.vertices = model2.vertices;
node.tri_indices = model2.tri_indices;
node.num_max_contacts = num_max_contacts;
node.exhaustive = exhaustive;
node.enable_contact = enable_contact;
node.R = tf2.getRotation();
node.T = tf2.getTranslation();
return true;
return details::setupMeshShapeCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, num_max_contacts, exhaustive, enable_contact);
}
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for RSS type */
template<typename S, typename NarrowPhaseSolver>
bool initialize(MeshShapeCollisionTraversalNodeRSS<S, NarrowPhaseSolver>& node,
......@@ -231,37 +214,41 @@ bool initialize(MeshShapeCollisionTraversalNodeRSS<S, NarrowPhaseSolver>& node,
const NarrowPhaseSolver* nsolver,
int num_max_contacts = 1, bool exhaustive = false, bool enable_contact = false)
{
if(model1.getModelType() != BVH_MODEL_TRIANGLES)
return false;
node.model1 = &model1;
node.tf1 = tf1;
node.model2 = &model2;
node.tf2 = tf2;
node.nsolver = nsolver;
computeBV(model2, tf2, node.model2_bv);
node.vertices = model1.vertices;
node.tri_indices = model1.tri_indices;
node.num_max_contacts = num_max_contacts;
node.exhaustive = exhaustive;
node.enable_contact = enable_contact;
node.R = tf1.getRotation();
node.T = tf1.getTranslation();
return true;
return details::setupMeshShapeCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, num_max_contacts, exhaustive, enable_contact);
}
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for kIOS type */
template<typename S, typename NarrowPhaseSolver>
bool initialize(MeshShapeCollisionTraversalNodekIOS<S, NarrowPhaseSolver>& node,
const BVHModel<kIOS>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
int num_max_contacts = 1, bool exhaustive = false, bool enable_contact = false)
{
return details::setupMeshShapeCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, num_max_contacts, exhaustive, enable_contact);
}
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for RSS type */
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for OBBRSS type */
template<typename S, typename NarrowPhaseSolver>
bool initialize(ShapeMeshCollisionTraversalNodeRSS<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<RSS>& model2, const SimpleTransform& tf2,
bool initialize(MeshShapeCollisionTraversalNodeOBBRSS<S, NarrowPhaseSolver>& node,
const BVHModel<OBBRSS>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
int num_max_contacts = 1, bool exhaustive = false, bool enable_contact = false)
{
return details::setupMeshShapeCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, num_max_contacts, exhaustive, enable_contact);
}
namespace details
{
template<typename S, typename BV, typename NarrowPhaseSolver, template<typename, typename> class OrientedNode>
static inline bool setupShapeMeshCollisionOrientedNode(OrientedNode<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<BV>& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
int num_max_contacts, bool exhaustive, bool enable_contact)
{
if(model2.getModelType() != BVH_MODEL_TRIANGLES)
return false;
......@@ -285,104 +272,42 @@ bool initialize(ShapeMeshCollisionTraversalNodeRSS<S, NarrowPhaseSolver>& node,
return true;
}
}
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for kIOS type */
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for OBB type */
template<typename S, typename NarrowPhaseSolver>
bool initialize(MeshShapeCollisionTraversalNodekIOS<S, NarrowPhaseSolver>& node,
const BVHModel<kIOS>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
bool initialize(ShapeMeshCollisionTraversalNodeOBB<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<OBB>& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
int num_max_contacts = 1, bool exhaustive = false, bool enable_contact = false)
{
if(model1.getModelType() != BVH_MODEL_TRIANGLES)
return false;
node.model1 = &model1;
node.tf1 = tf1;
node.model2 = &model2;
node.tf2 = tf2;
node.nsolver = nsolver;
computeBV(model2, tf2, node.model2_bv);
node.vertices = model1.vertices;
node.tri_indices = model1.tri_indices;
node.num_max_contacts = num_max_contacts;
node.exhaustive = exhaustive;
node.enable_contact = enable_contact;
node.R = tf1.getRotation();
node.T = tf1.getTranslation();
return true;
return setupShapeMeshCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, num_max_contacts, exhaustive, enable_contact);
}
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for kIOS type */
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for RSS type */
template<typename S, typename NarrowPhaseSolver>
bool initialize(ShapeMeshCollisionTraversalNodekIOS<S, NarrowPhaseSolver>& node,
bool initialize(ShapeMeshCollisionTraversalNodeRSS<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<kIOS>& model2, const SimpleTransform& tf2,
const BVHModel<RSS>& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
int num_max_contacts = 1, bool exhaustive = false, bool enable_contact = false)
{
if(model2.getModelType() != BVH_MODEL_TRIANGLES)
return false;
node.model1 = &model1;
node.tf1 = tf1;
node.model2 = &model2;
node.tf2 = tf2;
node.nsolver = nsolver;
computeBV(model1, tf1, node.model1_bv);
node.vertices = model2.vertices;
node.tri_indices = model2.tri_indices;
node.num_max_contacts = num_max_contacts;
node.exhaustive = exhaustive;
node.enable_contact = enable_contact;
node.R = tf2.getRotation();
node.T = tf2.getTranslation();
return true;
return setupShapeMeshCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, num_max_contacts, exhaustive, enable_contact);
}
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for OBBRSS type */
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for kIOS type */
template<typename S, typename NarrowPhaseSolver>
bool initialize(MeshShapeCollisionTraversalNodeOBBRSS<S, NarrowPhaseSolver>& node,
const BVHModel<OBBRSS>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
bool initialize(ShapeMeshCollisionTraversalNodekIOS<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<kIOS>& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
int num_max_contacts = 1, bool exhaustive = false, bool enable_contact = false)
{
if(model1.getModelType() != BVH_MODEL_TRIANGLES)
return false;
node.model1 = &model1;
node.tf1 = tf1;
node.model2 = &model2;
node.tf2 = tf2;
node.nsolver = nsolver;
computeBV(model2, tf2, node.model2_bv);
node.vertices = model1.vertices;
node.tri_indices = model1.tri_indices;
node.num_max_contacts = num_max_contacts;
node.exhaustive = exhaustive;
node.enable_contact = enable_contact;
node.R = tf1.getRotation();
node.T = tf1.getTranslation();
return true;
return setupShapeMeshCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, num_max_contacts, exhaustive, enable_contact);
}
/** \brief Initialize the traversal node for collision between one mesh and one shape, specialized for OBBRSS type */
template<typename S, typename NarrowPhaseSolver>
bool initialize(ShapeMeshCollisionTraversalNodeOBBRSS<S, NarrowPhaseSolver>& node,
......@@ -391,27 +316,7 @@ bool initialize(ShapeMeshCollisionTraversalNodeOBBRSS<S, NarrowPhaseSolver>& nod
const NarrowPhaseSolver* nsolver,
int num_max_contacts = 1, bool exhaustive = false, bool enable_contact = false)
{
if(model2.getModelType() != BVH_MODEL_TRIANGLES)
return false;
node.model1 = &model1;
node.tf1 = tf1;
node.model2 = &model2;
node.tf2 = tf2;
node.nsolver = nsolver;
computeBV(model1, tf1, node.model1_bv);
node.vertices = model2.vertices;
node.tri_indices = model2.tri_indices;
node.num_max_contacts = num_max_contacts;
node.exhaustive = exhaustive;
node.enable_contact = enable_contact;
node.R = tf2.getRotation();
node.T = tf2.getTranslation();
return true;
return setupShapeMeshCollisionOrientedNode(node, model1, tf1, model2, tf2, nsolver, num_max_contacts, exhaustive, enable_contact);
}
......@@ -875,12 +780,14 @@ bool initialize(ShapeMeshDistanceTraversalNode<S, BV, NarrowPhaseSolver>& node,
}
namespace details
{
template<typename S, typename NarrowPhaseSolver>
bool initialize(MeshShapeDistanceTraversalNodeRSS<S, NarrowPhaseSolver>& node,
const BVHModel<RSS>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver)
template<typename BV, typename S, typename NarrowPhaseSolver, template<typename, typename> class OrientedNode>
static inline bool setupMeshShapeDistanceOrientedNode(OrientedNode<S, NarrowPhaseSolver>& node,
const BVHModel<BV>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver)
{
if(model1.getModelType() != BVH_MODEL_TRIANGLES)
return false;
......@@ -900,65 +807,44 @@ bool initialize(MeshShapeDistanceTraversalNodeRSS<S, NarrowPhaseSolver>& node,
return true;
}
}
template<typename S, typename NarrowPhaseSolver>
bool initialize(ShapeMeshDistanceTraversalNodeRSS<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<RSS>& model2, const SimpleTransform& tf2,
bool initialize(MeshShapeDistanceTraversalNodeRSS<S, NarrowPhaseSolver>& node,
const BVHModel<RSS>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver)
{
if(model2.getModelType() != BVH_MODEL_TRIANGLES)
return false;
node.model1 = &model1;
node.tf1 = tf1;
node.model2 = &model2;
node.tf2 = tf2;
node.nsolver = nsolver;
computeBV(model1, tf1, node.model1_bv);
node.vertices = model2.vertices;
node.tri_indices = model2.tri_indices;
node.R = tf2.getRotation();
node.T = tf2.getTranslation();
return true;
return details::setupMeshShapeDistanceOrientedNode(node, model1, tf1, model2, tf2, nsolver);
}
template<typename S, typename NarrowPhaseSolver>
bool initialize(MeshShapeDistanceTraversalNodekIOS<S, NarrowPhaseSolver>& node,
const BVHModel<kIOS>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver)
{
if(model1.getModelType() != BVH_MODEL_TRIANGLES)
return false;
node.model1 = &model1;
node.tf1 = tf1;
node.model2 = &model2;
node.tf2 = tf2;
node.nsolver = nsolver;
computeBV(model2, tf2, node.model2_bv);
node.vertices = model1.vertices;
node.tri_indices = model1.tri_indices;
node.R = tf1.getRotation();
node.T = tf1.getTranslation();
return true;
return details::setupMeshShapeDistanceOrientedNode(node, model1, tf1, model2, tf2, nsolver);
}
template<typename S, typename NarrowPhaseSolver>
bool initialize(ShapeMeshDistanceTraversalNodekIOS<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<kIOS>& model2, const SimpleTransform& tf2,
bool initialize(MeshShapeDistanceTraversalNodeOBBRSS<S, NarrowPhaseSolver>& node,
const BVHModel<OBBRSS>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver)
{
return details::setupMeshShapeDistanceOrientedNode(node, model1, tf1, model2, tf2, nsolver);
}
namespace details
{
template<typename S, typename BV, typename NarrowPhaseSolver, template<typename, typename> class OrientedNode>
static inline bool setupShapeMeshDistanceOrientedNode(OrientedNode<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<BV>& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver)
{
if(model2.getModelType() != BVH_MODEL_TRIANGLES)
return false;
......@@ -976,35 +862,29 @@ bool initialize(ShapeMeshDistanceTraversalNodekIOS<S, NarrowPhaseSolver>& node,
node.R = tf2.getRotation();
node.T = tf2.getTranslation();
return true;
return true;
}
}
template<typename S, typename NarrowPhaseSolver>
bool initialize(MeshShapeDistanceTraversalNodeOBBRSS<S, NarrowPhaseSolver>& node,
const BVHModel<OBBRSS>& model1, const SimpleTransform& tf1,
const S& model2, const SimpleTransform& tf2,
bool initialize(ShapeMeshDistanceTraversalNodeRSS<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<RSS>& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver)
{
if(model1.getModelType() != BVH_MODEL_TRIANGLES)
return false;
node.model1 = &model1;
node.tf1 = tf1;
node.model2 = &model2;
node.tf2 = tf2;
node.nsolver = nsolver;
computeBV(model2, tf2, node.model2_bv);
node.vertices = model1.vertices;
node.tri_indices = model1.tri_indices;
node.R = tf1.getRotation();
node.T = tf1.getTranslation();
return true;
return details::setupShapeMeshDistanceOrientedNode(node, model1, tf1, model2, tf2, nsolver);
}
template<typename S, typename NarrowPhaseSolver>
bool initialize(ShapeMeshDistanceTraversalNodekIOS<S, NarrowPhaseSolver>& node,
const S& model1, const SimpleTransform& tf1,
const BVHModel<kIOS>& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver)
{
return details::setupShapeMeshDistanceOrientedNode(node, model1, tf1, model2, tf2, nsolver);
}
template<typename S, typename NarrowPhaseSolver>
bool initialize(ShapeMeshDistanceTraversalNodeOBBRSS<S, NarrowPhaseSolver>& node,
......@@ -1012,23 +892,7 @@ bool initialize(ShapeMeshDistanceTraversalNodeOBBRSS<S, NarrowPhaseSolver>& node
const BVHModel<OBBRSS>& model2, const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver)
{
if(model2.getModelType() != BVH_MODEL_TRIANGLES)
return false;
node.model1 = &model1;
node.tf1 = tf1;
node.model2 = &model2;
node.tf2 = tf2;
node.nsolver = nsolver;
computeBV(model1, tf1, node.model1_bv);
node.vertices = model2.vertices;
node.tri_indices = model2.tri_indices;
node.R = tf2.getRotation();
node.T = tf2.getTranslation();
return true;
return details::setupShapeMeshDistanceOrientedNode(node, model1, tf1, model2, tf2, nsolver);
}
......
......@@ -241,19 +241,21 @@ public:
};
namespace details
{
template<typename BV, typename S, typename NarrowPhaseSolver>
static inline void meshShapeCollisionLeafTesting(int b1, int b2,
const BVHModel<BV>* model1, const S& model2,
Vec3f* vertices, Triangle* tri_indices,
const Matrix3f& R, const Vec3f& T,
const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
bool enable_statistics,
bool enable_contact,
bool exhaustive,
int num_max_contacts,
int& num_leaf_tests,
std::vector<BVHShapeCollisionPair>& pairs)
static inline void meshShapeCollisionOrientedNodeLeafTesting(int b1, int b2,
const BVHModel<BV>* model1, const S& model2,
Vec3f* vertices, Triangle* tri_indices,
const Matrix3f& R, const Vec3f& T,
const SimpleTransform& tf2,
const NarrowPhaseSolver* nsolver,
bool enable_statistics,
bool enable_contact,
bool exhaustive,
int num_max_contacts,
int& num_leaf_tests,
std::vector<BVHShapeCollisionPair>& pairs)
{
if(enable_statistics) num_leaf_tests++;
......@@ -287,6 +289,8 @@ static inline void meshShapeCollisionLeafTesting(int b1, int b2,
}
}
}
template<typename S, typename NarrowPhaseSolver>
class MeshShapeCollisionTraversalNodeOBB : public MeshShapeCollisionTraversalNode<OBB, S, NarrowPhaseSolver>
{
......@@ -304,9 +308,9 @@ public:
void leafTesting(int b1, int b2) const
{
meshShapeCollisionLeafTesting(b1, b2, this->model1, *(this->model2), this->vertices, this->tri_indices,
R, T, this->tf2, this->nsolver, this->enable_statistics, this->enable_contact,
this->exhaustive, this->num_max_contacts, this->num_leaf_tests, this->pairs);
details::meshShapeCollisionOrientedNodeLeafTesting(b1, b2, this->model1, *(this->model2), this->vertices, this->tri_indices,
R, T, this->tf2, this->nsolver, this->enable_statistics, this->enable_contact,
this->exhaustive, this->num_max_contacts, this->num_leaf_tests, this->pairs);
}
// R, T is the transform of bvh model
......@@ -331,9 +335,9 @@ public:
void leafTesting(int b1, int b2) const
{
meshShapeCollisionLeafTesting(b1, b2, this->model1, *(this->model2), this->vertices, this->tri_indices,
R, T, this->tf2, this->nsolver, this->enable_statistics, this->enable_contact,
this->exhaustive, this->num_max_contacts, this->num_leaf_tests, this->pairs);
details::meshShapeCollisionOrientedNodeLeafTesting(b1, b2, this->model1, *(this->model2), this->vertices, this->tri_indices,
R, T, this->tf2, this->nsolver, this->enable_statistics, this->enable_contact,
this->exhaustive, this->num_max_contacts, this->num_leaf_tests, this->pairs);
}
// R, T is the transform of bvh model
......@@ -358,9 +362,9 @@ public:
void leafTesting(int b1, int b2) const