Unverified Commit c62e6643 authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub
Browse files

Add Windows support and CI (#177)



* cmake: sync submodule

* ci: add Windows CI via Conda

* readme: update contributors

* ci: set events

* ci: set assimp_PREFIX

* ci: move conda-env to a dedicated directory

* cmake: use Findassimp from the official repository

* cmake: fix variable name

* all: fix KEYWORD position in function signatures

* cmake: add missing file in include list

* core: additional fixes

* core: fix missing HPP_FCL_DLLAPI

* core: remove useless HPP_FCL_DLLAPI

* core: forward declaration of template specialization

* core: add missing include

* core: fix guard

* core: template specialization

* cmake: fix link to Python for the wrapper

* ci: octomap is not well exported for Windows

* cmake: fix linkage

* core: add missing include

* cmake: fix assimp search

* test: fix math constant

* core: remove keyword for full templated classes

* cmake: sync submodule

* ci: remove useless line

* core: remove useless keyword

* core: add declaration of template specialization

* core: fix indents

* core: add missing keywords

* core: remove useless keywords

* Fix generation of Python doc.

* Fix compilation warnings.

Co-authored-by: Joseph Mirabel's avatarJoseph Mirabel <jmirabel@laas.fr>
parent 7dc6a3a9
name: fcl
channels:
- conda-forge
- nodefaults
dependencies:
- eigen
- assimp
- numpy
- boost
- eigenpy
- python
name: Build FCL for Windows via Conda
on: [push,pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [windows-latest-clang-cl]
include:
- name: windows-latest-clang-cl
os: windows-2019
compiler: clang-cl
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: |
git submodule update --init
- uses: goanpeca/setup-miniconda@v1
with:
activate-environment: fcl
environment-file: .github/workflows/conda/conda-env.yml
python-version: 3.7
- name: Install cmake and update conda
run: |
conda install cmake -c main
- name: Build FCL
shell: cmd /C CALL {0}
run: |
:: unset extra Boost envs
set Boost_ROOT=
set BOOST_ROOT_1_69_0=
set BOOST_ROOT_1_72_0=
set PATH=%PATH:C:\hostedtoolcache\windows\Boost\1.72.0;=%
call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
:: start building
mkdir build
pushd build
set PKG_CONFIG_PATH=%CONDA_PREFIX%\Library\share\pkgconfig:%CONDA_PREFIX%\Library\share\pkgconfig
cmake ^
-G "Visual Studio 16 2019" -T "ClangCl" -DCMAKE_GENERATOR_PLATFORM=x64 ^
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
-DCMAKE_BUILD_TYPE=Release ^
-DHPP_FCL_SITELIB_ROOT=%CONDA_PREFIX% ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
-DBUILD_PYTHON_INTERFACE=ON ^
..
cmake --build . --config Release --target install
set PATH=%PATH%;%CONDA_PREFIX%\Library\lib;%CONDA_PREFIX%\Lib\site-packages\hppfcl
ctest --output-on-failure -C Release -V
......@@ -138,6 +138,7 @@ SET(${PROJECT_NAME}_HEADERS
include/hpp/fcl/shape/details/convex.hxx
include/hpp/fcl/shape/geometric_shape_to_BVH_model.h
include/hpp/fcl/shape/geometric_shapes.h
include/hpp/fcl/shape/geometric_shapes_utility.h
include/hpp/fcl/distance_func_matrix.h
include/hpp/fcl/collision.h
include/hpp/fcl/collision_func_matrix.h
......
......@@ -21,4 +21,4 @@ This project is now used in many robotics frameworks such as [Pinocchio](https:/
## Acknowledgments
The development of **HPP-FCL** is actively supported by the [Gepetto team](http://projects.laas.fr/gepetto/) [@LAAS-CNRS](http://www.laas.fr)
The development of **HPP-FCL** is actively supported by the [Gepetto team](http://projects.laas.fr/gepetto/) [@LAAS-CNRS](http://www.laas.fr) and the [Willow team](https://www.di.ens.fr/willow/) [@INRIA](http://www.inria.fr).
Subproject commit 9d9fda176e0330e0c29b9c91b5e417b3ece93848
Subproject commit 89bd42923644d96fbe99d7495d12021d1e885a83
#
# Copyright 2020 CNRS INRIA
#
# Author: Guilhem Saurel
#
# Try to find assimp in standard prefixes and in ${assimp_PREFIX}
# Once done this will define
# assimp_FOUND - System has assimp
# assimp_INCLUDE_DIR - The assimp include directories
# assimp_LIBRARY - The libraries needed to use assimp
FIND_PATH(assimp_INCLUDE_DIR
NAMES assimp/defs.h
PATHS ${assimp_PREFIX} ${assimp_PREFIX}/include
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ASSIMP_ARCHITECTURE "64")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(ASSIMP_ARCHITECTURE "32")
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(WIN32)
set(ASSIMP_ROOT_DIR CACHE PATH "ASSIMP root directory")
# Find path of each library
find_path(ASSIMP_INCLUDE_DIR
NAMES
assimp/anim.h
HINTS
${ASSIMP_ROOT_DIR}/include
)
SET(assimp_INCLUDE_DIRS ${ASSIMP_INCLUDE_DIR})
if(MSVC12)
set(ASSIMP_MSVC_VERSION "vc120")
elseif(MSVC14)
set(ASSIMP_MSVC_VERSION "vc140")
endif(MSVC12)
if(MSVC12 OR MSVC14)
find_path(ASSIMP_LIBRARY_DIR
NAMES
assimp-${ASSIMP_MSVC_VERSION}-mt.lib
HINTS
${ASSIMP_ROOT_DIR}/lib${ASSIMP_ARCHITECTURE}
)
find_library(ASSIMP_LIBRARY_RELEASE assimp-${ASSIMP_MSVC_VERSION}-mt.lib PATHS ${ASSIMP_LIBRARY_DIR})
find_library(ASSIMP_LIBRARY_DEBUG assimp-${ASSIMP_MSVC_VERSION}-mtd.lib PATHS ${ASSIMP_LIBRARY_DIR})
set(ASSIMP_LIBRARY
optimized ${ASSIMP_LIBRARY_RELEASE}
debug ${ASSIMP_LIBRARY_DEBUG}
)
FIND_LIBRARY(assimp_LIBRARY
set(ASSIMP_LIBRARIES ${ASSIMP_LIBRARY_RELEASE} ${ASSIMP_LIBRARY_DEBUG})
FUNCTION(ASSIMP_COPY_BINARIES TargetDirectory)
ADD_CUSTOM_TARGET(AssimpCopyBinaries
COMMAND ${CMAKE_COMMAND} -E copy ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${TargetDirectory}/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll
COMMAND ${CMAKE_COMMAND} -E copy ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${TargetDirectory}/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll
COMMENT "Copying Assimp binaries to '${TargetDirectory}'"
VERBATIM)
ENDFUNCTION(ASSIMP_COPY_BINARIES)
SET(assimp_LIBRARIES ${ASSIMP_LIBRARY_RELEASE})
endif()
else(WIN32)
find_path(
assimp_INCLUDE_DIRS
NAMES assimp/postprocess.h assimp/scene.h assimp/version.h assimp/config.h assimp/cimport.h
PATHS /usr/local/include
PATHS /usr/include/
)
find_library(
assimp_LIBRARIES
NAMES assimp
PATHS ${assimp_PREFIX} ${assimp_PREFIX}/lib
PATHS /usr/local/lib/
PATHS /usr/lib64/
PATHS /usr/lib/
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(assimp DEFAULT_MSG assimp_LIBRARY assimp_INCLUDE_DIR)
mark_as_advanced(assimp_INCLUDE_DIR assimp_LIBRARY)
if (assimp_INCLUDE_DIRS AND assimp_LIBRARIES)
SET(assimp_FOUND TRUE)
ENDIF (assimp_INCLUDE_DIRS AND assimp_LIBRARIES)
if (assimp_FOUND)
if (NOT assimp_FIND_QUIETLY)
message(STATUS "Found asset importer library: ${assimp_LIBRARIES}")
endif (NOT assimp_FIND_QUIETLY)
else (assimp_FOUND)
if (assimp_FIND_REQUIRED)
message(FATAL_ERROR "Could not find asset importer library")
endif (assimp_FIND_REQUIRED)
endif (assimp_FOUND)
endif(WIN32)
......@@ -2,5 +2,7 @@ SET(DOXYGEN_XML_OUTPUT "doxygen-xml" PARENT_SCOPE)
SET(DOXYGEN_FILE_PATTERNS "*.h *.hh *.hxx" PARENT_SCOPE)
SET(DOXYGEN_GENERATE_XML "YES" PARENT_SCOPE)
SET(DOXYGEN_EXPAND_ONLY_PREDEF "NO" PARENT_SCOPE)
SET(DOXYGEN_ENABLE_PREPROCESSING "YES" PARENT_SCOPE)
SET(DOXYGEN_MACRO_EXPANSION "YES" PARENT_SCOPE)
SET(DOXYGEN_PREDEFINED "IS_DOXYGEN" PARENT_SCOPE)
......@@ -245,12 +245,13 @@ static inline AABB rotate(const AABB& aabb, const Matrix3f& R)
}
/// @brief Check collision between two aabbs, b1 is in configuration (R0, T0) and b2 is in identity.
bool overlap(const Matrix3f& R0, const Vec3f& T0, const AABB& b1, const AABB& b2) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI bool overlap(const Matrix3f& R0, const Vec3f& T0, const AABB& b1,
const AABB& b2);
/// @brief Check collision between two aabbs, b1 is in configuration (R0, T0) and b2 is in identity.
bool overlap(const Matrix3f& R0, const Vec3f& T0, const AABB& b1,
HPP_FCL_DLLAPI bool overlap(const Matrix3f& R0, const Vec3f& T0, const AABB& b1,
const AABB& b2, const CollisionRequest& request,
FCL_REAL& sqrDistLowerBound) HPP_FCL_DLLAPI;
FCL_REAL& sqrDistLowerBound);
}
} // namespace hpp
......
......@@ -59,7 +59,7 @@ namespace details
/// @brief Convert a bounding volume of type BV1 in configuration tf1 to a bounding volume of type BV2 in I configuration.
template<typename BV1, typename BV2>
class HPP_FCL_DLLAPI Converter
class Converter
{
private:
static void convert(const BV1& /*bv1*/, const Transform3f& /*tf1*/, BV2& /*bv2*/)
......@@ -71,7 +71,7 @@ private:
/// @brief Convert from AABB to AABB, not very tight but is fast.
template<>
class HPP_FCL_DLLAPI Converter<AABB, AABB>
class Converter<AABB, AABB>
{
public:
static void convert(const AABB& bv1, const Transform3f& tf1, AABB& bv2)
......@@ -86,7 +86,7 @@ public:
};
template<>
class HPP_FCL_DLLAPI Converter<AABB, OBB>
class Converter<AABB, OBB>
{
public:
static void convert(const AABB& bv1, const Transform3f& tf1, OBB& bv2)
......@@ -98,7 +98,7 @@ public:
};
template<>
class HPP_FCL_DLLAPI Converter<OBB, OBB>
class Converter<OBB, OBB>
{
public:
static void convert(const OBB& bv1, const Transform3f& tf1, OBB& bv2)
......@@ -110,7 +110,7 @@ public:
};
template<>
class HPP_FCL_DLLAPI Converter<OBBRSS, OBB>
class Converter<OBBRSS, OBB>
{
public:
static void convert(const OBBRSS& bv1, const Transform3f& tf1, OBB& bv2)
......@@ -120,7 +120,7 @@ public:
};
template<>
class HPP_FCL_DLLAPI Converter<RSS, OBB>
class Converter<RSS, OBB>
{
public:
static void convert(const RSS& bv1, const Transform3f& tf1, OBB& bv2)
......@@ -133,7 +133,7 @@ public:
template<typename BV1>
class HPP_FCL_DLLAPI Converter<BV1, AABB>
class Converter<BV1, AABB>
{
public:
static void convert(const BV1& bv1, const Transform3f& tf1, AABB& bv2)
......@@ -148,7 +148,7 @@ public:
};
template<typename BV1>
class HPP_FCL_DLLAPI Converter<BV1, OBB>
class Converter<BV1, OBB>
{
public:
static void convert(const BV1& bv1, const Transform3f& tf1, OBB& bv2)
......@@ -160,7 +160,7 @@ public:
};
template<>
class HPP_FCL_DLLAPI Converter<OBB, RSS>
class Converter<OBB, RSS>
{
public:
static void convert(const OBB& bv1, const Transform3f& tf1, RSS& bv2)
......@@ -175,7 +175,7 @@ public:
};
template<>
class HPP_FCL_DLLAPI Converter<RSS, RSS>
class Converter<RSS, RSS>
{
public:
static void convert(const RSS& bv1, const Transform3f& tf1, RSS& bv2)
......@@ -190,7 +190,7 @@ public:
};
template<>
class HPP_FCL_DLLAPI Converter<OBBRSS, RSS>
class Converter<OBBRSS, RSS>
{
public:
static void convert(const OBBRSS& bv1, const Transform3f& tf1, RSS& bv2)
......@@ -200,7 +200,7 @@ public:
};
template<>
class HPP_FCL_DLLAPI Converter<AABB, RSS>
class Converter<AABB, RSS>
{
public:
static void convert(const AABB& bv1, const Transform3f& tf1, RSS& bv2)
......@@ -246,7 +246,7 @@ public:
};
template<>
class HPP_FCL_DLLAPI Converter<AABB, OBBRSS>
class Converter<AABB, OBBRSS>
{
public:
static void convert(const AABB& bv1, const Transform3f& tf1, OBBRSS& bv2)
......
......@@ -133,15 +133,16 @@ public:
/// @brief Translate the OBB bv
OBB translate(const OBB& bv, const Vec3f& t) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI OBB translate(const OBB& bv, const Vec3f& t);
/// @brief Check collision between two obbs, b1 is in configuration (R0, T0) and b2 is in identity.
bool overlap(const Matrix3f& R0, const Vec3f& T0, const OBB& b1, const OBB& b2) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI bool overlap(const Matrix3f& R0, const Vec3f& T0,
const OBB& b1, const OBB& b2);
/// @brief Check collision between two obbs, b1 is in configuration (R0, T0) and b2 is in identity.
bool overlap(const Matrix3f& R0, const Vec3f& T0, const OBB& b1,
HPP_FCL_DLLAPI bool overlap(const Matrix3f& R0, const Vec3f& T0, const OBB& b1,
const OBB& b2, const CollisionRequest& request,
FCL_REAL& sqrDistLowerBound) HPP_FCL_DLLAPI;
FCL_REAL& sqrDistLowerBound);
/// Check collision between two boxes
......@@ -149,7 +150,8 @@ bool overlap(const Matrix3f& R0, const Vec3f& T0, const OBB& b1,
/// @param a half dimensions of first box,
/// @param b half dimensions of second box.
/// The second box is in identity configuration.
bool obbDisjoint(const Matrix3f& B, const Vec3f& T, const Vec3f& a, const Vec3f& b) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI bool obbDisjoint(const Matrix3f& B, const Vec3f& T,
const Vec3f& a, const Vec3f& b);
}
} // namespace hpp
......
......@@ -148,16 +148,20 @@ public:
/// @brief distance between two RSS bounding volumes
/// P and Q (optional return values) are the closest points in the rectangles, not the RSS. But the direction P - Q is the correct direction for cloest points
/// Notice that P and Q are both in the local frame of the first RSS (not global frame and not even the local frame of object 1)
FCL_REAL distance(const Matrix3f& R0, const Vec3f& T0, const RSS& b1, const RSS& b2, Vec3f* P = NULL, Vec3f* Q = NULL) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI FCL_REAL distance(const Matrix3f& R0, const Vec3f& T0,
const RSS& b1, const RSS& b2,
Vec3f* P = NULL, Vec3f* Q = NULL);
/// @brief Check collision between two RSSs, b1 is in configuration (R0, T0) and b2 is in identity.
bool overlap(const Matrix3f& R0, const Vec3f& T0, const RSS& b1, const RSS& b2) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI bool overlap(const Matrix3f& R0, const Vec3f& T0,
const RSS& b1, const RSS& b2);
/// @brief Check collision between two RSSs, b1 is in configuration (R0, T0) and b2 is in identity.
bool overlap(const Matrix3f& R0, const Vec3f& T0, const RSS& b1, const RSS& b2,
HPP_FCL_DLLAPI bool overlap(const Matrix3f& R0, const Vec3f& T0,
const RSS& b1, const RSS& b2,
const CollisionRequest& request,
FCL_REAL& sqrDistLowerBound) HPP_FCL_DLLAPI;
FCL_REAL& sqrDistLowerBound);
}
......
......@@ -198,7 +198,7 @@ bool overlap(const Matrix3f& /*R0*/, const Vec3f& /*T0*/,
/// @brief translate the KDOP BV
template<short N>
KDOP<N> translate(const KDOP<N>& bv, const Vec3f& t) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI KDOP<N> translate(const KDOP<N>& bv, const Vec3f& t);
}
......
......@@ -147,21 +147,25 @@ public:
/// @brief Translate the kIOS BV
kIOS translate(const kIOS& bv, const Vec3f& t) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI kIOS translate(const kIOS& bv, const Vec3f& t);
/// @brief Check collision between two kIOSs, b1 is in configuration (R0, T0) and b2 is in identity.
/// @todo Not efficient
bool overlap(const Matrix3f& R0, const Vec3f& T0, const kIOS& b1, const kIOS& b2) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI bool overlap(const Matrix3f& R0, const Vec3f& T0,
const kIOS& b1, const kIOS& b2);
/// @brief Check collision between two kIOSs, b1 is in configuration (R0, T0) and b2 is in identity.
/// @todo Not efficient
bool overlap(const Matrix3f& R0, const Vec3f& T0, const kIOS& b1, const kIOS& b2,
HPP_FCL_DLLAPI bool overlap(const Matrix3f& R0, const Vec3f& T0,
const kIOS& b1, const kIOS& b2,
const CollisionRequest& request,
FCL_REAL& sqrDistLowerBound) HPP_FCL_DLLAPI;
FCL_REAL& sqrDistLowerBound);
/// @brief Approximate distance between two kIOS bounding volumes
/// @todo P and Q is not returned, need implementation
FCL_REAL distance(const Matrix3f& R0, const Vec3f& T0, const kIOS& b1, const kIOS& b2, Vec3f* P = NULL, Vec3f* Q = NULL) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI FCL_REAL distance(const Matrix3f& R0, const Vec3f& T0,
const kIOS& b1, const kIOS& b2,
Vec3f* P = NULL, Vec3f* Q = NULL);
}
......
......@@ -49,22 +49,22 @@ namespace fcl
/// @brief Extract the part of the BVHModel that is inside an AABB.
/// A triangle in collision with the AABB is considered inside.
template<typename BV>
BVHModel<BV>* BVHExtract(const BVHModel<BV>& model, const Transform3f& pose, const AABB& aabb) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI BVHModel<BV>* BVHExtract(const BVHModel<BV>& model, const Transform3f& pose, const AABB& aabb);
/// @brief Compute the covariance matrix for a set or subset of points. if ts = null, then indices refer to points directly; otherwise refer to triangles
void getCovariance(Vec3f* ps, Vec3f* ps2, Triangle* ts, unsigned int* indices, int n, Matrix3f& M) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI void getCovariance(Vec3f* ps, Vec3f* ps2, Triangle* ts, unsigned int* indices, int n, Matrix3f& M);
/// @brief Compute the RSS bounding volume parameters: radius, rectangle size and the origin, given the BV axises.
void getRadiusAndOriginAndRectangleSize(Vec3f* ps, Vec3f* ps2, Triangle* ts, unsigned int* indices, int n, const Matrix3f& axes, Vec3f& origin, FCL_REAL l[2], FCL_REAL& r) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI void getRadiusAndOriginAndRectangleSize(Vec3f* ps, Vec3f* ps2, Triangle* ts, unsigned int* indices, int n, const Matrix3f& axes, Vec3f& origin, FCL_REAL l[2], FCL_REAL& r);
/// @brief Compute the bounding volume extent and center for a set or subset of points, given the BV axises.
void getExtentAndCenter(Vec3f* ps, Vec3f* ps2, Triangle* ts, unsigned int* indices, int n, Matrix3f& axes, Vec3f& center, Vec3f& extent) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI void getExtentAndCenter(Vec3f* ps, Vec3f* ps2, Triangle* ts, unsigned int* indices, int n, Matrix3f& axes, Vec3f& center, Vec3f& extent);
/// @brief Compute the center and radius for a triangle's circumcircle
void circumCircleComputation(const Vec3f& a, const Vec3f& b, const Vec3f& c, Vec3f& center, FCL_REAL& radius) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI void circumCircleComputation(const Vec3f& a, const Vec3f& b, const Vec3f& c, Vec3f& center, FCL_REAL& radius);
/// @brief Compute the maximum distance from a given center point to a point cloud
FCL_REAL maximumDistance(Vec3f* ps, Vec3f* ps2, Triangle* ts, unsigned int* indices, int n, const Vec3f& query) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI FCL_REAL maximumDistance(Vec3f* ps, Vec3f* ps2, Triangle* ts, unsigned int* indices, int n, const Vec3f& query);
}
......
......@@ -52,13 +52,13 @@ namespace fcl
/// returning all the contact points), whether return detailed contact information (i.e., normal, contact point, depth; otherwise only contact primitive id is returned), this function
/// performs the collision between them.
/// Return value is the number of contacts generated between the two objects.
std::size_t collide(const CollisionObject* o1, const CollisionObject* o2,
const CollisionRequest& request, CollisionResult& result) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI std::size_t collide(const CollisionObject* o1, const CollisionObject* o2,
const CollisionRequest& request, CollisionResult& result);
/// @copydoc collide(const CollisionObject*, const CollisionObject*, const CollisionRequest&, CollisionResult&)
std::size_t collide(const CollisionGeometry* o1, const Transform3f& tf1,
HPP_FCL_DLLAPI std::size_t collide(const CollisionGeometry* o1, const Transform3f& tf1,
const CollisionGeometry* o2, const Transform3f& tf2,
const CollisionRequest& request, CollisionResult& result) HPP_FCL_DLLAPI;
const CollisionRequest& request, CollisionResult& result);
/// @copydoc collide(const CollisionObject*, const CollisionObject*, const CollisionRequest&, CollisionResult&)
/// \note this function update the initial guess of \c request if requested.
......
......@@ -23,7 +23,9 @@ namespace hpp
{
namespace fcl
{
CollisionGeometry* extract(const CollisionGeometry* model, const Transform3f& pose, const AABB& aabb) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI CollisionGeometry* extract(const CollisionGeometry* model,
const Transform3f& pose,
const AABB& aabb);
}
} // namespace hpp
......
......@@ -48,12 +48,13 @@ namespace fcl
/// @brief Main distance interface: given two collision objects, and the requirements for contacts, including whether return the nearest points, this function performs the distance between them.
/// Return value is the minimum distance generated between the two objects.
FCL_REAL distance(const CollisionObject* o1, const CollisionObject* o2, const DistanceRequest& request, DistanceResult& result) HPP_FCL_DLLAPI;
HPP_FCL_DLLAPI FCL_REAL distance(const CollisionObject* o1, const CollisionObject* o2,
const DistanceRequest& request, DistanceResult& result);
/// @copydoc distance(const CollisionObject*, const CollisionObject*, const DistanceRequest&, DistanceResult&)
FCL_REAL distance(const CollisionGeometry* o1, const Transform3f& tf1,
HPP_FCL_DLLAPI FCL_REAL distance(const CollisionGeometry* o1, const Transform3f& tf1,
const CollisionGeometry* o2, const Transform3f& tf2,
const DistanceRequest& request, DistanceResult& result) HPP_FCL_DLLAPI;
const DistanceRequest& request, DistanceResult& result);
/// @copydoc distance(const CollisionObject*, const CollisionObject*, const DistanceRequest&, DistanceResult&)
/// \note this function update the initial guess of \c request if requested.
......
......@@ -54,7 +54,9 @@ struct HPP_FCL_DLLAPI DistanceFunctionMatrix
/// 1. two objects o1 and o2 and their configuration in world coordinate tf1 and tf2;
/// 2. the solver for narrow phase collision, this is for distance computation between geometric shapes;
/// 3. the request setting for distance (e.g., whether need to return nearest points);
typedef FCL_REAL (*DistanceFunc)(const CollisionGeometry* o1, const Transform3f& tf1, const CollisionGeometry* o2, const Transform3f& tf2, const GJKSolver* nsolver,
typedef FCL_REAL (*DistanceFunc)(const CollisionGeometry* o1, const Transform3f& tf1,
const CollisionGeometry* o2, const Transform3f& tf2,
const GJKSolver* nsolver,
const DistanceRequest& request, DistanceResult& result);
/// @brief each item in the distance matrix is a function to handle distance between objects of type1 and type2
......
......@@ -51,7 +51,7 @@ namespace fcl
/// @brief Node structure encoding the information required for traversal.
class HPP_FCL_DLLAPI TraversalNodeBase
class TraversalNodeBase
{
public:
TraversalNodeBase () : enable_statistics(false) {}
......@@ -101,7 +101,7 @@ public:
/// @{
/// @brief Node structure encoding the information required for collision traversal.
class HPP_FCL_DLLAPI CollisionTraversalNodeBase : public TraversalNodeBase
class CollisionTraversalNodeBase : public TraversalNodeBase
{
public:
CollisionTraversalNodeBase (const CollisionRequest& request_) :
......@@ -144,7 +144,7 @@ public:
/// @{
/// @brief Node structure encoding the information required for distance traversal.
class HPP_FCL_DLLAPI DistanceTraversalNodeBase : public TraversalNodeBase
class DistanceTraversalNodeBase : public TraversalNodeBase
{
public:
DistanceTraversalNodeBase() : result(NULL) {}
......
......@@ -60,7 +60,7 @@ namespace fcl
/// @brief Traversal node for collision between BVH and shape
template<typename BV, typename S>
class HPP_FCL_DLLAPI BVHShapeCollisionTraversalNode : public CollisionTraversalNodeBase
class BVHShapeCollisionTraversalNode : public CollisionTraversalNodeBase
{
public:
BVHShapeCollisionTraversalNode(const CollisionRequest& request) :
......@@ -103,7 +103,7 @@ public:
/// @brief Traversal node for collision between shape and BVH
template<typename S, typename BV>
class HPP_FCL_DLLAPI ShapeBVHCollisionTraversalNode : public CollisionTraversalNodeBase
class ShapeBVHCollisionTraversalNode : public CollisionTraversalNodeBase
{
public:
ShapeBVHCollisionTraversalNode(const CollisionRequest& request) :
......@@ -154,7 +154,7 @@ public:
/// @brief Traversal node for collision between mesh and shape
template<typename BV, typename S,
int _Options = RelativeTransformationIsIdentity>
class HPP_FCL_DLLAPI MeshShapeCollisionTraversalNode : public BVHShapeCollisionTraversalNode<BV, S>
class MeshShapeCollisionTraversalNode : public BVHShapeCollisionTraversalNode<BV, S>
{
public:
enum {
......@@ -262,7 +262,7 @@ public:
/// @brief Traversal node for collision between shape and mesh
template<typename S, typename BV,
int _Options = RelativeTransformationIsIdentity>
class HPP_FCL_DLLAPI ShapeMeshCollisionTraversalNode : public ShapeBVHCollisionTraversalNode<S, BV>
class ShapeMeshCollisionTraversalNode : public ShapeBVHCollisionTraversalNode<S, BV>
{
public:
enum {
......@@ -373,7 +373,7 @@ public:
/// @brief Traversal node for distance computation between BVH and shape
template<typename BV, typename S>
class HPP_FCL_DLLAPI BVHShapeDistanceTraversalNode : public DistanceTraversalNodeBase
class BVHShapeDistanceTraversalNode : public DistanceTraversalNodeBase
{
public:
BVHShapeDistanceTraversalNode() : DistanceTraversalNodeBase()
......@@ -421,7 +421,7 @@ public:
/// @brief Traversal node for distance computation between shape and BVH
template<typename S, typename BV>