diff --git a/rmf_traffic/CMakeLists.txt b/rmf_traffic/CMakeLists.txt index d5516187..f06361f0 100644 --- a/rmf_traffic/CMakeLists.txt +++ b/rmf_traffic/CMakeLists.txt @@ -22,17 +22,15 @@ include(GNUInstallDirs) find_package(fcl 0.6 QUIET) if(fcl_FOUND) - set(FCL_LIBRARIES fcl) - set(using_new_fcl true) - message(STATUS "Using FCL version: ${FCL_VERSION}") + message(STATUS "Using installed FCL version: ${FCL_VERSION}") else() - include(FindPkgConfig) - pkg_check_modules(PC_FCL REQUIRED fcl) - pkg_check_modules(PC_CCD REQUIRED ccd) - set(FCL_LIBRARIES ${PC_FCL_LIBRARIES} ${PC_CCD_LIBRARIES}) - set(using_new_fcl) - message(STATUS "Using FCL version: ${PC_FCL_VERSION}") + message(STATUS "Using in-source FCL") + add_subdirectory(thirdparty/fcl) endif() +# TODO(MXG): Remove everything related to maintaining compatibility with 0.5, +# since we are now requiring FCL-0.6+ +set(using_new_fcl true) +set(FCL_LIBRARIES fcl) find_package(rmf_utils REQUIRED) find_package(Eigen3 REQUIRED) diff --git a/rmf_traffic/package.xml b/rmf_traffic/package.xml index 569cbd4f..1322ae02 100644 --- a/rmf_traffic/package.xml +++ b/rmf_traffic/package.xml @@ -12,10 +12,12 @@ rmf_utils rmf_utils - libccd-dev - libfcl-dev - - + libccd-dev + + ament_cmake_catch2 rmf_cmake_uncrustify diff --git a/rmf_traffic/thirdparty/fcl/.clang-format b/rmf_traffic/thirdparty/fcl/.clang-format new file mode 100644 index 00000000..5e53779d --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.clang-format @@ -0,0 +1,40 @@ +# -*- mode: yaml -*- +# vi: set ft=yaml : + +# Copyright (c) 2018, Toyota Research Institute, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# Author: Jamie Snape, Kitware, Inc. + +--- +BasedOnStyle: Google +--- +Language: Cpp +DerivePointerAlignment: false +PointerAlignment: Left diff --git a/rmf_traffic/thirdparty/fcl/.clang-tidy b/rmf_traffic/thirdparty/fcl/.clang-tidy new file mode 100644 index 00000000..1fe616b0 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.clang-tidy @@ -0,0 +1,36 @@ +# -*- mode: yaml -*- +# vi: set ft=yaml : + +# Copyright (c) 2018, Toyota Research Institute, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# Author: Jamie Snape, Kitware, Inc. + +--- +Checks: 'clang-analyzer-*,clang-diagnostic-*,cppcoreguidelines-*,google-*,modernize-*,performance-*,readability-*' diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/joint.h b/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/joint.h new file mode 100644 index 00000000..3d92d2a1 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/joint.h @@ -0,0 +1,375 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** \author Dalibor Matura, Jia Pan */ + +#ifndef FCL_ARTICULATED_MODEL_JOINT_H +#define FCL_ARTICULATED_MODEL_JOINT_H + +#include "fcl/common/data_types.h" + +#include +#include +#include +#include +#include + +namespace fcl +{ + +class JointConfig; +class Link; + +enum JointType {JT_UNKNOWN, JT_PRISMATIC, JT_REVOLUTE, JT_BALLEULER}; + +/// @brief Base Joint +template +class Joint +{ +public: + + Joint(const std::shared_ptr& link_parent, const std::shared_ptr& link_child, + const Transform3& transform_to_parent, + const std::string& name); + + Joint(const std::string& name); + + virtual ~Joint() {} + + const std::string& getName() const; + void setName(const std::string& name); + + virtual Transform3 getLocalTransform() const = 0; + + virtual std::size_t getNumDofs() const = 0; + + std::shared_ptr getJointConfig() const; + void setJointConfig(const std::shared_ptr& joint_cfg); + + std::shared_ptr getParentLink() const; + std::shared_ptr getChildLink() const; + + void setParentLink(const std::shared_ptr& link); + void setChildLink(const std::shared_ptr& link); + + JointType getJointType() const; + + const Transform3& getTransformToParent() const; + void setTransformToParent(const Transform3& t); + +protected: + + /// links to parent and child are only for connection, so weak_ptr to avoid cyclic dependency + std::weak_ptr link_parent_, link_child_; + + JointType type_; + + std::string name_; + + std::shared_ptr joint_cfg_; + + Transform3 transform_to_parent_; + +public: + EIGEN_MAKE_ALIGNED_OPERATOR_NEW +}; + +template +class PrismaticJoint : public Joint +{ +public: + PrismaticJoint(const std::shared_ptr& link_parent, const std::shared_ptr& link_child, + const Transform3& transform_to_parent, + const std::string& name, + const Vector3& axis); + + virtual ~PrismaticJoint() {} + + Transform3 getLocalTransform() const; + + std::size_t getNumDofs() const; + + const Vector3& getAxis() const; + +protected: + Vector3 axis_; +}; + +template +class RevoluteJoint : public Joint +{ +public: + RevoluteJoint(const std::shared_ptr& link_parent, const std::shared_ptr& link_child, + const Transform3& transform_to_parent, + const std::string& name, + const Vector3& axis); + + virtual ~RevoluteJoint() {} + + Transform3 getLocalTransform() const; + + std::size_t getNumDofs() const; + + const Vector3& getAxis() const; + +protected: + Vector3 axis_; +}; + +template +class BallEulerJoint : public Joint +{ +public: + BallEulerJoint(const std::shared_ptr& link_parent, const std::shared_ptr& link_child, + const Transform3& transform_to_parent, + const std::string& name); + + virtual ~BallEulerJoint() {} + + std::size_t getNumDofs() const; + + Transform3 getLocalTransform() const; +}; + +//============================================================================// +// // +// Implementations // +// // +//============================================================================// + +//============================================================================== +template +Joint::Joint(const std::shared_ptr& link_parent, const std::shared_ptr& link_child, + const Transform3& transform_to_parent, + const std::string& name) : + link_parent_(link_parent), link_child_(link_child), + name_(name), + transform_to_parent_(transform_to_parent) +{} + +//============================================================================== +template +Joint::Joint(const std::string& name) : + name_(name) +{ +} + +//============================================================================== +template +const std::string& Joint::getName() const +{ + return name_; +} + +//============================================================================== +template +void Joint::setName(const std::string& name) +{ + name_ = name; +} + +//============================================================================== +template +std::shared_ptr Joint::getJointConfig() const +{ + return joint_cfg_; +} + +//============================================================================== +template +void Joint::setJointConfig(const std::shared_ptr& joint_cfg) +{ + joint_cfg_ = joint_cfg; +} + +//============================================================================== +template +std::shared_ptr Joint::getParentLink() const +{ + return link_parent_.lock(); +} + +//============================================================================== +template +std::shared_ptr Joint::getChildLink() const +{ + return link_child_.lock(); +} + +//============================================================================== +template +void Joint::setParentLink(const std::shared_ptr& link) +{ + link_parent_ = link; +} + +//============================================================================== +template +void Joint::setChildLink(const std::shared_ptr& link) +{ + link_child_ = link; +} + +//============================================================================== +template +JointType Joint::getJointType() const +{ + return type_; +} + +//============================================================================== +template +const Transform3& Joint::getTransformToParent() const +{ + return transform_to_parent_; +} + +//============================================================================== +template +void Joint::setTransformToParent(const Transform3& t) +{ + transform_to_parent_ = t; +} + +//============================================================================== +template +PrismaticJoint::PrismaticJoint(const std::shared_ptr& link_parent, const std::shared_ptr& link_child, + const Transform3& transform_to_parent, + const std::string& name, + const Vector3& axis) : + Joint(link_parent, link_child, transform_to_parent, name), + axis_(axis) +{ + type_ = JT_PRISMATIC; +} + +//============================================================================== +template +const Vector3& PrismaticJoint::getAxis() const +{ + return axis_; +} + +//============================================================================== +template +std::size_t PrismaticJoint::getNumDofs() const +{ + return 1; +} + +//============================================================================== +template +Transform3 PrismaticJoint::getLocalTransform() const +{ + const Quaternion quat(transform_to_parent_.linear()); + const Vector3& transl = transform_to_parent_.translation(); + + Transform3 tf = Transform3::Identity(); + tf.linear() = quat.toRotationMatrix(); + tf.translation() = quat * (axis_ * (*joint_cfg_)[0]) + transl; + + return tf; +} + +//============================================================================== +template +RevoluteJoint::RevoluteJoint(const std::shared_ptr& link_parent, const std::shared_ptr& link_child, + const Transform3& transform_to_parent, + const std::string& name, + const Vector3& axis) : + Joint(link_parent, link_child, transform_to_parent, name), + axis_(axis) +{ + type_ = JT_REVOLUTE; +} + +//============================================================================== +template +const Vector3& RevoluteJoint::getAxis() const +{ + return axis_; +} + +//============================================================================== +template +std::size_t RevoluteJoint::getNumDofs() const +{ + return 1; +} + +//============================================================================== +template +Transform3 RevoluteJoint::getLocalTransform() const +{ + Transform3 tf = Transform3::Identity(); + tf.linear() = transform_to_parent_.linear() * AngleAxis((*joint_cfg_)[0], axis_); + tf.translation() = transform_to_parent_.translation(); + + return tf; +} + +//============================================================================== +template +BallEulerJoint::BallEulerJoint(const std::shared_ptr& link_parent, const std::shared_ptr& link_child, + const Transform3& transform_to_parent, + const std::string& name) : + Joint(link_parent, link_child, transform_to_parent, name) +{} + +//============================================================================== +template +std::size_t BallEulerJoint::getNumDofs() const +{ + return 3; +} + +//============================================================================== +template +Transform3 BallEulerJoint::getLocalTransform() const +{ + Matrix3 rot( + AngleAxis((*joint_cfg_)[0], Eigen::Vector3::UnitX()) + * AngleAxis((*joint_cfg_)[1], Eigen::Vector3::UnitY()) + * AngleAxis((*joint_cfg_)[2], Eigen::Vector3::UnitZ())); + + Transform3 tf = Transform3::Identity(); + tf.linear() = rot; + + return transform_to_parent_ * tf; +} + +} // namespace fcl + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/joint_config.h b/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/joint_config.h new file mode 100644 index 00000000..b711de21 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/joint_config.h @@ -0,0 +1,189 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** \author Dalibor Matura, Jia Pan */ + +#ifndef FCL_ARTICULATED_MODEL_JOINT_CONFIG_H +#define FCL_ARTICULATED_MODEL_JOINT_CONFIG_H + +#include "fcl/common/data_types.h" +#include +#include + +namespace fcl +{ + +template +class Joint; + +template +class JointConfig +{ +public: + JointConfig(); + + JointConfig(const JointConfig& joint_cfg); + + JointConfig(const std::shared_ptr& joint, + S default_value = 0, + S default_value_min = 0, + S default_value_max = 0); + + std::size_t getDim() const; + + inline S operator [] (std::size_t i) const + { + return values_[i]; + } + + inline S& operator [] (std::size_t i) + { + return values_[i]; + } + + S getValue(std::size_t i) const; + + S& getValue(std::size_t i); + + S getLimitMin(std::size_t i) const; + + S& getLimitMin(std::size_t i); + + S getLimitMax(std::size_t i) const; + + S& getLimitMax(std::size_t i); + + std::shared_ptr getJoint() const; + +private: + std::weak_ptr joint_; + + std::vector values_; + std::vector limits_min_; + std::vector limits_max_; +}; + +//============================================================================// +// // +// Implementations // +// // +//============================================================================// + +//============================================================================== +template +JointConfig::JointConfig() {} + +//============================================================================== +template +JointConfig::JointConfig(const JointConfig& joint_cfg) : + joint_(joint_cfg.joint_), + values_(joint_cfg.values_), + limits_min_(joint_cfg.limits_min_), + limits_max_(joint_cfg.limits_max_) +{ +} + +//============================================================================== +template +JointConfig::JointConfig(const std::shared_ptr& joint, + S default_value, + S default_value_min, + S default_value_max) : + joint_(joint) +{ + values_.resize(joint->getNumDofs(), default_value); + limits_min_.resize(joint->getNumDofs(), default_value_min); + limits_max_.resize(joint->getNumDofs(), default_value_max); +} + +//============================================================================== +template +std::size_t JointConfig::getDim() const +{ + return values_.size(); +} + +//============================================================================== +template +S JointConfig::getValue(std::size_t i) const +{ + return values_[i]; +} + +//============================================================================== +template +S& JointConfig::getValue(std::size_t i) +{ + return values_[i]; +} + +//============================================================================== +template +S JointConfig::getLimitMin(std::size_t i) const +{ + return limits_min_[i]; +} + +//============================================================================== +template +S& JointConfig::getLimitMin(std::size_t i) +{ + return limits_min_[i]; +} + +//============================================================================== +template +S JointConfig::getLimitMax(std::size_t i) const +{ + return limits_max_[i]; +} + +//============================================================================== +template +S& JointConfig::getLimitMax(std::size_t i) +{ + return limits_max_[i]; +} + +//============================================================================== +template +std::shared_ptr JointConfig::getJoint() const +{ + return joint_.lock(); +} + +} // namespace fcl + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/link.h b/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/link.h new file mode 100644 index 00000000..a36d5766 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/link.h @@ -0,0 +1,145 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** \author Dalibor Matura, Jia Pan */ + +#ifndef FCL_ARTICULATED_MODEL_LINK_H +#define FCL_ARTICULATED_MODEL_LINK_H + +#include "fcl/common/data_types.h" +#include "fcl/object/collision_object.h" + +#include +#include + +namespace fcl +{ + +template +class Joint; + +template +class Link +{ +public: + Link(const std::string& name); + + const std::string& getName() const; + + void setName(const std::string& name); + + void addChildJoint(const std::shared_ptr& joint); + + void setParentJoint(const std::shared_ptr& joint); + + void addObject(const std::shared_ptr>& object); + + std::size_t getNumChildJoints() const; + + std::size_t getNumObjects() const; + +protected: + std::string name_; + + std::vector> > objects_; + + std::vector > children_joints_; + + std::shared_ptr parent_joint_; +}; + +//============================================================================// +// // +// Implementations // +// // +//============================================================================// + +//============================================================================== +template +Link::Link(const std::string& name) : name_(name) +{} + +//============================================================================== +template +const std::string& Link::getName() const +{ + return name_; +} + +//============================================================================== +template +void Link::setName(const std::string& name) +{ + name_ = name; +} + +//============================================================================== +template +void Link::addChildJoint(const std::shared_ptr& joint) +{ + children_joints_.push_back(joint); +} + +//============================================================================== +template +void Link::setParentJoint(const std::shared_ptr& joint) +{ + parent_joint_ = joint; +} + +//============================================================================== +template +void Link::addObject(const std::shared_ptr>& object) +{ + objects_.push_back(object); +} + +//============================================================================== +template +std::size_t Link::getNumChildJoints() const +{ + return children_joints_.size(); +} + +//============================================================================== +template +std::size_t Link::getNumObjects() const +{ + return objects_.size(); +} + +} // namespace fcl + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/model.h b/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/model.h new file mode 100644 index 00000000..ecffbda0 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/model.h @@ -0,0 +1,237 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** \author Dalibor Matura, Jia Pan */ + +#ifndef FCL_ARTICULATED_MODEL_MODEL_H +#define FCL_ARTICULATED_MODEL_MODEL_H + +#include "fcl/articulated_model/joint.h" +#include "fcl/articulated_model/link.h" + +#include "fcl/common/data_types.h" +#include + +#include +#include + +namespace fcl +{ + +class ModelParseError : public std::runtime_error +{ +public: + ModelParseError(const std::string& error_msg) : std::runtime_error(error_msg) {} +}; + +template +class Model +{ +public: + Model() {} + + virtual ~Model() {} + + const std::string& getName() const; + + void addLink(const std::shared_ptr& link); + + void addJoint(const std::shared_ptr& joint); + + void initRoot(const std::map& link_parent_tree); + + void initTree(std::map& link_parent_tree); + + std::size_t getNumDofs() const; + + std::size_t getNumLinks() const; + + std::size_t getNumJoints() const; + + std::shared_ptr getRoot() const; + std::shared_ptr getLink(const std::string& name) const; + std::shared_ptr getJoint(const std::string& name) const; + + std::vector > getLinks() const; + std::vector > getJoints() const; +protected: + std::shared_ptr root_link_; + std::map > links_; + std::map > joints_; + + std::string name_; + +}; + +//============================================================================== +template +std::shared_ptr Model::getRoot() const +{ + return root_link_; +} + +//============================================================================== +template +std::shared_ptr Model::getLink(const std::string& name) const +{ + std::shared_ptr ptr; + std::map >::const_iterator it = links_.find(name); + if(it == links_.end()) + ptr.reset(); + else + ptr = it->second; + return ptr; +} + +//============================================================================== +template +std::shared_ptr Model::getJoint(const std::string& name) const +{ + std::shared_ptr ptr; + std::map >::const_iterator it = joints_.find(name); + if(it == joints_.end()) + ptr.reset(); + else + ptr = it->second; + return ptr; +} + +//============================================================================== +template +const std::string& Model::getName() const +{ + return name_; +} + +//============================================================================== +template +std::vector > Model::getLinks() const +{ + std::vector > links; + for(std::map >::const_iterator it = links_.begin(); it != links_.end(); ++it) + { + links.push_back(it->second); + } + + return links; +} + +//============================================================================== +template +std::size_t Model::getNumLinks() const +{ + return links_.size(); +} + +//============================================================================== +template +std::size_t Model::getNumJoints() const +{ + return joints_.size(); +} + +//============================================================================== +template +std::size_t Model::getNumDofs() const +{ + std::size_t dof = 0; + for(std::map >::const_iterator it = joints_.begin(); it != joints_.end(); ++it) + { + dof += it->second->getNumDofs(); + } + + return dof; +} + +//============================================================================== +template +void Model::addLink(const std::shared_ptr& link) +{ + links_[link->getName()] = link; +} + +//============================================================================== +template +void Model::addJoint(const std::shared_ptr& joint) +{ + joints_[joint->getName()] = joint; +} + +//============================================================================== +template +void Model::initRoot(const std::map& link_parent_tree) +{ + root_link_.reset(); + + /// find the links that have no parent in the tree + for(std::map >::const_iterator it = links_.begin(); it != links_.end(); ++it) + { + std::map::const_iterator parent = link_parent_tree.find(it->first); + if(parent == link_parent_tree.end()) + { + if(!root_link_) + { + root_link_ = getLink(it->first); + } + else + { + throw ModelParseError("Two root links found: [" + root_link_->getName() + "] and [" + it->first + "]"); + } + } + } + + if(!root_link_) + throw ModelParseError("No root link found."); +} + +//============================================================================== +template +void Model::initTree(std::map& link_parent_tree) +{ + for(std::map >::iterator it = joints_.begin(); it != joints_.end(); ++it) + { + std::string parent_link_name = it->second->getParentLink()->getName(); + std::string child_link_name = it->second->getChildLink()->getName(); + + it->second->getParentLink()->addChildJoint(it->second); + it->second->getChildLink()->setParentJoint(it->second); + + link_parent_tree[child_link_name] = parent_link_name; + } +} + +} // namespace fcl + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/model_config.h b/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/model_config.h new file mode 100644 index 00000000..60f07b47 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/articulated_model/model_config.h @@ -0,0 +1,137 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** \author Dalibor Matura, Jia Pan */ + +#ifndef FCL_ARTICULATED_MODEL_MODEL_CONFIG_H +#define FCL_ARTICULATED_MODEL_MODEL_CONFIG_H + +#include +#include +#include +#include "fcl/common/data_types.h" +#include "fcl/articulated_model/joint_config.h" + +namespace fcl +{ + +template +class ModelConfig +{ +public: + ModelConfig(); + + ModelConfig(const ModelConfig& model_cfg); + + ModelConfig(std::map > joints_map); + + JointConfig getJointConfigByJointName(const std::string& joint_name) const; + JointConfig& getJointConfigByJointName(const std::string& joint_name); + + JointConfig getJointConfigByJoint(std::shared_ptr joint) const; + JointConfig& getJointConfigByJoint(std::shared_ptr joint); + + std::map getJointCfgsMap() const + { return joint_cfgs_map_; } + +private: + std::map joint_cfgs_map_; +}; + +//============================================================================// +// // +// Implementations // +// // +//============================================================================// + +//============================================================================== +template +ModelConfig::ModelConfig() +{ + // Do nothing +} + +//============================================================================== +template +ModelConfig::ModelConfig(const ModelConfig& model_cfg) : + joint_cfgs_map_(model_cfg.joint_cfgs_map_) +{} + +//============================================================================== +template +ModelConfig::ModelConfig(std::map > joints_map) +{ + std::map >::iterator it; + for(it = joints_map.begin(); it != joints_map.end(); ++it) + joint_cfgs_map_[it->first] = JointConfig(it->second); +} + +//============================================================================== +template +JointConfig ModelConfig::getJointConfigByJointName(const std::string& joint_name) const +{ + std::map::const_iterator it = joint_cfgs_map_.find(joint_name); + assert(it != joint_cfgs_map_.end()); + + return it->second; +} + +//============================================================================== +template +JointConfig& ModelConfig::getJointConfigByJointName(const std::string& joint_name) +{ + std::map::iterator it = joint_cfgs_map_.find(joint_name); + assert(it != joint_cfgs_map_.end()); + + return it->second; +} + +//============================================================================== +template +JointConfig ModelConfig::getJointConfigByJoint(std::shared_ptr joint) const +{ + return getJointConfigByJointName(joint->getName()); +} + +//============================================================================== +template +JointConfig& ModelConfig::getJointConfigByJoint(std::shared_ptr joint) +{ + return getJointConfigByJointName(joint->getName()); +} + +} // namespace fcl + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/learning/classifier.h b/rmf_traffic/thirdparty/fcl/.deprecated/learning/classifier.h new file mode 100644 index 00000000..06ef87c4 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/learning/classifier.h @@ -0,0 +1,260 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2013-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** \author Jia Pan */ + +#ifndef FCL_LEARNING_CLASSIFIER_H +#define FCL_LEARNING_CLASSIFIER_H + +#include + +#include "fcl/common/data_types.h" + +namespace fcl +{ + +template +struct Item +{ + VectorN q; + bool label; + S w; + + Item(const VectorN& q_, bool label_, S w_ = 1); + + Item(); + + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(S, N) +}; + +template +struct Scaler +{ + VectorN v_min, v_max; + Scaler(); + + Scaler(const VectorN& v_min_, const VectorN& v_max_); + + VectorN scale(const VectorN& v) const; + + VectorN unscale(const VectorN& v) const; + + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(S, N) +}; + +template +struct PredictResult +{ + bool label; + S prob; + + PredictResult(); + PredictResult(bool label_, S prob_ = 1); +}; + +template +class SVMClassifier +{ +public: + + ~SVMClassifier(); + + virtual PredictResult predict(const VectorN& q) const = 0; + virtual std::vector> predict( + const std::vector >& qs) const = 0; + + virtual std::vector > getSupportVectors() const = 0; + virtual void setScaler(const Scaler& scaler) = 0; + + virtual void learn(const std::vector >& data) = 0; + + S error_rate(const std::vector >& data) const; +}; + +template +Scaler computeScaler(const std::vector >& data); + +template +Scaler computeScaler(const std::vector >& data); + +//============================================================================// +// // +// Implementations // +// // +//============================================================================// + +//============================================================================== +template +Item::Item(const VectorN& q_, bool label_, S w_) + : q(q_), label(label_), w(w_) +{ + // Do nothing +} + +//============================================================================== +template +Item::Item() +{ + // Do nothing +} + +//============================================================================== +template +Scaler::Scaler() +{ + // default no scale + for(std::size_t i = 0; i < N; ++i) + { + v_min[i] = 0; + v_max[i] = 1; + } +} + +//============================================================================== +template +Scaler::Scaler(const VectorN& v_min_, const VectorN& v_max_) + : v_min(v_min_), v_max(v_max_) +{ + // Do nothing +} + +//============================================================================== +template +VectorN Scaler::scale(const VectorN& v) const +{ + VectorN res; + for(std::size_t i = 0; i < N; ++i) + res[i] = (v[i] - v_min[i]) / (v_max[i] - v_min[i]); + return res; +} + +//============================================================================== +template +VectorN Scaler::unscale(const VectorN& v) const +{ + VectorN res; + for(std::size_t i = 0; i < N; ++i) + res[i] = v[i] * (v_max[i] - v_min[i]) + v_min[i]; + return res; +} + +//============================================================================== +template +PredictResult::PredictResult() +{ + // Do nothing +} + +//============================================================================== +template +PredictResult::PredictResult(bool label_, S prob_) + : label(label_), prob(prob_) +{ + // Do nothing +} + +//============================================================================== +template +SVMClassifier::~SVMClassifier() +{ + // Do nothing +} + +//============================================================================== +template +S SVMClassifier::error_rate(const std::vector >& data) const +{ + std::size_t num = data.size(); + + std::size_t error_num = 0; + for(std::size_t i = 0; i < data.size(); ++i) + { + PredictResult res = predict(data[i].q); + if(res.label != data[i].label) + error_num++; + } + + return error_num / (S)num; +} + +//============================================================================== +template +Scaler computeScaler(const std::vector >& data) +{ + VectorN lower_bound, upper_bound; + for(std::size_t j = 0; j < N; ++j) + { + lower_bound[j] = std::numeric_limits::max(); + upper_bound[j] = -std::numeric_limits::max(); + } + + for(std::size_t i = 0; i < data.size(); ++i) + { + for(std::size_t j = 0; j < N; ++j) + { + if(data[i].q[j] < lower_bound[j]) lower_bound[j] = data[i].q[j]; + if(data[i].q[j] > upper_bound[j]) upper_bound[j] = data[i].q[j]; + } + } + + return Scaler(lower_bound, upper_bound); +} + +//============================================================================== +template +Scaler computeScaler(const std::vector >& data) +{ + VectorN lower_bound, upper_bound; + for(std::size_t j = 0; j < N; ++j) + { + lower_bound[j] = std::numeric_limits::max(); + upper_bound[j] = -std::numeric_limits::max(); + } + + for(std::size_t i = 0; i < data.size(); ++i) + { + for(std::size_t j = 0; j < N; ++j) + { + if(data[i][j] < lower_bound[j]) lower_bound[j] = data[i][j]; + if(data[i][j] > upper_bound[j]) upper_bound[j] = data[i][j]; + } + } + + return Scaler(lower_bound, upper_bound); +} + +} // namespace fcl + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation.cpp b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation.cpp new file mode 100644 index 00000000..0e88ce07 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation.cpp @@ -0,0 +1,76 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** @author Dalibor Matura, Jia Pan */ + +#include "fcl/math/motion/taylor_model/interpolation/interpolation.h" + +namespace fcl +{ + +Interpolation::Interpolation() : + value_0_(0.0), + value_1_(1.0) +{} + +Interpolation::Interpolation(real start_value, real end_value) : + value_0_(start_value), + value_1_(end_value) +{} + +void Interpolation::setStartValue(real start_value) +{ + value_0_ = start_value; +} + +void Interpolation::setEndValue(real end_value) +{ + value_1_ = end_value; +} + +bool Interpolation::operator == (const Interpolation& interpolation) const +{ + return + (this->getType() == interpolation.getType()) && + (this->value_0_ == interpolation.value_0_) && + (this->value_1_ == interpolation.value_1_); +} + +bool Interpolation::operator != (const Interpolation& interpolation) const +{ + return !(*this == interpolation); +} + +} diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation.h b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation.h new file mode 100644 index 00000000..1a33d930 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation.h @@ -0,0 +1,91 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** @author Dalibor Matura, Jia Pan */ + +#ifndef FCL_CCD_INTERPOLATION_INTERPOLATION_H +#define FCL_CCD_INTERPOLATION_INTERPOLATION_H + +#include "fcl/common/types.h" + +namespace fcl +{ + +enum InterpolationType +{ + LINEAR, + STANDARD +}; + +class Interpolation +{ +public: + Interpolation(); + + virtual ~Interpolation() {} + + Interpolation(real start_value, real end_value); + + void setStartValue(real start_value); + void setEndValue(real end_value); + + virtual real getValue(real time) const = 0; + + /// @brief return the smallest value in time interval [0, 1] + virtual real getValueLowerBound() const = 0; + + /// @brief return the biggest value in time interval [0, 1] + virtual real getValueUpperBound() const = 0; + + virtual InterpolationType getType() const = 0; + + bool operator == (const Interpolation& interpolation) const; + bool operator != (const Interpolation& interpolation) const; + + virtual real getMovementLengthBound(real time) const = 0; + + virtual real getVelocityBound(real time) const = 0; + +protected: + real value_0_; // value at time = 0.0 + real value_1_; // value at time = 1.0 + +}; + + + +} + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_factory.cpp b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_factory.cpp new file mode 100644 index 00000000..587fcbc4 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_factory.cpp @@ -0,0 +1,72 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** @author Dalibor Matura, Jia Pan */ + +#include "fcl/math/motion/taylor_model/interpolation/interpolation_factory.h" +#include "fcl/math/motion/taylor_model/interpolation/interpolation_linear.h" +#include + +namespace fcl +{ + +InterpolationFactory::InterpolationFactory() +{ + InterpolationLinear::registerToFactory(); +} + +InterpolationFactory& InterpolationFactory::instance() +{ + static InterpolationFactory instance; + + return instance; +} + +void InterpolationFactory::registerClass(const InterpolationType type, const CreateFunction create_function) +{ + this->creation_map_[type] = create_function; +} + +std::shared_ptr +InterpolationFactory::create(const InterpolationType type, const real start_value, const real end_value) +{ + std::map::const_iterator it = creation_map_.find(type); + + assert(it != creation_map_.end()); + + return (it->second)(start_value, end_value); +} + +} diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_factory.h b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_factory.h new file mode 100644 index 00000000..87cfc831 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_factory.h @@ -0,0 +1,82 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** @author Dalibor Matura, Jia Pan */ + +#ifndef FCL_CCD_INTERPOLATION_INTERPOLATION_FACTORY_H +#define FCL_CCD_INTERPOLATION_INTERPOLATION_FACTORY_H + +#include "fcl/common/types.h" +#include "fcl/math/motion/taylor_model/interpolation/interpolation.h" + +#include + +#include +#include + +namespace fcl +{ + +class InterpolationFactory +{ +public: + typedef std::function(real, real)> CreateFunction; + +public: + void registerClass(const InterpolationType type, const CreateFunction create_function); + + std::shared_ptr create(const InterpolationType type, real start_value, real end_value); + +public: + static InterpolationFactory& instance(); + +private: + InterpolationFactory(); + + InterpolationFactory(const InterpolationFactory&) + {} + + InterpolationFactory& operator = (const InterpolationFactory&) + { + return *this; + } + +private: + std::map creation_map_; +}; + +} + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_linear.cpp b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_linear.cpp new file mode 100644 index 00000000..4983e52d --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_linear.cpp @@ -0,0 +1,92 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** @author Dalibor Matura, Jia Pan */ + +#include "fcl/math/motion/taylor_model/interpolation/interpolation_linear.h" +#include "fcl/math/motion/taylor_model/interpolation/interpolation_factory.h" + +namespace fcl +{ + +InterpolationType interpolation_linear_type = LINEAR; + +InterpolationLinear::InterpolationLinear() : Interpolation(0.0, 1.0) +{} + +InterpolationLinear::InterpolationLinear(real start_value, real end_value) : Interpolation(start_value, end_value) +{} + +real InterpolationLinear::getValue(real time) const +{ + return value_0_ + (value_1_ - value_0_) * time; +} + +real InterpolationLinear::getValueLowerBound() const +{ + return value_0_; +} + +real InterpolationLinear::getValueUpperBound() const +{ + return value_1_; +} + +InterpolationType InterpolationLinear::getType() const +{ + return interpolation_linear_type; +} + +std::shared_ptr InterpolationLinear::create(real start_value, real end_value) +{ + return std::shared_ptr(new InterpolationLinear(start_value, end_value) ); +} + +void InterpolationLinear::registerToFactory() +{ + InterpolationFactory::instance().registerClass(interpolation_linear_type, create); +} + +real InterpolationLinear::getMovementLengthBound(real time) const +{ + return getValueUpperBound() - getValue(time); +} + +real InterpolationLinear::getVelocityBound(real time) const +{ + return (value_1_ - value_0_); +} + +} diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_linear.h b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_linear.h new file mode 100644 index 00000000..74600a62 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/math/motion/taylor_model/interpolation/interpolation_linear.h @@ -0,0 +1,77 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** @author Dalibor Matura, Jia Pan */ + +#ifndef FCL_CCD_INTERPOLATION_INTERPOLATION_LINEAR_H +#define FCL_CCD_INTERPOLATION_INTERPOLATION_LINEAR_H + +#include "fcl/common/types.h" +#include "fcl/math/motion/taylor_model/interpolation/interpolation.h" + +#include + +namespace fcl +{ + +class InterpolationFactory; + +class InterpolationLinear : public Interpolation +{ +public: + InterpolationLinear(); + + InterpolationLinear(real start_value, real end_value); + + virtual real getValue(real time) const; + + virtual real getValueLowerBound() const; + virtual real getValueUpperBound() const; + + virtual InterpolationType getType() const; + + virtual real getMovementLengthBound(real time) const; + + virtual real getVelocityBound(real time) const; + +public: + static std::shared_ptr create(real start_value, real end_value); + + static void registerToFactory(); +}; + +} + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/narrowphase/penetration_depth_request.h b/rmf_traffic/thirdparty/fcl/.deprecated/narrowphase/penetration_depth_request.h new file mode 100644 index 00000000..5ecf1c04 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/narrowphase/penetration_depth_request.h @@ -0,0 +1,87 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** @author Jia Pan */ + +#ifndef FCL_PENETRATIONDEPTHREQUEST_H +#define FCL_PENETRATIONDEPTHREQUEST_H + +#include "fcl/common/types.h" +#include "fcl/narrowphase/gjk_solver.h" + +namespace fcl +{ + +enum PenetrationDepthType {PDT_TRANSLATIONAL, PDT_GENERAL_EULER, PDT_GENERAL_QUAT, PDT_GENERAL_EULER_BALL, PDT_GENERAL_QUAT_BALL}; + +template +struct PenetrationDepthRequest +{ + void* classifier; + + /// @brief PD algorithm type + PenetrationDepthType pd_type; + + /// @brief gjk solver type + GJKSolverType gjk_solver_type; + + Eigen::aligned_vector> contact_vectors; + + PenetrationDepthRequest(void* classifier_, + PenetrationDepthType pd_type_ = PDT_TRANSLATIONAL, + GJKSolverType gjk_solver_type_ = GST_LIBCCD); +}; + +//============================================================================// +// // +// Implementations // +// // +//============================================================================// + +//============================================================================== +template +PenetrationDepthRequest::PenetrationDepthRequest( + void* classifier_, + PenetrationDepthType pd_type_, + GJKSolverType gjk_solver_type_) + : classifier(classifier_), + pd_type(pd_type_), + gjk_solver_type(gjk_solver_type_) +{ +} + +} // namespace fcl + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/narrowphase/penetration_depth_result.h b/rmf_traffic/thirdparty/fcl/.deprecated/narrowphase/penetration_depth_result.h new file mode 100644 index 00000000..7daa8946 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/narrowphase/penetration_depth_result.h @@ -0,0 +1,60 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** @author Jia Pan */ + +#ifndef FCL_PENETRATIONDEPTHRESULT_H +#define FCL_PENETRATIONDEPTHRESULT_H + +#include "fcl/common/types.h" + +namespace fcl +{ + +template +struct PenetrationDepthResult +{ + /// @brief penetration depth value + S pd_value; + + /// @brief the transform where the collision is resolved + Transform3 resolved_tf; + + EIGEN_MAKE_ALIGNED_OPERATOR_NEW +}; + +} // namespace fcl + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/simd/math_simd_details.h b/rmf_traffic/thirdparty/fcl/.deprecated/simd/math_simd_details.h new file mode 100644 index 00000000..ac7b7b02 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/simd/math_simd_details.h @@ -0,0 +1,1150 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** \author Jia Pan */ + + +#ifndef FCL_MATH_SIMD_DETAILS_H +#define FCL_MATH_SIMD_DETAILS_H + +#include "fcl/common/data_types.h" + +#include +#if defined (__SSE3__) +#include +#endif +#if defined (__SSE4__) +#include +#endif + + +namespace fcl +{ + +/** @brief FCL internals. Ignore this :) unless you are God */ +namespace detail +{ + +const __m128 xmms_0 = {0.f, 0.f, 0.f, 0.f}; +const __m128d xmmd_0 = {0, 0}; + +static inline __m128 vec_sel(__m128 a, __m128 b, __m128 mask) +{ + return _mm_or_ps(_mm_and_ps(mask, b), _mm_andnot_ps(mask, a)); +} +static inline __m128 vec_sel(__m128 a, __m128 b, const unsigned int* mask) +{ + return vec_sel(a, b, _mm_load_ps((float*)mask)); +} + +static inline __m128 vec_sel(__m128 a, __m128 b, unsigned int mask) +{ + return vec_sel(a, b, _mm_set1_ps(*(float*)&mask)); +} + +#define vec_splat(a, e) _mm_shuffle_ps((a), (a), _MM_SHUFFLE((e), (e), (e), (e))) +#define vec_splatd(a, e) _mm_shuffle_pd((a), (a), _MM_SHUFFLE2((e), (e))) + +#define _mm_ror_ps(x, e) (((e) % 4) ? _mm_shuffle_ps((x), (x), _MM_SHUFFLE(((e)+3)%4, ((e)+2)%4, ((e)+1)%4, (e)%4)) : (x)) + +#define _mm_rol_ps(x, e) (((e) % 4) ? _mm_shuffle_ps((x), (x), _MM_SHUFFLE((7-(e))%4, (6-(e))%4, (5-(e))%4, (4-(e))%4)) : (x)) + +static inline __m128 newtonraphson_rsqrt4(const __m128 v) +{ + static const union { float i[4]; __m128 m; } _half4 __attribute__ ((aligned(16))) = {{.5f, .5f, .5f, .5f}}; + static const union { float i[4]; __m128 m; } _three __attribute__ ((aligned(16))) = {{3.f, 3.f, 3.f, 3.f}}; + __m128 approx = _mm_rsqrt_ps(v); + __m128 muls = _mm_mul_ps(_mm_mul_ps(v, approx), approx); + return _mm_mul_ps(_mm_mul_ps(_half4.m, approx), _mm_sub_ps(_three.m, muls)); +} + +struct sse_meta_f4 +{ + typedef float meta_type; + + union {float vs[4]; __m128 v; }; + sse_meta_f4() : v(_mm_set1_ps(0)) {} + sse_meta_f4(float x) : v(_mm_set1_ps(x)) {} + sse_meta_f4(float* px) : v(_mm_load_ps(px)) {} + sse_meta_f4(__m128 x) : v(x) {} + sse_meta_f4(float x, float y, float z, float w = 1) : v(_mm_setr_ps(x, y, z, w)) {} + inline void setValue(float x, float y, float z, float w = 1) { v = _mm_setr_ps(x, y, z, w); } + inline void setValue(float x) { v = _mm_set1_ps(x); } + inline void setValue(__m128 x) { v = x; } + inline void negate() { v = _mm_sub_ps(xmms_0, v); } + + inline sse_meta_f4& ubound(const sse_meta_f4& u) + { + v = _mm_min_ps(v, u.v); + return *this; + } + + inline sse_meta_f4& lbound(const sse_meta_f4& l) + { + v = _mm_max_ps(v, l.v); + return *this; + } + + inline void* operator new [] (size_t n) { return _mm_malloc(n, 16); } + inline void operator delete [] (void* x) { if(x) _mm_free(x); } + inline float operator [] (size_t i) const { return vs[i]; } + inline float& operator [] (size_t i) { return vs[i]; } + + inline sse_meta_f4 operator + (const sse_meta_f4& other) const { return sse_meta_f4(_mm_add_ps(v, other.v)); } + inline sse_meta_f4 operator - (const sse_meta_f4& other) const { return sse_meta_f4(_mm_sub_ps(v, other.v)); } + inline sse_meta_f4 operator * (const sse_meta_f4& other) const { return sse_meta_f4(_mm_mul_ps(v, other.v)); } + inline sse_meta_f4 operator / (const sse_meta_f4& other) const { return sse_meta_f4(_mm_div_ps(v, other.v)); } + inline sse_meta_f4& operator += (const sse_meta_f4& other) { v = _mm_add_ps(v, other.v); return *this; } + inline sse_meta_f4& operator -= (const sse_meta_f4& other) { v = _mm_sub_ps(v, other.v); return *this; } + inline sse_meta_f4& operator *= (const sse_meta_f4& other) { v = _mm_mul_ps(v, other.v); return *this; } + inline sse_meta_f4& operator /= (const sse_meta_f4& other) { v = _mm_div_ps(v, other.v); return *this; } + inline sse_meta_f4 operator + (float t) const { return sse_meta_f4(_mm_add_ps(v, _mm_set1_ps(t))); } + inline sse_meta_f4 operator - (float t) const { return sse_meta_f4(_mm_sub_ps(v, _mm_set1_ps(t))); } + inline sse_meta_f4 operator * (float t) const { return sse_meta_f4(_mm_mul_ps(v, _mm_set1_ps(t))); } + inline sse_meta_f4 operator / (float t) const { return sse_meta_f4(_mm_div_ps(v, _mm_set1_ps(t))); } + inline sse_meta_f4& operator += (float t) { v = _mm_add_ps(v, _mm_set1_ps(t)); return *this; } + inline sse_meta_f4& operator -= (float t) { v = _mm_sub_ps(v, _mm_set1_ps(t)); return *this; } + inline sse_meta_f4& operator *= (float t) { v = _mm_mul_ps(v, _mm_set1_ps(t)); return *this; } + inline sse_meta_f4& operator /= (float t) { v = _mm_div_ps(v, _mm_set1_ps(t)); return *this; } + inline sse_meta_f4 operator - () const + { + static const union { int i[4]; __m128 m; } negativemask __attribute__ ((aligned(16))) = {{0x80000000, 0x80000000, 0x80000000, 0x80000000}}; + return sse_meta_f4(_mm_xor_ps(negativemask.m, v)); + } +} __attribute__ ((aligned (16))); + +struct sse_meta_d4 +{ + typedef double meta_type; + + union {double vs[4]; __m128d v[2]; }; + sse_meta_d4() + { + setValue(0.0); + } + + sse_meta_d4(double x) + { + setValue(x); + } + + sse_meta_d4(double* px) + { + v[0] = _mm_load_pd(px); + v[1] = _mm_set_pd(0, *(px + 2)); + } + + sse_meta_d4(__m128d x, __m128d y) + { + v[0] = x; + v[1] = y; + } + + sse_meta_d4(double x, double y, double z, double w = 0) + { + setValue(x, y, z, w); + } + + inline void setValue(double x, double y, double z, double w = 0) + { + v[0] = _mm_setr_pd(x, y); + v[1] = _mm_setr_pd(z, w); + } + + inline void setValue(double x) + { + v[0] = _mm_set1_pd(x); + v[1] = v[0]; + } + + inline void setValue(__m128d x, __m128d y) + { + v[0] = x; + v[1] = y; + } + + inline void negate() + { + v[0] = _mm_sub_pd(xmmd_0, v[0]); + v[1] = _mm_sub_pd(xmmd_0, v[1]); + } + + inline sse_meta_d4& ubound(const sse_meta_d4& u) + { + v[0] = _mm_min_pd(v[0], u.v[0]); + v[1] = _mm_min_pd(v[1], u.v[1]); + return *this; + } + + inline sse_meta_d4& lbound(const sse_meta_d4& l) + { + v[0] = _mm_max_pd(v[0], l.v[0]); + v[1] = _mm_max_pd(v[1], l.v[1]); + return *this; + } + + inline void* operator new [] (size_t n) + { + return _mm_malloc(n, 16); + } + + inline void operator delete [] (void* x) + { + if(x) _mm_free(x); + } + + inline double operator [] (size_t i) const { return vs[i]; } + inline double& operator [] (size_t i) { return vs[i]; } + + inline sse_meta_d4 operator + (const sse_meta_d4& other) const { return sse_meta_d4(_mm_add_pd(v[0], other.v[0]), _mm_add_pd(v[1], other.v[1])); } + inline sse_meta_d4 operator - (const sse_meta_d4& other) const { return sse_meta_d4(_mm_sub_pd(v[0], other.v[0]), _mm_sub_pd(v[1], other.v[1])); } + inline sse_meta_d4 operator * (const sse_meta_d4& other) const { return sse_meta_d4(_mm_mul_pd(v[0], other.v[0]), _mm_mul_pd(v[1], other.v[1])); } + inline sse_meta_d4 operator / (const sse_meta_d4& other) const { return sse_meta_d4(_mm_div_pd(v[0], other.v[0]), _mm_div_pd(v[1], other.v[1])); } + inline sse_meta_d4& operator += (const sse_meta_d4& other) { v[0] = _mm_add_pd(v[0], other.v[0]); v[1] = _mm_add_pd(v[1], other.v[1]); return *this; } + inline sse_meta_d4& operator -= (const sse_meta_d4& other) { v[0] = _mm_sub_pd(v[0], other.v[0]); v[1] = _mm_sub_pd(v[1], other.v[1]); return *this; } + inline sse_meta_d4& operator *= (const sse_meta_d4& other) { v[0] = _mm_mul_pd(v[0], other.v[0]); v[1] = _mm_mul_pd(v[1], other.v[1]); return *this; } + inline sse_meta_d4& operator /= (const sse_meta_d4& other) { v[0] = _mm_div_pd(v[0], other.v[0]); v[1] = _mm_div_pd(v[1], other.v[1]); return *this; } + inline sse_meta_d4 operator + (double t) const { register __m128d d = _mm_set1_pd(t); return sse_meta_d4(_mm_add_pd(v[0], d), _mm_add_pd(v[1], d)); } + inline sse_meta_d4 operator - (double t) const { register __m128d d = _mm_set1_pd(t); return sse_meta_d4(_mm_sub_pd(v[0], d), _mm_sub_pd(v[1], d)); } + inline sse_meta_d4 operator * (double t) const { register __m128d d = _mm_set1_pd(t); return sse_meta_d4(_mm_mul_pd(v[0], d), _mm_mul_pd(v[1], d)); } + inline sse_meta_d4 operator / (double t) const { register __m128d d = _mm_set1_pd(t); return sse_meta_d4(_mm_div_pd(v[0], d), _mm_div_pd(v[1], d)); } + inline sse_meta_d4& operator += (double t) { register __m128d d = _mm_set1_pd(t); v[0] = _mm_add_pd(v[0], d); v[1] = _mm_add_pd(v[1], d); return *this; } + inline sse_meta_d4& operator -= (double t) { register __m128d d = _mm_set1_pd(t); v[0] = _mm_sub_pd(v[0], d); v[1] = _mm_sub_pd(v[1], d); return *this; } + inline sse_meta_d4& operator *= (double t) { register __m128d d = _mm_set1_pd(t); v[0] = _mm_mul_pd(v[0], d); v[1] = _mm_mul_pd(v[1], d); return *this; } + inline sse_meta_d4& operator /= (double t) { register __m128d d = _mm_set1_pd(t); v[0] = _mm_div_pd(v[0], d); v[1] = _mm_div_pd(v[1], d); return *this; } + inline sse_meta_d4 operator - () const + { + static const union { FCL_INT64 i[2]; __m128d m; } negativemask __attribute__ ((aligned(16))) = {{0x8000000000000000, 0x8000000000000000}}; + return sse_meta_d4(_mm_xor_pd(v[0], negativemask.m), _mm_xor_pd(v[1], negativemask.m)); + } +} __attribute__ ((aligned (16))); + + + +static inline __m128 cross_prod(__m128 x, __m128 y) +{ + // set to a[1][2][0][3] , b[2][0][1][3] + // multiply + static const int s1 = _MM_SHUFFLE(3, 0, 2, 1); + static const int s2 = _MM_SHUFFLE(3, 1, 0, 2); + __m128 xa = _mm_mul_ps(_mm_shuffle_ps(x, x, s1), _mm_shuffle_ps(y, y, s2)); + + // set to a[2][0][1][3] , b[1][2][0][3] + // multiply + __m128 xb = _mm_mul_ps(_mm_shuffle_ps(x, x, s2), _mm_shuffle_ps(y, y, s1)); + + // subtract + return _mm_sub_ps(xa, xb); +} + +static inline sse_meta_f4 cross_prod(const sse_meta_f4& x, const sse_meta_f4& y) +{ + return sse_meta_f4(cross_prod(x.v, y.v)); +} + +static inline void cross_prod(__m128d x0, __m128d x1, __m128d y0, __m128d y1, __m128d* z0, __m128d* z1) +{ + static const int s0 = _MM_SHUFFLE2(0, 0); + static const int s1 = _MM_SHUFFLE2(0, 1); + static const int s2 = _MM_SHUFFLE2(1, 0); + static const int s3 = _MM_SHUFFLE2(1, 1); + __m128d xa1 = _mm_mul_pd(_mm_shuffle_pd(x0, x1, s1), _mm_shuffle_pd(y1, y0, s0)); + __m128d ya1 = _mm_mul_pd(_mm_shuffle_pd(x0, x1, s2), _mm_shuffle_pd(y0, y1, s3)); + + __m128d xa2 = _mm_mul_pd(_mm_shuffle_pd(x1, x0, s0), _mm_shuffle_pd(y0, y1, s1)); + __m128d ya2 = _mm_mul_pd(_mm_shuffle_pd(x0, x1, s3), _mm_shuffle_pd(y0, y1, s2)); + + *z0 = _mm_sub_pd(xa1, xa2); + *z1 = _mm_sub_pd(ya1, ya2); +} + +static inline sse_meta_d4 cross_prod(const sse_meta_d4& x, const sse_meta_d4& y) +{ + __m128d z0, z1; + cross_prod(x.v[0], x.v[1], y.v[0], y.v[1], &z0, &z1); + return sse_meta_d4(z0, z1); +} + + +static inline __m128 dot_prod3(__m128 x, __m128 y) +{ + register __m128 m = _mm_mul_ps(x, y); + return _mm_add_ps(_mm_shuffle_ps(m, m, _MM_SHUFFLE(0, 0, 0, 0)), + _mm_add_ps(vec_splat(m, 1), vec_splat(m, 2))); +} + +static inline float dot_prod3(const sse_meta_f4& x, const sse_meta_f4& y) +{ + return _mm_cvtss_f32(dot_prod3(x.v, y.v)); +} + + +static inline __m128d dot_prod3(__m128d x0, __m128d x1, __m128d y0, __m128d y1) +{ + register __m128d m1 = _mm_mul_pd(x0, y0); + register __m128d m2 = _mm_mul_pd(x1, y1); + return _mm_add_pd(_mm_add_pd(vec_splatd(m1, 0), vec_splatd(m1, 1)), vec_splatd(m2, 0)); +} + +static inline double dot_prod3(const sse_meta_d4& x, const sse_meta_d4& y) +{ + double d; + _mm_storel_pd(&d, dot_prod3(x.v[0], x.v[1], y.v[0], y.v[1])); + return d; +} + +static inline __m128 dot_prod4(__m128 x, __m128 y) +{ +#if defined (__SSE4__) + return _mm_dp_ps(x, y, 0x71); +#elif defined (__SSE3__) + register __m128 t = _mm_mul_ps(x, y); + t = _mm_hadd_ps(t, t); + return _mm_hadd_ps(t, t); +#else + register __m128 s = _mm_mul_ps(x, y); + register __m128 r = _mm_add_ss(s, _mm_movehl_ps(s, s)); + return _mm_add_ss(r, _mm_shuffle_ps(r, r, 1)); +#endif +} + + +static inline float dot_prod4(const sse_meta_f4& x, const sse_meta_f4& y) +{ + return _mm_cvtss_f32(dot_prod4(x.v, y.v)); +} + +static inline __m128d dot_prod4(__m128d x0, __m128d x1, __m128d y0, __m128d y1) +{ +#if defined (__SSE4__) + register __m128d t1 = _mm_dp_pd(x0, y0, 0x31); + register __m128d t2 = _mm_dp_pd(x1, y1, 0x11); + return _mm_add_pd(t1, t2); +#elif defined (__SSE3__) + register __m128d t1 = _mm_mul_pd(x0, y0); + register __m128d t2 = _mm_mul_pd(x1, y1); + t1 = _mm_hadd_pd(t1, t1); + t2 = _mm_hadd_pd(t2, t2); + return _mm_add_pd(t1, t2); +#else + register __m128d t1 = _mm_mul_pd(x0, y0); + register __m128d t2 = _mm_mul_pd(x1, y1); + t1 = _mm_add_pd(t1, t2); + return _mm_add_pd(t1, _mm_shuffle_pd(t1, t1, 1)); +#endif +} + +static inline double dot_prod4(const sse_meta_d4& x, const sse_meta_d4& y) +{ + double d; + _mm_storel_pd(&d, dot_prod4(x.v[0], x.v[1], y.v[0], y.v[1])); + return d; +} + +static inline sse_meta_f4 min(const sse_meta_f4& x, const sse_meta_f4& y) +{ + return sse_meta_f4(_mm_min_ps(x.v, y.v)); +} + +static inline sse_meta_d4 min(const sse_meta_d4& x, const sse_meta_d4& y) +{ + return sse_meta_d4(_mm_min_pd(x.v[0], y.v[0]), _mm_min_pd(x.v[1], y.v[1])); +} + +static inline sse_meta_f4 max(const sse_meta_f4& x, const sse_meta_f4& y) +{ + return sse_meta_f4(_mm_max_ps(x.v, y.v)); +} + +static inline sse_meta_d4 max(const sse_meta_d4& x, const sse_meta_d4& y) +{ + return sse_meta_d4(_mm_max_pd(x.v[0], y.v[0]), _mm_max_pd(x.v[1], y.v[1])); +} + +static inline sse_meta_f4 abs(const sse_meta_f4& x) +{ + static const union { int i[4]; __m128 m; } abs4mask __attribute__ ((aligned (16))) = {{0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff}}; + return sse_meta_f4(_mm_and_ps(x.v, abs4mask.m)); +} + +static inline sse_meta_d4 abs(const sse_meta_d4& x) +{ + static const union { FCL_INT64 i[2]; __m128d m; } abs2mask __attribute__ ((aligned (16))) = {{0x7fffffffffffffff, 0x7fffffffffffffff}}; + return sse_meta_d4(_mm_and_pd(x.v[0], abs2mask.m), _mm_and_pd(x.v[1], abs2mask.m)); +} + +static inline bool equal(const sse_meta_f4& x, const sse_meta_f4& y, float epsilon) +{ + register __m128 d = _mm_sub_ps(x.v, y.v); + register __m128 e = _mm_set1_ps(epsilon); + return ((_mm_movemask_ps(_mm_cmplt_ps(d, e)) & 0x7) == 0x7) && ((_mm_movemask_ps(_mm_cmpgt_ps(d, _mm_sub_ps(xmms_0, e))) & 0x7) == 0x7); +} + +static inline bool equal(const sse_meta_d4& x, const sse_meta_d4& y, double epsilon) +{ + register __m128d d = _mm_sub_pd(x.v[0], y.v[0]); + register __m128d e = _mm_set1_pd(epsilon); + + if(_mm_movemask_pd(_mm_cmplt_pd(d, e)) != 0x3) return false; + if(_mm_movemask_pd(_mm_cmpgt_pd(d, _mm_sub_pd(xmmd_0, e))) != 0x3) return false; + + d = _mm_sub_pd(x.v[1], y.v[1]); + if((_mm_movemask_pd(_mm_cmplt_pd(d, e)) & 0x1) != 0x1) return false; + if((_mm_movemask_pd(_mm_cmpgt_pd(d, _mm_sub_pd(xmmd_0, e))) & 0x1) != 0x1) return false; + return true; +} + +static inline sse_meta_f4 normalize3(const sse_meta_f4& x) +{ + register __m128 m = _mm_mul_ps(x.v, x.v); + __m128 r = _mm_add_ps(vec_splat(m, 0), _mm_add_ps(vec_splat(m, 1), vec_splat(m, 2))); + return sse_meta_f4(_mm_mul_ps(x.v, newtonraphson_rsqrt4(r))); +} + +static inline sse_meta_f4 normalize3_approx(const sse_meta_f4& x) +{ + register __m128 m = _mm_mul_ps(x.v, x.v); + __m128 r = _mm_add_ps(vec_splat(m, 0), _mm_add_ps(vec_splat(m, 1), vec_splat(m, 2))); + return sse_meta_f4(_mm_mul_ps(x.v, _mm_rsqrt_ps(r))); +} + + +static inline void transpose(__m128 c0, __m128 c1, __m128 c2, __m128* r0, __m128* r1, __m128* r2) +{ + static const union { unsigned int i[4]; __m128 m; } selectmask __attribute__ ((aligned(16))) = {{0, 0xffffffff, 0, 0}}; + register __m128 t0, t1; + t0 = _mm_unpacklo_ps(c0, c2); + t1 = _mm_unpackhi_ps(c0, c2); + *r0 = _mm_unpacklo_ps(t0, c1); + *r1 = _mm_shuffle_ps(t0, t0, _MM_SHUFFLE(0, 3, 2, 2)); + *r1 = vec_sel(*r1, c1, selectmask.i); + *r2 = _mm_shuffle_ps(t1, t1, _MM_SHUFFLE(0, 1, 1, 0)); + *r2 = vec_sel(*r2, vec_splat(c1, 2), selectmask.i); +} + + +static inline void inverse(__m128 c0, __m128 c1, __m128 c2, __m128* i0, __m128* i1, __m128* i2) +{ + __m128 t0, t1, t2, d, invd; + t2 = cross_prod(c0, c1); + t0 = cross_prod(c1, c2); + t1 = cross_prod(c2, c0); + d = dot_prod3(t2, c2); + d = vec_splat(d, 0); + invd = _mm_rcp_ps(d); // approximate inverse + transpose(t0, t1, t2, i0, i1, i2); + *i0 = _mm_mul_ps(*i0, invd); + *i1 = _mm_mul_ps(*i1, invd); + *i2 = _mm_mul_ps(*i2, invd); +} + + +struct sse_meta_f12 +{ + typedef float meta_type; + typedef sse_meta_f4 vector_type; + sse_meta_f4 c[3]; + + sse_meta_f12() { setZero(); } + + sse_meta_f12(float xx, float xy, float xz, + float yx, float yy, float yz, + float zx, float zy, float zz) + { setValue(xx, xy, xz, yx, yy, yz, zx, zy, zz); } + + sse_meta_f12(const sse_meta_f4& x, const sse_meta_f4& y, const sse_meta_f4& z) + { setColumn(x, y, z); } + + sse_meta_f12(__m128 x, __m128 y, __m128 z) + { setColumn(x, y, z); } + + inline void setValue(float xx, float xy, float xz, + float yx, float yy, float yz, + float zx, float zy, float zz) + { + c[0].setValue(xx, yx, zx, 0); + c[1].setValue(xy, yy, zy, 0); + c[2].setValue(xz, yz, zz, 0); + } + + inline void setIdentity() + { + c[0].setValue(1, 0, 0, 0); + c[1].setValue(0, 1, 0, 0); + c[2].setValue(0, 0, 1, 0); + } + + inline void setZero() + { + c[0].setValue(0); + c[1].setValue(0); + c[2].setValue(0); + } + + inline void setColumn(const sse_meta_f4& x, const sse_meta_f4& y, const sse_meta_f4& z) + { + c[0] = x; c[1] = y; c[2] = z; + } + + inline void setColumn(__m128 x, __m128 y, __m128 z) + { + c[0].setValue(x); c[1].setValue(y); c[2].setValue(z); + } + + inline const sse_meta_f4& getColumn(size_t i) const + { + return c[i]; + } + + inline sse_meta_f4& getColumn(size_t i) + { + return c[i]; + } + + inline sse_meta_f4 getRow(size_t i) const + { + return sse_meta_f4(c[0][i], c[1][i], c[2][i], 0); + } + + inline float operator () (size_t i, size_t j) const + { + return c[j][i]; + } + + inline float& operator () (size_t i, size_t j) + { + return c[j][i]; + } + + inline sse_meta_f4 operator * (const sse_meta_f4& v) const + { + return sse_meta_f4(_mm_add_ps(_mm_add_ps(_mm_mul_ps(c[0].v, vec_splat(v.v, 0)), _mm_mul_ps(c[1].v, vec_splat(v.v, 1))), _mm_mul_ps(c[2].v, vec_splat(v.v, 2)))); + } + + inline sse_meta_f12 operator * (const sse_meta_f12& mat) const + { + return sse_meta_f12((*this) * mat.c[0], (*this) * mat.c[1], (*this) * mat.c[2]); + } + + inline sse_meta_f12 operator + (const sse_meta_f12& mat) const + { + return sse_meta_f12(c[0] + mat.c[0], c[1] + mat.c[1], c[2] + mat.c[2]); + } + + inline sse_meta_f12 operator - (const sse_meta_f12& mat) const + { + return sse_meta_f12(c[0] - mat.c[0], c[1] - mat.c[1], c[2] - mat.c[2]); + } + + inline sse_meta_f12 operator + (float t_) const + { + sse_meta_f4 t(t_); + return sse_meta_f12(c[0] + t, c[1] + t, c[2] + t); + } + + inline sse_meta_f12 operator - (float t_) const + { + sse_meta_f4 t(t_); + return sse_meta_f12(c[0] - t, c[1] - t, c[2] - t); + } + + inline sse_meta_f12 operator * (float t_) const + { + sse_meta_f4 t(t_); + return sse_meta_f12(c[0] * t, c[1] * t, c[2] * t); + } + + inline sse_meta_f12 operator / (float t_) const + { + sse_meta_f4 t(t_); + return sse_meta_f12(c[0] / t, c[1] / t, c[2] / t); + } + + inline sse_meta_f12& operator *= (const sse_meta_f12& mat) + { + setColumn((*this) * mat.c[0], (*this) * mat.c[1], (*this) * mat.c[2]); + return *this; + } + + inline sse_meta_f12& operator += (const sse_meta_f12& mat) + { + c[0] += mat.c[0]; + c[1] += mat.c[1]; + c[2] += mat.c[2]; + return *this; + } + + inline sse_meta_f12& operator -= (const sse_meta_f12& mat) + { + c[0] -= mat.c[0]; + c[1] -= mat.c[1]; + c[2] -= mat.c[2]; + return *this; + } + + inline sse_meta_f12& operator += (float t_) + { + sse_meta_f4 t(t_); + c[0] += t; + c[1] += t; + c[2] += t; + return *this; + } + + inline sse_meta_f12& operator -= (float t_) + { + sse_meta_f4 t(t_); + c[0] -= t; + c[1] -= t; + c[2] -= t; + return *this; + } + + inline sse_meta_f12& operator *= (float t_) + { + sse_meta_f4 t(t_); + c[0] *= t; + c[1] *= t; + c[2] *= t; + return *this; + } + + inline sse_meta_f12& operator /= (float t_) + { + sse_meta_f4 t(t_); + c[0] /= t; + c[1] /= t; + c[2] /= t; + return *this; + } + + inline sse_meta_f12& inverse() + { + __m128 inv0, inv1, inv2; + detail::inverse(c[0].v, c[1].v, c[2].v, &inv0, &inv1, &inv2); + setColumn(inv0, inv1, inv2); + return *this; + } + + inline sse_meta_f12& transpose() + { + __m128 r0, r1, r2; + detail::transpose(c[0].v, c[1].v, c[2].v, &r0, &r1, &r2); + setColumn(r0, r1, r2); + return *this; + } + + inline sse_meta_f12& abs() + { + c[0] = detail::abs(c[0]); + c[1] = detail::abs(c[1]); + c[2] = detail::abs(c[2]); + return *this; + } + + inline float determinant() const + { + return _mm_cvtss_f32(dot_prod3(c[2].v, cross_prod(c[0].v, c[1].v))); + } + + inline sse_meta_f12 transposeTimes(const sse_meta_f12& other) const + { + return sse_meta_f12(dot_prod3(c[0], other.c[0]), dot_prod3(c[0], other.c[1]), dot_prod3(c[0], other.c[2]), + dot_prod3(c[1], other.c[0]), dot_prod3(c[1], other.c[1]), dot_prod3(c[1], other.c[2]), + dot_prod3(c[2], other.c[0]), dot_prod3(c[2], other.c[1]), dot_prod3(c[2], other.c[2])); + } + + inline sse_meta_f12 timesTranspose(const sse_meta_f12& m) const + { + sse_meta_f12 tmp(m); + return (*this) * tmp.transpose(); + } + + inline sse_meta_f4 transposeTimes(const sse_meta_f4& v) const + { + return sse_meta_f4(dot_prod3(c[0], v), dot_prod3(c[1], v), dot_prod3(c[2], v)); + } + + inline float transposeDot(size_t i, const sse_meta_f4& v) const + { + return dot_prod3(c[i], v); + } + + inline float dot(size_t i, const sse_meta_f4& v) const + { + return v[0] * c[0][i] + v[1] * c[1][i] + v[2] * c[2][i]; + } + +}; + +static inline sse_meta_f12 abs(const sse_meta_f12& mat) +{ + return sse_meta_f12(abs(mat.getColumn(0)), abs(mat.getColumn(1)), abs(mat.getColumn(2))); +} + +static inline sse_meta_f12 transpose(const sse_meta_f12& mat) +{ + __m128 r0, r1, r2; + transpose(mat.getColumn(0).v, mat.getColumn(1).v, mat.getColumn(2).v, &r0, &r1, &r2); + return sse_meta_f12(r0, r1, r2); +} + + +static inline sse_meta_f12 inverse(const sse_meta_f12& mat) +{ + __m128 inv0, inv1, inv2; + inverse(mat.getColumn(0).v, mat.getColumn(1).v, mat.getColumn(2).v, &inv0, &inv1, &inv2); + return sse_meta_f12(inv0, inv1, inv2); +} + + +static inline void transpose(__m128 c0, __m128 c1, __m128 c2, __m128 c3, + __m128* r0, __m128* r1, __m128* r2, __m128* r3) +{ + __m128 tmp0 = _mm_unpacklo_ps(c0, c2); + __m128 tmp1 = _mm_unpacklo_ps(c1, c3); + __m128 tmp2 = _mm_unpackhi_ps(c0, c2); + __m128 tmp3 = _mm_unpackhi_ps(c1, c3); + *r0 = _mm_unpacklo_ps(tmp0, tmp1); + *r1 = _mm_unpackhi_ps(tmp0, tmp1); + *r2 = _mm_unpacklo_ps(tmp2, tmp3); + *r3 = _mm_unpackhi_ps(tmp2, tmp3); +} + + +static inline void inverse(__m128 c0, __m128 c1, __m128 c2, __m128 c3, + __m128* res0, __m128* res1, __m128* res2, __m128* res3) +{ + __m128 Va, Vb, Vc; + __m128 r1, r2, r3, tt, tt2; + __m128 sum, Det, RDet; + __m128 trns0, trns1, trns2, trns3; + + // Calculating the minterms for the first line. + + tt = c3; tt2 = _mm_ror_ps(c2,1); + Vc = _mm_mul_ps(tt2,_mm_ror_ps(tt,0)); // V3'\B7V4 + Va = _mm_mul_ps(tt2,_mm_ror_ps(tt,2)); // V3'\B7V4" + Vb = _mm_mul_ps(tt2,_mm_ror_ps(tt,3)); // V3'\B7V4^ + + r1 = _mm_sub_ps(_mm_ror_ps(Va,1),_mm_ror_ps(Vc,2)); // V3"\B7V4^ - V3^\B7V4" + r2 = _mm_sub_ps(_mm_ror_ps(Vb,2),_mm_ror_ps(Vb,0)); // V3^\B7V4' - V3'\B7V4^ + r3 = _mm_sub_ps(_mm_ror_ps(Va,0),_mm_ror_ps(Vc,1)); // V3'\B7V4" - V3"\B7V4' + + tt = c1; + Va = _mm_ror_ps(tt,1); sum = _mm_mul_ps(Va,r1); + Vb = _mm_ror_ps(tt,2); sum = _mm_add_ps(sum,_mm_mul_ps(Vb,r2)); + Vc = _mm_ror_ps(tt,3); sum = _mm_add_ps(sum,_mm_mul_ps(Vc,r3)); + + // Calculating the determinant. + Det = _mm_mul_ps(sum,c0); + Det = _mm_add_ps(Det,_mm_movehl_ps(Det,Det)); + + static const union { int i[4]; __m128 m; } Sign_PNPN __attribute__ ((aligned(16))) = {{0x00000000, 0x80000000, 0x00000000, 0x80000000}}; + static const union { int i[4]; __m128 m; } Sign_NPNP __attribute__ ((aligned(16))) = {{0x80000000, 0x00000000, 0x80000000, 0x00000000}}; + static const union { float i[4]; __m128 m; } ZERONE __attribute__ ((aligned(16))) = {{1.0f, 0.0f, 0.0f, 1.0f}}; + + __m128 mtL1 = _mm_xor_ps(sum,Sign_PNPN.m); + + // Calculating the minterms of the second line (using previous results). + tt = _mm_ror_ps(c0,1); sum = _mm_mul_ps(tt,r1); + tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r2)); + tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r3)); + __m128 mtL2 = _mm_xor_ps(sum,Sign_NPNP.m); + + // Testing the determinant. + Det = _mm_sub_ss(Det,_mm_shuffle_ps(Det,Det,1)); + + // Calculating the minterms of the third line. + tt = _mm_ror_ps(c0,1); + Va = _mm_mul_ps(tt,Vb); // V1'\B7V2" + Vb = _mm_mul_ps(tt,Vc); // V1'\B7V2^ + Vc = _mm_mul_ps(tt,c1); // V1'\B7V2 + + r1 = _mm_sub_ps(_mm_ror_ps(Va,1),_mm_ror_ps(Vc,2)); // V1"\B7V2^ - V1^\B7V2" + r2 = _mm_sub_ps(_mm_ror_ps(Vb,2),_mm_ror_ps(Vb,0)); // V1^\B7V2' - V1'\B7V2^ + r3 = _mm_sub_ps(_mm_ror_ps(Va,0),_mm_ror_ps(Vc,1)); // V1'\B7V2" - V1"\B7V2' + + tt = _mm_ror_ps(c3,1); sum = _mm_mul_ps(tt,r1); + tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r2)); + tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r3)); + __m128 mtL3 = _mm_xor_ps(sum,Sign_PNPN.m); + + // Dividing is FASTER than rcp_nr! (Because rcp_nr causes many register-memory RWs). + RDet = _mm_div_ss(ZERONE.m, Det); // TODO: just 1.0f? + RDet = _mm_shuffle_ps(RDet,RDet,0x00); + + // Devide the first 12 minterms with the determinant. + mtL1 = _mm_mul_ps(mtL1, RDet); + mtL2 = _mm_mul_ps(mtL2, RDet); + mtL3 = _mm_mul_ps(mtL3, RDet); + + // Calculate the minterms of the forth line and devide by the determinant. + tt = _mm_ror_ps(c2,1); sum = _mm_mul_ps(tt,r1); + tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r2)); + tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r3)); + __m128 mtL4 = _mm_xor_ps(sum,Sign_NPNP.m); + mtL4 = _mm_mul_ps(mtL4, RDet); + + // Now we just have to transpose the minterms matrix. + trns0 = _mm_unpacklo_ps(mtL1,mtL2); + trns1 = _mm_unpacklo_ps(mtL3,mtL4); + trns2 = _mm_unpackhi_ps(mtL1,mtL2); + trns3 = _mm_unpackhi_ps(mtL3,mtL4); + *res0 = _mm_movelh_ps(trns0,trns1); + *res1 = _mm_movehl_ps(trns1,trns0); + *res2 = _mm_movelh_ps(trns2,trns3); + *res3 = _mm_movehl_ps(trns3,trns2); +} + + +struct sse_meta_f16 +{ + typedef float meta_type; + typedef sse_meta_f4 vector_type; + sse_meta_f4 c[4]; + + sse_meta_f16() { setZero(); } + + sse_meta_f16(float xx, float xy, float xz, float xw, + float yx, float yy, float yz, float yw, + float zx, float zy, float zz, float zw, + float wx, float wy, float wz, float ww) + { setValue(xx, xy, xz, xw, yz, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww); } + + sse_meta_f16(const sse_meta_f4& x, const sse_meta_f4& y, const sse_meta_f4& z, const sse_meta_f4& w) + { setColumn(x, y, z, w); } + + sse_meta_f16(__m128 x, __m128 y, __m128 z, __m128 w) + { setColumn(x, y, z, w); } + + inline void setValue(float xx, float xy, float xz, float xw, + float yx, float yy, float yz, float yw, + float zx, float zy, float zz, float zw, + float wx, float wy, float wz, float ww) + { + c[0].setValue(xx, yx, zx, wx); + c[1].setValue(xy, yy, zy, wy); + c[2].setValue(xz, yz, zz, wz); + c[3].setValue(xw, yw, zw, ww); + } + + inline void setColumn(const sse_meta_f4& x, const sse_meta_f4& y, const sse_meta_f4& z, const sse_meta_f4& w) + { + c[0] = x; c[1] = y; c[2] = z; c[3] = w; + } + + inline void setColumn(__m128 x, __m128 y, __m128 z, __m128 w) + { + c[0].setValue(x); c[1].setValue(y); c[2].setValue(z); c[3].setValue(w); + } + + inline void setIdentity() + { + c[0].setValue(1, 0, 0, 0); + c[1].setValue(0, 1, 0, 0); + c[2].setValue(0, 0, 1, 0); + c[3].setValue(0, 0, 0, 1); + } + + inline void setZero() + { + c[0].setValue(0); + c[1].setValue(0); + c[2].setValue(0); + c[3].setValue(0); + } + + inline const sse_meta_f4& getColumn(size_t i) const + { + return c[i]; + } + + inline sse_meta_f4& getColumn(size_t i) + { + return c[i]; + } + + inline sse_meta_f4 getRow(size_t i) const + { + return sse_meta_f4(c[0][i], c[1][i], c[2][i], c[3][i]); + } + + inline float operator () (size_t i, size_t j) const + { + return c[j][i]; + } + + inline float& operator () (size_t i, size_t j) + { + return c[j][i]; + } + + inline sse_meta_f4 operator * (const sse_meta_f4& v) const + { + return sse_meta_f4(_mm_add_ps(_mm_add_ps(_mm_mul_ps(c[0].v, vec_splat(v.v, 0)), _mm_mul_ps(c[1].v, vec_splat(v.v, 1))), + _mm_add_ps(_mm_mul_ps(c[2].v, vec_splat(v.v, 2)), _mm_mul_ps(c[3].v, vec_splat(v.v, 3))) + )); + } + + inline sse_meta_f16 operator * (const sse_meta_f16& mat) const + { + return sse_meta_f16((*this) * mat.c[0], (*this) * mat.c[1], (*this) * mat.c[2], (*this) * mat.c[3]); + } + + + inline sse_meta_f16 operator + (const sse_meta_f16& mat) const + { + return sse_meta_f16(c[0] + mat.c[0], c[1] + mat.c[1], c[2] + mat.c[2], c[3] + mat.c[3]); + } + + inline sse_meta_f16 operator - (const sse_meta_f16& mat) const + { + return sse_meta_f16(c[0] - mat.c[0], c[1] - mat.c[1], c[2] - mat.c[2], c[3] - mat.c[3]); + } + + inline sse_meta_f16 operator + (float t_) const + { + sse_meta_f4 t(t_); + return sse_meta_f16(c[0] + t, c[1] + t, c[2] + t, c[3] + t); + } + + inline sse_meta_f16 operator - (float t_) const + { + sse_meta_f4 t(t_); + return sse_meta_f16(c[0] - t, c[1] - t, c[2] - t, c[3] - t); + } + + inline sse_meta_f16 operator * (float t_) const + { + sse_meta_f4 t(t_); + return sse_meta_f16(c[0] * t, c[1] * t, c[2] * t, c[3] * t); + } + + inline sse_meta_f16 operator / (float t_) const + { + sse_meta_f4 t(t_); + return sse_meta_f16(c[0] / t, c[1] / t, c[2] / t, c[3] / t); + } + + inline sse_meta_f16& operator *= (const sse_meta_f16& mat) + { + setColumn((*this) * mat.c[0], (*this) * mat.c[1], (*this) * mat.c[2], (*this) * mat.c[3]); + return *this; + } + + inline sse_meta_f16& operator += (const sse_meta_f16& mat) + { + c[0] += mat.c[0]; + c[1] += mat.c[1]; + c[2] += mat.c[2]; + c[3] += mat.c[3]; + return *this; + } + + inline sse_meta_f16& operator -= (const sse_meta_f16& mat) + { + c[0] -= mat.c[0]; + c[1] -= mat.c[1]; + c[2] -= mat.c[2]; + c[3] -= mat.c[3]; + return *this; + } + + inline sse_meta_f16& operator += (float t_) + { + sse_meta_f4 t(t_); + c[0] += t; + c[1] += t; + c[2] += t; + c[3] += t; + return *this; + } + + inline sse_meta_f16& operator -= (float t_) + { + sse_meta_f4 t(t_); + c[0] -= t; + c[1] -= t; + c[2] -= t; + c[3] -= t; + return *this; + } + + inline sse_meta_f16& operator *= (float t_) + { + sse_meta_f4 t(t_); + c[0] *= t; + c[1] *= t; + c[2] *= t; + c[3] *= t; + return *this; + } + + inline sse_meta_f16& operator /= (float t_) + { + sse_meta_f4 t(t_); + c[0] /= t; + c[1] /= t; + c[2] /= t; + c[3] /= t; + return *this; + } + + inline sse_meta_f16& abs() + { + c[0] = detail::abs(c[0]); + c[1] = detail::abs(c[1]); + c[2] = detail::abs(c[2]); + c[3] = detail::abs(c[3]); + return *this; + } + + inline sse_meta_f16& inverse() + { + __m128 r0, r1, r2, r3; + detail::inverse(c[0].v, c[1].v, c[2].v, c[3].v, &r0, &r1, &r2, &r3); + setColumn(r0, r1, r2, r3); + return *this; + } + + inline sse_meta_f16& transpose() + { + __m128 r0, r1, r2, r3; + detail::transpose(c[0].v, c[1].v, c[2].v, c[3].v, &r0, &r1, &r2, &r3); + setColumn(r0, r1, r2, r3); + return *this; + } + + inline float determinant() const + { + __m128 Va, Vb, Vc; + __m128 r1, r2, r3, tt, tt2; + __m128 sum, Det; + + __m128 _L1 = c[0].v; + __m128 _L2 = c[1].v; + __m128 _L3 = c[2].v; + __m128 _L4 = c[3].v; + // Calculating the minterms for the first line. + + // _mm_ror_ps is just a macro using _mm_shuffle_ps(). + tt = _L4; tt2 = _mm_ror_ps(_L3,1); + Vc = _mm_mul_ps(tt2,_mm_ror_ps(tt,0)); // V3'·V4 + Va = _mm_mul_ps(tt2,_mm_ror_ps(tt,2)); // V3'·V4" + Vb = _mm_mul_ps(tt2,_mm_ror_ps(tt,3)); // V3'·V4^ + + r1 = _mm_sub_ps(_mm_ror_ps(Va,1),_mm_ror_ps(Vc,2)); // V3"·V4^ - V3^·V4" + r2 = _mm_sub_ps(_mm_ror_ps(Vb,2),_mm_ror_ps(Vb,0)); // V3^·V4' - V3'·V4^ + r3 = _mm_sub_ps(_mm_ror_ps(Va,0),_mm_ror_ps(Vc,1)); // V3'·V4" - V3"·V4' + + tt = _L2; + Va = _mm_ror_ps(tt,1); sum = _mm_mul_ps(Va,r1); + Vb = _mm_ror_ps(tt,2); sum = _mm_add_ps(sum,_mm_mul_ps(Vb,r2)); + Vc = _mm_ror_ps(tt,3); sum = _mm_add_ps(sum,_mm_mul_ps(Vc,r3)); + + // Calculating the determinant. + Det = _mm_mul_ps(sum,_L1); + Det = _mm_add_ps(Det,_mm_movehl_ps(Det,Det)); + + // Calculating the minterms of the second line (using previous results). + tt = _mm_ror_ps(_L1,1); sum = _mm_mul_ps(tt,r1); + tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r2)); + tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r3)); + + // Testing the determinant. + Det = _mm_sub_ss(Det,_mm_shuffle_ps(Det,Det,1)); + return _mm_cvtss_f32(Det); + } + + inline sse_meta_f16 transposeTimes(const sse_meta_f16& other) const + { + return sse_meta_f16(dot_prod4(c[0], other.c[0]), dot_prod4(c[0], other.c[1]), dot_prod4(c[0], other.c[2]), dot_prod4(c[0], other.c[3]), + dot_prod4(c[1], other.c[0]), dot_prod4(c[1], other.c[1]), dot_prod4(c[1], other.c[2]), dot_prod4(c[1], other.c[3]), + dot_prod4(c[2], other.c[0]), dot_prod4(c[2], other.c[1]), dot_prod4(c[2], other.c[2]), dot_prod4(c[2], other.c[3]), + dot_prod4(c[3], other.c[0]), dot_prod4(c[3], other.c[1]), dot_prod4(c[3], other.c[2]), dot_prod4(c[3], other.c[3])); + } + + inline sse_meta_f16 timesTranspose(const sse_meta_f16& m) const + { + sse_meta_f16 tmp(m); + return (*this) * tmp.transpose(); + } + + inline sse_meta_f4 transposeTimes(const sse_meta_f4& v) const + { + return sse_meta_f4(dot_prod4(c[0], v), dot_prod4(c[1], v), dot_prod4(c[2], v), dot_prod4(c[3], v)); + } + + inline float transposeDot(size_t i, const sse_meta_f4& v) const + { + return dot_prod4(c[i], v); + } + + inline float dot(size_t i, const sse_meta_f4& v) const + { + return v[0] * c[0][i] + v[1] * c[1][i] + v[2] * c[2][i] + v[3] * c[3][i]; + } + +}; + +static inline sse_meta_f16 abs(const sse_meta_f16& mat) +{ + return sse_meta_f16(abs(mat.getColumn(0)), abs(mat.getColumn(1)), abs(mat.getColumn(2)), abs(mat.getColumn(3))); +} + +static inline sse_meta_f16 transpose(const sse_meta_f16& mat) +{ + __m128 r0, r1, r2, r3; + transpose(mat.getColumn(0).v, mat.getColumn(1).v, mat.getColumn(2).v, mat.getColumn(3).v, &r0, &r1, &r2, &r3); + return sse_meta_f16(r0, r1, r2, r3); +} + + +static inline sse_meta_f16 inverse(const sse_meta_f16& mat) +{ + __m128 r0, r1, r2, r3; + inverse(mat.getColumn(0).v, mat.getColumn(1).v, mat.getColumn(2).v, mat.getColumn(3).v, &r0, &r1, &r2, &r3); + return sse_meta_f16(r0, r1, r2, r3); +} + + + + +} // detail +} // fcl + + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.deprecated/simd/simd_intersect.h b/rmf_traffic/thirdparty/fcl/.deprecated/simd/simd_intersect.h new file mode 100644 index 00000000..f44b69de --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.deprecated/simd/simd_intersect.h @@ -0,0 +1,241 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011-2014, Willow Garage, Inc. + * Copyright (c) 2014-2016, Open Source Robotics Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Open Source Robotics Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** \author Jia Pan */ + +#ifndef FCL_MULTIPLE_INTERSECT +#define FCL_MULTIPLE_INTERSECT + +#include +#include + + +namespace fcl +{ + + +static inline __m128 sse_four_spheres_intersect(const Vector3d& o1, FCL_REAL r1, + const Vector3d& o2, FCL_REAL r2, + const Vector3d& o3, FCL_REAL r3, + const Vector3d& o4, FCL_REAL r4, + const Vector3d& o5, FCL_REAL r5, + const Vector3d& o6, FCL_REAL r6, + const Vector3d& o7, FCL_REAL r7, + const Vector3d& o8, FCL_REAL r8) +{ + __m128 PX, PY, PZ, PR, QX, QY, QZ, QR; + PX = _mm_set_ps(o1[0], o2[0], o3[0], o4[0]); + PY = _mm_set_ps(o1[1], o2[1], o3[1], o4[1]); + PZ = _mm_set_ps(o1[2], o2[2], o3[2], o4[2]); + PR = _mm_set_ps(r1, r2, r3, r4); + QX = _mm_set_ps(o5[0], o6[0], o7[0], o8[0]); + QY = _mm_set_ps(o5[1], o6[1], o7[1], o8[1]); + QZ = _mm_set_ps(o5[2], o6[2], o7[2], o8[2]); + QR = _mm_set_ps(r5, r6, r7, r8); + + __m128 T1 = _mm_sub_ps(PX, QX); + __m128 T2 = _mm_sub_ps(PY, QY); + __m128 T3 = _mm_sub_ps(PZ, QZ); + __m128 T4 = _mm_add_ps(PR, QR); + T1 = _mm_mul_ps(T1, T1); + T2 = _mm_mul_ps(T2, T2); + T3 = _mm_mul_ps(T3, T3); + T4 = _mm_mul_ps(T4, T4); + T1 = _mm_add_ps(T1, T2); + T2 = _mm_sub_ps(R2, T3); + return _mm_cmple_ps(T1, T2); +} + + +static inline __m128 sse_four_spheres_four_AABBs_intersect(const Vector3d& o1, FCL_REAL r1, + const Vector3d& o2, FCL_REAL r2, + const Vector3d& o3, FCL_REAL r3, + const Vector3d& o4, FCL_REAL r4, + const Vector3d& min1, const Vector3d& max1, + const Vector3d& min2, const Vector3d& max2, + const Vector3d& min3, const Vector3d& max3, + const Vector3d& min4, const Vector3d& max4) +{ + __m128 MINX, MINY, MINZ, MAXX, MAXX, MAXY, MAXZ, SX, SY, SZ, SR; + MINX = _mm_set_ps(min1[0], min2[0], min3[0], min4[0]); + MAXX = _mm_set_ps(max1[0], max2[0], max3[0], max4[0]); + MINY = _mm_set_ps(min1[1], min2[1], min3[1], min4[1]); + MAXY = _mm_set_ps(max1[1], max2[1], max3[1], max4[1]); + MINZ = _mm_set_ps(min1[2], min2[2], min3[2], min4[2]); + MAXZ = _mm_set_ps(max1[2], max2[2], max3[2], max4[2]); + SX = _mm_set_ps(o1[0], o2[0], o3[0], o4[0]); + SY = _mm_set_ps(o1[1], o2[1], o3[1], o4[1]); + SZ = _mm_set_ps(o1[2], o2[2], o3[2], o4[2]); + SR = _mm_set_ps(r1, r2, r3, r4); + + + __m128 TX = _mm_max_ps(SX, MINX); + __m128 TY = _mm_max_ps(SY, MINY); + __m128 TZ = _mm_max_ps(SZ, MINZ); + TX = _mm_min_ps(TX, MAXX); + TY = _mm_min_ps(TY, MAXY); + TZ = _mm_min_ps(TZ, MAXZ); + __m128 DX = _mm_sub_ps(SX, TX); + __m128 DY = _mm_sub_ps(SY, TY); + __m128 DZ = _mm_sub_ps(SZ, TZ); + __m128 R2 = _mm_mul_ps(SR, SR); + DX = _mm_mul_ps(DX, DX); + DY = _mm_mul_ps(DY, DY); + DZ = _mm_mul_ps(DZ, DZ); + __m128 T1 = _mm_add_ps(DX, DY); + __m128 T2 = _mm_sub_ps(R2, DZ); + return _mm_cmple_ps(T1, T2); +} + + +static inline __m128 sse_four_AABBs_intersect(const Vector3d& min1, const Vector3d& max1, + const Vector3d& min2, const Vector3d& max2, + const Vector3d& min3, const Vector3d& max3, + const Vector3d& min4, const Vector3d& max4, + const Vector3d& min5, const Vector3d& max5, + const Vector3d& min6, const Vector3d& max6, + const Vector3d& min7, const Vector3d& max7, + const Vector3d& min8, const Vector3d& max8) +{ + __m128 MIN1X, MIN1Y, MIN1Z, MAX1X, MAX1Y, MAX1Z, MIN2X, MIN2Y, MIN2Z, MAX2X, MAX2Y, MAX2Z; + MIN1X = _mm_set_ps(min1[0], min2[0], min3[0], min4[0]); + MAX1X = _mm_set_ps(max1[0], max2[0], max3[0], max4[0]); + MIN1Y = _mm_set_ps(min1[1], min2[1], min3[1], min4[1]); + MAX1Y = _mm_set_ps(max1[1], max2[1], max3[1], max4[1]); + MIN1Z = _mm_set_ps(min1[2], min2[2], min3[2], min4[2]); + MAX1Z = _mm_set_ps(max1[2], max2[2], max3[2], max4[2]); + MIN2X = _mm_set_ps(min5[0], min6[0], min7[0], min8[0]); + MAX2X = _mm_set_ps(max5[0], max6[0], max7[0], max8[0]); + MIN2Y = _mm_set_ps(min5[1], min6[1], min7[1], min8[1]); + MAX2Y = _mm_set_ps(max5[1], max6[1], max7[1], max8[1]); + MIN2Z = _mm_set_ps(min5[2], min6[2], min7[2], min8[2]); + MAX2Z = _mm_set_ps(max5[2], max6[2], max7[2], max8[2]); + + __m128 AX = _mm_max_ps(MIN1X, MIN2X); + __m128 BX = _mm_min_ps(MAX1X, MAX2X); + __m128 AY = _mm_max_ps(MIN1Y, MIN2Y); + __m128 BY = _mm_min_ps(MAX1Y, MAX2Y); + __m128 AZ = _mm_max_ps(MIN1Z, MIN2Z); + __m128 BZ = _mm_min_ps(MAX1Z, MAX2Z); + __m128 T1 = _mm_cmple_ps(AX, BX); + __m128 T2 = _mm_cmple_ps(AY, BY); + __m128 T3 = _mm_cmple_ps(AZ, BZ); + __m128 T4 = _mm_and_ps(T1, T2); + return _mm_and_ps(T3, T4); +} + +static bool four_spheres_intersect_and(const Vector3d& o1, FCL_REAL r1, + const Vector3d& o2, FCL_REAL r2, + const Vector3d& o3, FCL_REAL r3, + const Vector3d& o4, FCL_REAL r4, + const Vector3d& o5, FCL_REAL r5, + const Vector3d& o6, FCL_REAL r6, + const Vector3d& o7, FCL_REAL r7, + const Vector3d& o8, FCL_REAL r8) +{ + __m128 CMP = four_spheres_intersect(o1, r1, o2, r2, o3, r3, o4, r4, o5, r5, o6, r6, o7, r7, o8, r8); + return _mm_movemask_ps(CMP) == 15.f; +} + +static bool four_spheres_intersect_or(const Vector3d& o1, FCL_REAL r1, + const Vector3d& o2, FCL_REAL r2, + const Vector3d& o3, FCL_REAL r3, + const Vector3d& o4, FCL_REAL r4, + const Vector3d& o5, FCL_REAL r5, + const Vector3d& o6, FCL_REAL r6, + const Vector3d& o7, FCL_REAL r7, + const Vector3d& o8, FCL_REAL r8) +{ + __m128 CMP = four_spheres_intersect(o1, r1, o2, r2, o3, r3, o4, r4, o5, r5, o6, r6, o7, r7, o8, r8); + return __mm_movemask_ps(CMP) > 0; +} + +/** @brief four spheres versus four AABBs SIMD test */ +static bool four_spheres_four_AABBs_intersect_and(const Vector3d& o1, FCL_REAL r1, + const Vector3d& o2, FCL_REAL r2, + const Vector3d& o3, FCL_REAL r3, + const Vector3d& o4, FCL_REAL r4, + const Vector3d& min1, const Vector3d& max1, + const Vector3d& min2, const Vector3d& max2, + const Vector3d& min3, const Vector3d& max3, + const Vector3d& min4, const Vector3d& max4) +{ + __m128 CMP = four_spheres_four_AABBs_intersect(o1, r1, o2, r2, o3, r3, o4, r4, min1, max1, min2, max2, min3, max3, min4, max4); + return _mm_movemask_ps(CMP) == 15.f; +} + +static bool four_spheres_four_AABBs_intersect_or(const Vector3d& o1, FCL_REAL r1, + const Vector3d& o2, FCL_REAL r2, + const Vector3d& o3, FCL_REAL r3, + const Vector3d& o4, FCL_REAL r4, + const Vector3d& min1, const Vector3d& max1, + const Vector3d& min2, const Vector3d& max2, + const Vector3d& min3, const Vector3d& max3, + const Vector3d& min4, const Vector3d& max4) +{ + __m128 CMP = four_spheres_four_AABBs_intersect(o1, r1, o2, r2, o3, r3, o4, r4, min1, max1, min2, max2, min3, max3, min4, max4); + return _mm_movemask_ps(CMP) > 0; +} + +/** @brief four AABBs versus four AABBs SIMD test */ +static bool four_AABBs_intersect_and(const Vector3d& min1, const Vector3d& max1, + const Vector3d& min2, const Vector3d& max2, + const Vector3d& min3, const Vector3d& max3, + const Vector3d& min4, const Vector3d& max4, + const Vector3d& min5, const Vector3d& max5, + const Vector3d& min6, const Vector3d& max6, + const Vector3d& min7, const Vector3d& max7, + const Vector3d& min8, const Vector3d& max8) +{ + __m128 CMP = four_AABBs_intersect(min1, max1, min2, max2, min3, max3, min4, max4, min5, max5, min6, max6, min7, max7, min8, max8); + return _mm_movemask_ps(CMP) == 15.f; +} + +static bool four_AABBs_intersect_or(const Vector3d& min1, const Vector3d& max1, + const Vector3d& min2, const Vector3d& max2, + const Vector3d& min3, const Vector3d& max3, + const Vector3d& min4, const Vector3d& max4, + const Vector3d& min5, const Vector3d& max5, + const Vector3d& min6, const Vector3d& max6, + const Vector3d& min7, const Vector3d& max7, + const Vector3d& min8, const Vector3d& max8) +{ + __m128 CMP = four_AABBs_intersect(min1, max1, min2, max2, min3, max3, min4, max4, min5, max5, min6, max6, min7, max7, min8, max8); + return _mm_movemask_ps(CMP) > 0; +} + +} + +#endif diff --git a/rmf_traffic/thirdparty/fcl/.editorconfig b/rmf_traffic/thirdparty/fcl/.editorconfig new file mode 100644 index 00000000..69c4fcdc --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.editorconfig @@ -0,0 +1,44 @@ +# Copyright (c) 2018, Toyota Research Institute, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# Author: Jamie Snape, Kitware, Inc. + +root = true + +[*] +charset = utf +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +max_line_length = 80 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/rmf_traffic/thirdparty/fcl/.gitignore b/rmf_traffic/thirdparty/fcl/.gitignore new file mode 100644 index 00000000..6a8e562e --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/.gitignore @@ -0,0 +1,34 @@ +# Copyright (c) 2016, Open Source Robotics Foundation. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# Author: Jeongseok Lee + +/build +/build-* +/doc/doxygen diff --git a/rmf_traffic/thirdparty/fcl/CHANGELOG.md b/rmf_traffic/thirdparty/fcl/CHANGELOG.md new file mode 100644 index 00000000..4a706992 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CHANGELOG.md @@ -0,0 +1,306 @@ +## FCL 0 + +### FCL 0.7.0 (????-??-??) + +* Breaking changes + + * Macros `FCL_SUPPRESS_MAYBE_UNINITIALIZED_BEGIN` and `FCL_SUPPRESS_MAYBE_UNINITIALIZED_END` defined in `fcl/common/warning.h` have been removed: + [#489](https://github.com/flexible-collision-library/fcl/pull/489) + +* Core/Common + +* Math + + * constants::eps() is now constexpr: + [#494](https://github.com/flexible-collision-library/fcl/pull/494) + +* Geometry + + * OcTree logic for determining free/occupied: + [#467](https://github.com/flexible-collision-library/fcl/pull/467) + * Bugs in RSS distance queries fixed: + [#467](https://github.com/flexible-collision-library/fcl/pull/467) + * Convex gets *some* validation and improved support for the GJK `supportVertex()` API: + [#488](https://github.com/flexible-collision-library/fcl/pull/488) + * Fixed bug in collision function matrix that only allowed calculation of + collision between ellipsoid and half space *with that ordering*. Now also + supports half space and ellipsoid. + [#520](https://github.com/flexible-collision-library/fcl/pull/520) + +* Broadphase + +* Narrowphase + + * Primitive convex-half space collision algorithm introduced: + [#469](https://github.com/flexible-collision-library/fcl/pull/469) + * Contact and distance query results types changed to be compatible with OcTree: + [#472](https://github.com/flexible-collision-library/fcl/pull/472) + * Documentation for OcTree no longer mistakenly excluded from doxygen: + [#472](https://github.com/flexible-collision-library/fcl/pull/472) + * Another failure mode in the GJK/EPA signed distance query patched: + [#494](https://github.com/flexible-collision-library/fcl/pull/494) + +* Build/Test/Misc + + * Fixed syntax which prevented building in Visual Studio 2015: + [#459](https://github.com/flexible-collision-library/fcl/pull/459) + * Fix compilation errors using default options on Emscripten: + [#470](https://github.com/flexible-collision-library/fcl/pull/470) + * Change supported linux build to Ubuntu 18.04 and Mac OS 10.14.6: + [#489](https://github.com/flexible-collision-library/fcl/pull/489) + +### FCL 0.6.1 (2020-02-26) + +* Math + + * Replace M_PI instance with constants::pi(): + [#450](https://github.com/flexible-collision-library/fcl/pull/450) + +* Narrowphase + + * Various corrections and clarifications of the GJK algorithm used for general + convex distance: + [#446](https://github.com/flexible-collision-library/fcl/pull/446) + +* Build/Test/Misc + + * Clean up install config files and ensure find_dependency is called as + appropriate: + [#452](https://github.com/flexible-collision-library/fcl/pull/452) + +### FCL 0.6.0 (2020-02-10) + +* Core/Common + + * Removed dependency on boost: + [#140](https://github.com/flexible-collision-library/fcl/pull/140), + [#146](https://github.com/flexible-collision-library/fcl/pull/146), + [#147](https://github.com/flexible-collision-library/fcl/pull/147), + [#148](https://github.com/flexible-collision-library/fcl/pull/148) + * Fix incorrect use of `FCL_BUILD_TYPE_DEBUG`: + [#153](https://github.com/flexible-collision-library/fcl/pull/153) + * Replaced `NULL` with `nullptr`: + [#158](https://github.com/flexible-collision-library/fcl/pull/158) + * Templatized FCL for scalar type: + [#154](https://github.com/flexible-collision-library/fcl/pull/154), + [#165](https://github.com/flexible-collision-library/fcl/pull/165), + [#188](https://github.com/flexible-collision-library/fcl/pull/188) + * Reorganized source tree: + [#163](https://github.com/flexible-collision-library/fcl/pull/163), + [#175](https://github.com/flexible-collision-library/fcl/pull/175) + +* Math + + * Switched to Eigen for math operations: + [#150](https://github.com/flexible-collision-library/fcl/pull/150) + * Rework `fcl::constants`; replace M_PI instances and include scalar-dependent + numerical tolerances: + [#264](https://github.com/flexible-collision-library/fcl/pull/264), + [#279](https://github.com/flexible-collision-library/fcl/pull/279) + * `fcl::Transform` defined to be an `Isometry` to optimize inverses: + [#318](https://github.com/flexible-collision-library/fcl/pull/318) + +* Geometry + + * BVH Model throws intelligent errors when it runs out of memory: + [#237](https://github.com/flexible-collision-library/fcl/pull/237) + * Generate a BVH Model from multiple primitives: + [#308](https://github.com/flexible-collision-library/fcl/pull/308) + * Clean up `Convex` class: + [#325](https://github.com/flexible-collision-library/fcl/pull/325), + [#338](https://github.com/flexible-collision-library/fcl/pull/338), + [#369](https://github.com/flexible-collision-library/fcl/pull/369) + * Computation of `Capsule` moment of inertia corrected: + [#420](https://github.com/flexible-collision-library/fcl/pull/420) + * Added tests on local AABB computation for `Capsule`: + [#423](https://github.com/flexible-collision-library/fcl/pull/423) + * Fixed interpretation of capsule parameters in primitive capsule-capsule + distance computation. + [#436](https://github.com/flexible-collision-library/fcl/pull/436) + +* Broadphase + + * Fixed redundant pair checking of `SpatialHashingCollisionManager`: + [#156](https://github.com/flexible-collision-library/fcl/pull/156) + * Clean up of hierarchy tree code: + [#439](https://github.com/flexible-collision-library/fcl/pull/439) + * Default callback functions for broadphase collision managers have been moved + out of `fcl::test` and into `fcl` namespace (with a corresponding name + change, e.g., `defaultDistanceFunction` --> `DefaultDistanceFunction`). + [#438](https://github.com/flexible-collision-library/fcl/pull/438) + * This includes the removal of the stub function + `defaultContinuousDistanceFunction()`. + +* Narrowphase + + * Added distance request option for computing exact negative distance: + [#172](https://github.com/flexible-collision-library/fcl/pull/172) + * Adjust tolerance on cylinder-cone unit test to pass on MacOS: + [#198](https://github.com/flexible-collision-library/fcl/pull/198) + * Unify computation of nearest point in convexity-based distance algorithms: + [#215](https://github.com/flexible-collision-library/fcl/pull/215) + * Fixed bug in cylinder-half space collision query: + [#255](https://github.com/flexible-collision-library/fcl/pull/255), + [#267](https://github.com/flexible-collision-library/fcl/pull/267) + * Errors in box-box collision function addressed -- this changes the semantics + of the old results: penetration depth is a *positive* value and the position + of the penetration will *not* lie on the surface of one box, but lies at the + midpoint between the two penetrating surfaces: + [#259](https://github.com/flexible-collision-library/fcl/pull/259) + * Fixed bug in `meshConservativeAdvancementOrientedNodeCanStop`: + [#271](https://github.com/flexible-collision-library/fcl/pull/271) + * `CollisionRequest` gets a "GJK tolerance": + [#283](https://github.com/flexible-collision-library/fcl/pull/283) + * Correct distance queries to report nearest point in _world_ frame: + [#288](https://github.com/flexible-collision-library/fcl/pull/288) + * Various corrections and clarifications of the GJK algorithm used for general + convex distance: + [#290](https://github.com/flexible-collision-library/fcl/pull/290), + [#296](https://github.com/flexible-collision-library/fcl/pull/296), + [#324](https://github.com/flexible-collision-library/fcl/pull/324), + [#365](https://github.com/flexible-collision-library/fcl/pull/365), + [#367](https://github.com/flexible-collision-library/fcl/pull/367), + [#373](https://github.com/flexible-collision-library/fcl/pull/373) + * Remove duplicated code between GJKDistance and GJKSignedDistance: + [#292](https://github.com/flexible-collision-library/fcl/pull/292) + * Significant bug fixes in the EPA algorithm for computing signed distance on + penetrating convex shapes: + [#305](https://github.com/flexible-collision-library/fcl/pull/305), + [#314](https://github.com/flexible-collision-library/fcl/pull/314), + [#336](https://github.com/flexible-collision-library/fcl/pull/336), + [#352](https://github.com/flexible-collision-library/fcl/pull/352), + [#388](https://github.com/flexible-collision-library/fcl/pull/388), + [#397](https://github.com/flexible-collision-library/fcl/pull/397), + [#417](https://github.com/flexible-collision-library/fcl/pull/417), + [#434](https://github.com/flexible-collision-library/fcl/pull/434), + [#435](https://github.com/flexible-collision-library/fcl/pull/435), + [#437](https://github.com/flexible-collision-library/fcl/pull/437) + * Add custom sphere-box collision and distance algorithms for both solvers: + [#316](https://github.com/flexible-collision-library/fcl/pull/316) + * Add custom sphere-cylinder collision and distance algorithms for both + solvers: + [#321](https://github.com/flexible-collision-library/fcl/pull/321) + * Octree-mesh distance query returns witness points: + [#427](https://github.com/flexible-collision-library/fcl/pull/427) + +* Build/Test/Misc + + * Ensure the locally generated config.h is used: + [#142](https://github.com/flexible-collision-library/fcl/pull/142) + * Use major.minor version for ABI soversion: + [#143](https://github.com/flexible-collision-library/fcl/pull/143) + * Added missing copyright headers: + [#149](https://github.com/flexible-collision-library/fcl/pull/149) + * Enable Win32 builds on AppVeyor CI: + [#157](https://github.com/flexible-collision-library/fcl/pull/157) + * Enabled build with SSE option by default: + [#159](https://github.com/flexible-collision-library/fcl/pull/159) + * Show build status of master branch in README.md: + [#166](https://github.com/flexible-collision-library/fcl/pull/166) + * Added CMake targets for generating API documentation: + [#174](https://github.com/flexible-collision-library/fcl/pull/174) + * Clean up finding external dependencies and use imported targets where + available: + [#181](https://github.com/flexible-collision-library/fcl/pull/181), + [#182](https://github.com/flexible-collision-library/fcl/pull/182), + [#196](https://github.com/flexible-collision-library/fcl/pull/196) + * Added version check for Visual Studio in CMake (VS2015 or greater required): + [#189](https://github.com/flexible-collision-library/fcl/pull/189) + * Add dedicated SSE CMake option: + [#191](https://github.com/flexible-collision-library/fcl/pull/191) + * Remove unused references to TinyXML from build: + [#193](https://github.com/flexible-collision-library/fcl/pull/193) + * Minor corrections to signed distance tests: + [#199](https://github.com/flexible-collision-library/fcl/pull/199) + * Fix various compiler warnings and enable warnings as errors in CI: + [#197](https://github.com/flexible-collision-library/fcl/pull/197), + [#200](https://github.com/flexible-collision-library/fcl/pull/200), + [#204](https://github.com/flexible-collision-library/fcl/pull/204), + [#205](https://github.com/flexible-collision-library/fcl/pull/205) + * Allow the CMake RPATH to be configured: + [#203](https://github.com/flexible-collision-library/fcl/pull/203) + * Set SSE flags for the Apple compiler: + [#206](https://github.com/flexible-collision-library/fcl/pull/206) + * Windows CI always uses double-valued libccd: + [#216](https://github.com/flexible-collision-library/fcl/pull/216) + * Clean up of CMake install configuration: + [#230](https://github.com/flexible-collision-library/fcl/pull/230) + * Formalize visibility of binary symbols: + [#233](https://github.com/flexible-collision-library/fcl/pull/233) + * Remove tapping deprecated homebrew-science: + [#262](https://github.com/flexible-collision-library/fcl/pull/262) + * Move travis CI to use xcode 9 instead of 7.3: + [#266](https://github.com/flexible-collision-library/fcl/pull/266) + * Fix VS2017 incompatibility: + [#277](https://github.com/flexible-collision-library/fcl/pull/277) + * Mention Visual Studio version requirement in INSTALL file: + [#284](https://github.com/flexible-collision-library/fcl/pull/284) + * Correct CMake error message for the wrong version of libccd: + [#286](https://github.com/flexible-collision-library/fcl/pull/286) + * Added test utility for performing equality between Eigen matrix-types + (`CompareMatrices` in `test/eign_matrix_compare.h`): + [#316](https://github.com/flexible-collision-library/fcl/pull/316) + * Toward enabling dashboards on CI: + [#328](https://github.com/flexible-collision-library/fcl/pull/328) + * Add configuration files for various static analyzers: + [#332](https://github.com/flexible-collision-library/fcl/pull/332) + * Update AppVeyor badge URL in README: + [#342](https://github.com/flexible-collision-library/fcl/pull/342) + * CMake fixes and cleanup: + [#360](https://github.com/flexible-collision-library/fcl/pull/360) + * Enable --output-on-failure for CI builds: + [#362](https://github.com/flexible-collision-library/fcl/pull/362) + * Corrected test of the distance function to be compatible with libccd 2: + [#371](https://github.com/flexible-collision-library/fcl/pull/371) + * Provides the `UnexpectedConfigurationException` so that when narrowphase + operations encounter an error, they can throw this new exception which + will trigger a logging of the types and poses of the geometries that led to + the error: + [#381](https://github.com/flexible-collision-library/fcl/pull/381) + * Provide catkin packaage.xml per ROS REP 136: + [#409](https://github.com/flexible-collision-library/fcl/pull/409) + * Updated README.md to reflect FCL 0.6.0 syntax changes: + [#410](https://github.com/flexible-collision-library/fcl/pull/410) + +### FCL 0.5.0 (2016-07-19) + +* Added safe-guards to allow octree headers only if octomap enabled: + [#136](https://github.com/flexible-collision-library/fcl/pull/136) +* Added CMake option to disable octomap in build: + [#135](https://github.com/flexible-collision-library/fcl/pull/135) +* Added automatic coverage test reporting: + [#125](https://github.com/flexible-collision-library/fcl/pull/125), + [#98](https://github.com/flexible-collision-library/fcl/pull/98) +* Added CMake exported targets: + [#116](https://github.com/flexible-collision-library/fcl/pull/116) +* Fixed API to support Octomap 1.8: + [#129](https://github.com/flexible-collision-library/fcl/pull/129), + [#126](https://github.com/flexible-collision-library/fcl/issues/126) +* Fixed continuousCollisionNaive() wasn't resetting the returned result when no + collision: + [#123](https://github.com/flexible-collision-library/fcl/pull/123) +* Fixed uninitialized tf in TranslationMotion: + [#121](https://github.com/flexible-collision-library/fcl/pull/121) +* Fixed fcl.pc populated incorrect installation paths: + [#118](https://github.com/flexible-collision-library/fcl/pull/118) +* Fixed octree vs mesh CollisionResult now returns triangle id: + [#114](https://github.com/flexible-collision-library/fcl/pull/114) +* Fixed minor typo: + [#113](https://github.com/flexible-collision-library/fcl/pull/113) +* Fixed fallback finding of libccd: + [#112](https://github.com/flexible-collision-library/fcl/pull/112) +* Fixed a nasty bug in propagate propagateBVHFrontListCollisionRecurse(): + [#110](https://github.com/flexible-collision-library/fcl/pull/110) +* Fixed test_fcl_math failures on Windows 64 bit due to non-portable use of + long: + [#108](https://github.com/flexible-collision-library/fcl/pull/108), + [#107](https://github.com/flexible-collision-library/fcl/issues/107) +* Fixed compilation in Visual Studio 2015, and suppressed some warnings: + [#99](https://github.com/flexible-collision-library/fcl/pull/99) +* Fixed build when libccd package config not found: + [#94](https://github.com/flexible-collision-library/fcl/pull/94) +* Removing dependency on boost: + [#108](https://github.com/flexible-collision-library/fcl/pull/108), + [#105](https://github.com/flexible-collision-library/fcl/pull/105), + [#104](https://github.com/flexible-collision-library/fcl/pull/104), + [#103](https://github.com/flexible-collision-library/fcl/pull/103) diff --git a/rmf_traffic/thirdparty/fcl/CMakeLists.txt b/rmf_traffic/thirdparty/fcl/CMakeLists.txt new file mode 100644 index 00000000..3d762355 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CMakeLists.txt @@ -0,0 +1,313 @@ +# -*- mode: cmake -*- +# vi: set ft=cmake : + +# Copyright (c) 2012, Willow Garage, Inc. +# Copyright (c) 2016, Toyota Research Institute, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +cmake_minimum_required(VERSION 3.10) + +# Compiler ID for Apple Clang is now AppleClang. +if(POLICY CMP0025) + cmake_policy(SET CMP0025 NEW) +endif() + +include(CTest) + +configure_file(CTestCustom.cmake.in CTestCustom.cmake @ONLY) + +option(FCL_ENABLE_PROFILING "Enable profiling" OFF) +option(FCL_TREAT_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF) +# Option for some bundle-like build system in order not to expose +# any FCL binary symbols in their public ABI +option(FCL_HIDE_ALL_SYMBOLS "Hide all binary symbols" OFF) + +# set the default build type +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE Release CACHE STRING + "Choose the type of build; options are Debug Release RelWithDebInfo MinSizeRel." + FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY + STRINGS Debug Release RelWithDebInfo MinSizeRel) +endif() + +# This shouldn't be necessary, but there has been trouble +# with MSVC being set off, but MSVCXX ON. +if(MSVC OR MSVC90 OR MSVC10) + set(MSVC ON) +endif (MSVC OR MSVC90 OR MSVC10) + +set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") +include(CMakePackageConfigHelpers) +include(GenerateExportHeader) +include(GNUInstallDirs) +include(CompilerSettings) +set(FCL_VERSION 0.6.1) +set(FCL_ABI_VERSION 0.6) + +if(MSVC OR IS_ICPC) + option(FCL_STATIC_LIBRARY "Whether the FCL library should be static rather than shared" ON) +else() + option(FCL_STATIC_LIBRARY "Whether the FCL library should be static rather than shared" OFF) +endif() + +set(SSE_FLAGS "") +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(SSE_FLAGS -mfpmath=sse -msse -msse2 -msse3 -mssse3) +elseif(MSVC) + # Win64 will add the flag automatically + if(CMAKE_VS_PLATFORM_NAME STREQUAL "Win32") + set(SSE_FLAGS /arch:SSE2) + endif() +endif() + +# Whether to enable SSE +if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set(FCL_TARGET_SUPPORT_X64_SSE OFF) +else() + # Does the host support SSE + cmake_host_system_information(RESULT _has_sse QUERY HAS_SSE) + cmake_host_system_information(RESULT _has_sse2 QUERY HAS_SSE2) + + # Does the compiler support SSE + include(CheckCXXCompilerFlag) + check_cxx_compiler_flag("${SSE_FLAGS}" _compiler_supports_sse) + + if(_has_sse AND _has_sse2 AND _compiler_supports_sse) + set(FCL_TARGET_SUPPORT_X64_SSE ON) + else() + set(FCL_TARGET_SUPPORT_X64_SSE OFF) + endif() +endif() +option(FCL_USE_X64_SSE "Whether FCL should x64 SSE instructions" ${FCL_TARGET_SUPPORT_X64_SSE}) +if(FCL_USE_X64_SSE) + add_compile_options(${SSE_FLAGS}) +else() + # Unset SSE_FLAGS so it doesn't get used in subdirectories + set(SSE_FLAGS "") +endif() + +option(FCL_USE_HOST_NATIVE_ARCH "Whether FCL should use cflags from the host used to compile" OFF) +if (FCL_USE_HOST_NATIVE_ARCH) + if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") + else() + message(WARNING "FCL_USE_HOST_NATIVE_ARCH is only supported in Linux. No effect.") + endif() +endif() + +# DEPRECATED: old cmake option. Not strictly correct from the semantic point of view +# it was activating march=native, not only SSE +option(FCL_USE_SSE "(deprecated) Whether FCL should SSE instructions" OFF) +if(FCL_USE_SSE) + set(FCL_HAVE_SSE TRUE) + if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + message(WARNING "FCL_USE_SSE is deprecated please use: FCL_USE_X64_SSE or FCL_USE_HOST_NATIVE_ARCH. " + "If you want to replicate the previous behaviour use FCL_USE_HOST_NATIVE_ARCH") + add_definitions(-march=native) + elseif(MSVC) + # Win64 will add the flag automatically + if("$CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + add_definitions(/arch:SSE2) + endif() + endif() +endif() + +# Coveralls support +option(FCL_COVERALLS "Turn on coveralls support" OFF) +option(FCL_COVERALLS_UPLOAD "Upload the generated coveralls json" ON) +if(FCL_COVERALLS) + include(Coveralls) + coveralls_turn_on_coverage() +endif() + +find_package(PkgConfig QUIET) +set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON) + +#=============================================================================== +# Find required dependency Eigen3 (>= 3.0.5) +# +# If Eigen3 is not found, manually set the cache variable EIGEN3_INCLUDE_DIR +#=============================================================================== +find_package(Eigen3 3.0.5 QUIET CONFIG) + +# If Eigen3Config.cmake is not found, use the FindEigen3.cmake module +if(NOT Eigen3_FOUND) + find_package(Eigen3 3.0.5 QUIET MODULE) + set(Eigen3_FOUND ON) +endif() + +if(Eigen3_FOUND) + set(FCL_HAVE_EIGEN TRUE) +else() + message(SEND_ERROR "EIGEN3 (>= 3.0.5) is required by FCL") + set(FCL_HAVE_EIGEN FALSE) +endif() + +#=============================================================================== +# Find required dependency libccd +# +# If libccd is not found, manually set the cache variables CCD_INCLUDE_DIR and +# CCD_LIBRARY +#=============================================================================== +find_package(ccd QUIET) + +# If ccd-config.cmake is not found, use pkg-config and/or find_path() and +# find_library() +if(NOT ccd_FOUND) + if(PKG_CONFIG_FOUND) + pkg_search_module(PC_CCD ccd libccd) + endif() + + # The include directory returned by pkg_config is very unreliable: + # 1. PC_CCD_INCLUDE_DIRS cannot locate ccd.h definitively, it could be: + # a) PC_CCD_INCLUDE_DIRS/ccd/ccd.h + # b) PC_CCD_INCLUDE_DIRS/ccd.h + # 2. It may be empty due to pkg-config's de-duplication, if the path is + # provided by: + # a) $PKG_CONFIG_SYSTEM_INCLUDE_PATH + # b) $C_INCLUDE_PATH + # c) $CPLUS_INCLUDE_PATH + find_path(CCD_INCLUDE_DIR ccd/ccd.h + HINTS "${PC_CCD_INCLUDE_DIRS}" + "${PC_CCD_INCLUDE_DIRS}/.." + ENV PKG_CONFIG_SYSTEM_INCLUDE_PATH + ENV C_INCLUDE_PATH + ENV CPLUS_INCLUDE_PATH) + + # Using find_library() even if pkg-config is available ensures that the full + # path to the ccd library is available in CCD_LIBRARIES + find_library(CCD_LIBRARY ccd + HINTS "${PC_CCD_LIBRARY_DIRS}") + + # libccd links to LibM on UNIX. + if(CYGWIN OR NOT WIN32) + find_library(M_LIBRARY m) + endif() + + if(CCD_INCLUDE_DIR AND CCD_LIBRARY) + set(CCD_INCLUDE_DIRS "${CCD_INCLUDE_DIR}") + set(CCD_LIBRARIES "${CCD_LIBRARY}" "${M_LIBRARY}") + set(ccd_FOUND ON) + + mark_as_advanced(CCD_INCLUDE_DIR CCD_LIBRARY) + endif() +endif() + +if(NOT ccd_FOUND) + message(FATAL_ERROR "CCD is required by FCL") +endif() + +set(PKG_EXTERNAL_DEPS "ccd eigen3") + +#=============================================================================== +# Find optional dependency OctoMap +# +# If OctoMap is not found, manually set the cache variables OCTOMAP_INCLUDE_DIR +# and OCTOMAP_LIBRARY, OCTOMATH_LIBRARY, and OCTOMAP_VERSION +#=============================================================================== +option(FCL_WITH_OCTOMAP "OctoMap library support" ON) +set(FCL_HAVE_OCTOMAP 0) + +if(FCL_WITH_OCTOMAP) + find_package(octomap QUIET) + + # Older versions of octomap-config.cmake may not define OCTOMAP_VERSION so + # fall back to pkg-config + if(NOT octomap_FOUND OR NOT OCTOMAP_VERSION) + if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_OCTOMAP octomap) + endif() + + find_path(OCTOMAP_INCLUDE_DIR octomap/octomap.h + HINTS "${PC_OCTOMAP_INCLUDE_DIRS}") + + # Using find_library() even if pkg-config is available ensures that the full + # paths to the octomap and octomath libraries are set in OCTOMAP_LIBRARIES + find_library(OCTOMAP_LIBRARY octomap + HINTS "${PC_OCTOMAP_LIBRARY_DIRS}") + + find_library(OCTOMATH_LIBRARY octomath + HINTS "${PC_OCTOMAP_LIBRARY_DIRS}") + + # Use a cache variable so that the version can be manually set if pkg-config + # is not available + set(OCTOMAP_VERSION "${PC_OCTOMAP_VERSION}" + CACHE STRING "octomap version (major.minor.patch)") + + if(OCTOMAP_INCLUDE_DIR AND OCTOMAP_LIBRARY AND OCTOMATH_LIBRARY AND OCTOMAP_VERSION) + set(OCTOMAP_INCLUDE_DIRS "${OCTOMAP_INCLUDE_DIR}") + set(OCTOMAP_LIBRARIES "${OCTOMAP_LIBRARY}" "${OCTOMATH_LIBRARY}") + set(octomap_FOUND ON) + + mark_as_advanced(OCTOMAP_INCLUDE_DIR OCTOMAP_LIBRARY OCTOMATH_LIBRARY OCTOMAP_VERSION) + else() + set(octomap_FOUND OFF) + endif() + endif() + + if(octomap_FOUND) + if(NOT OCTOMAP_MAJOR_VERSION AND NOT OCTOMAP_MINOR_VERSION AND NOT OCTOMAP_PATCH_VERSION) + string(REPLACE "." ";" VERSION_LIST "${OCTOMAP_VERSION}") + list(GET VERSION_LIST 0 OCTOMAP_MAJOR_VERSION) + list(GET VERSION_LIST 1 OCTOMAP_MINOR_VERSION) + list(GET VERSION_LIST 2 OCTOMAP_PATCH_VERSION) + endif() + + set(FCL_HAVE_OCTOMAP 1) + message(STATUS "FCL uses OctoMap") + set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} octomap") + else() + message(STATUS "FCL does not use OctoMap") + endif() +else() + message(STATUS "FCL does not use OctoMap (as requested)") +endif() + +if(TARGET ccd) + set(FIND_DEPENDENCY_CCD "find_dependency(ccd)") +else() + set(FIND_DEPENDENCY_CCD) +endif() + +if(TARGET Eigen3::Eigen) + set(FIND_DEPENDENCY_EIGEN3 "find_dependency(Eigen3)") +else() + set(FIND_DEPENDENCY_EIGEN3) +endif() + +if(TARGET octomap) + set(FIND_DEPENDENCY_OCTOMAP "find_dependency(octomap)") +else() + set(FIND_DEPENDENCY_OCTOMAP) +endif() + +add_subdirectory(src) +add_subdirectory(include/fcl) diff --git a/rmf_traffic/thirdparty/fcl/CMakeModules/CompilerSettings.cmake b/rmf_traffic/thirdparty/fcl/CMakeModules/CompilerSettings.cmake new file mode 100644 index 00000000..95c529d0 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CMakeModules/CompilerSettings.cmake @@ -0,0 +1,126 @@ +# -*- mode: cmake -*- +# vi: set ft=cmake : + +# Copyright (c) 2013, Willow Garage, Inc. +# Copyright (c) 2017, Toyota Research Institute, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# GCC +if(CMAKE_COMPILER_IS_GNUCXX) + add_definitions(-std=c++11 -W -Wall -Wextra -Wpedantic) + if(FCL_TREAT_WARNINGS_AS_ERRORS) + add_definitions(-Werror) + endif() +endif() + +# Clang +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + add_definitions(-std=c++11 -W -Wall -Wextra) + if(FCL_TREAT_WARNINGS_AS_ERRORS) + add_definitions(-Werror) + endif() +endif() + +# AppleClang +if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + # Require at least Apple LLVM version 6.1 + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1) + message(FATAL_ERROR "AppleClang version must be at least 6.1!") + endif() + add_definitions(-std=c++11 -W -Wall -Wextra) + if(FCL_TREAT_WARNINGS_AS_ERRORS) + add_definitions(-Werror) + endif() +endif() + +# Visual Studio +if(MSVC) + if(MSVC_VERSION VERSION_LESS 1900) + message(FATAL_ERROR "fcl requires Visual Studio 2015 or greater.") + endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /MP /W1 /bigobj") + if(FCL_TREAT_WARNINGS_AS_ERRORS) + add_definitions(/WX) + endif() +endif() + +# Intel +if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + set(IS_ICPC 1) +else() + set(IS_ICPC 0) +endif() +if(IS_ICPC) + add_definitions(-std=c++11 -wd191 -wd411 -wd654 -wd1125 -wd1292 -wd1565 -wd1628 -wd2196) + set(CMAKE_AR "xiar" CACHE STRING "Intel archiver" FORCE) + set(CMAKE_CXX_FLAGS "-pthread" CACHE STRING "Default compile flags" FORCE) + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" + CACHE STRING "Flags used by the C++ compiler during release builds." FORCE) + set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE STRING + "Flags used by the C++ compiler during debug builds." FORCE) + set(CMAKE_LINKER "xild" CACHE STRING "Intel linker" FORCE) + if(FCL_TREAT_WARNINGS_AS_ERRORS) + add_definitions(-Werror) + endif() +endif() + +# XL +if(CMAKE_CXX_COMPILER_ID STREQUAL "XL") + set(IS_XLC 1) +else() + set(IS_XLC 0) +endif() +if(IS_XLC) + add_definitions(-std=c++11 -qpic -q64 -qmaxmem=-1) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -q64") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -q64") +endif() + +# MinGW +if((CMAKE_COMPILER_IS_GNUCXX OR IS_ICPC) AND NOT MINGW) + add_definitions(-fPIC) + if(FCL_TREAT_WARNINGS_AS_ERRORS) + add_definitions(-Werror) + endif() +endif() + +# By default CMake sets RPATH for binaries in the build tree, but clears +# it when installing. Switch this option off if the default behaviour is +# desired. +option(FCL_NO_DEFAULT_RPATH "Set RPATH for installed binaries" ON) +mark_as_advanced(FCL_NO_DEFAULT_RPATH) + +# Set rpath http://www.paraview.org/Wiki/CMake_RPATH_handling +if(FCL_NO_DEFAULT_RPATH) + message(STATUS "Set RPATH explicitly to '${CMAKE_INSTALL_FULL_LIBDIR}'") + set(CMAKE_SKIP_BUILD_RPATH OFF) + set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF) + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}") + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON) +endif() diff --git a/rmf_traffic/thirdparty/fcl/CMakeModules/Coveralls.cmake b/rmf_traffic/thirdparty/fcl/CMakeModules/Coveralls.cmake new file mode 100644 index 00000000..42503973 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CMakeModules/Coveralls.cmake @@ -0,0 +1,128 @@ +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# Copyright (C) 2014 Joakim Söderberg +# + +set(_CMAKE_SCRIPT_PATH ${CMAKE_CURRENT_LIST_DIR}) # must be outside coveralls_setup() to get correct path + +# +# Param _COVERAGE_SRCS A list of source files that coverage should be collected for. +# Param _COVERALLS_UPLOAD Upload the result to coveralls? +# + +function(coveralls_setup _COVERAGE_SRCS _COVERALLS_UPLOAD) + + if (ARGC GREATER 2) + set(_CMAKE_SCRIPT_PATH ${ARGN}) + message(STATUS "Coveralls: Using alternate CMake script dir: ${_CMAKE_SCRIPT_PATH}") + endif() + + if (NOT EXISTS "${_CMAKE_SCRIPT_PATH}/CoverallsClear.cmake") + message(FATAL_ERROR "Coveralls: Missing ${_CMAKE_SCRIPT_PATH}/CoverallsClear.cmake") + endif() + + if (NOT EXISTS "${_CMAKE_SCRIPT_PATH}/CoverallsGenerateGcov.cmake") + message(FATAL_ERROR "Coveralls: Missing ${_CMAKE_SCRIPT_PATH}/CoverallsGenerateGcov.cmake") + endif() + + # When passing a CMake list to an external process, the list + # will be converted from the format "1;2;3" to "1 2 3". + # This means the script we're calling won't see it as a list + # of sources, but rather just one long path. We remedy this + # by replacing ";" with "*" and then reversing that in the script + # that we're calling. + # http://cmake.3232098.n2.nabble.com/Passing-a-CMake-list-quot-as-is-quot-to-a-custom-target-td6505681.html + set(COVERAGE_SRCS_TMP ${_COVERAGE_SRCS}) + set(COVERAGE_SRCS "") + foreach (COVERAGE_SRC ${COVERAGE_SRCS_TMP}) + set(COVERAGE_SRCS "${COVERAGE_SRCS}*${COVERAGE_SRC}") + endforeach() + + #message("Coverage sources: ${COVERAGE_SRCS}") + set(COVERALLS_FILE ${PROJECT_BINARY_DIR}/coveralls.json) + + add_custom_target(coveralls_generate + + # Zero the coverage counters. + COMMAND ${CMAKE_COMMAND} -DPROJECT_BINARY_DIR="${PROJECT_BINARY_DIR}" -P "${_CMAKE_SCRIPT_PATH}/CoverallsClear.cmake" + + # Run regress tests. + COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure + + # Generate Gcov and translate it into coveralls JSON. + # We do this by executing an external CMake script. + # (We don't want this to run at CMake generation time, but after compilation and everything has run). + COMMAND ${CMAKE_COMMAND} + -DCOVERAGE_SRCS="${COVERAGE_SRCS}" # TODO: This is passed like: "a b c", not "a;b;c" + -DCOVERALLS_OUTPUT_FILE="${COVERALLS_FILE}" + -DCOV_PATH="${PROJECT_BINARY_DIR}" + -DPROJECT_ROOT="${PROJECT_SOURCE_DIR}" + -P "${_CMAKE_SCRIPT_PATH}/CoverallsGenerateGcov.cmake" + + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + COMMENT "Generating coveralls output..." + ) + + if (_COVERALLS_UPLOAD) + message("COVERALLS UPLOAD: ON") + + find_program(CURL_EXECUTABLE curl) + + if (NOT CURL_EXECUTABLE) + message(FATAL_ERROR "Coveralls: curl not found! Aborting") + endif() + + add_custom_target(coveralls_upload + # Upload the JSON to coveralls. + COMMAND ${CURL_EXECUTABLE} + -S -F json_file=@${COVERALLS_FILE} + https://coveralls.io/api/v1/jobs + + DEPENDS coveralls_generate + + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + COMMENT "Uploading coveralls output...") + + add_custom_target(coveralls DEPENDS coveralls_upload) + else() + message("COVERALLS UPLOAD: OFF") + add_custom_target(coveralls DEPENDS coveralls_generate) + endif() + +endfunction() + +macro(coveralls_turn_on_coverage) + if(NOT (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + AND (NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")) + message(FATAL_ERROR "Coveralls: Compiler ${CMAKE_C_COMPILER_ID} is not GNU gcc! Aborting... You can set this on the command line using CC=/usr/bin/gcc CXX=/usr/bin/g++ cmake ..") + endif() + + if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + message(FATAL_ERROR "Coveralls: Code coverage results with an optimised (non-Debug) build may be misleading! Add -DCMAKE_BUILD_TYPE=Debug") + endif() + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") +endmacro() + + + diff --git a/rmf_traffic/thirdparty/fcl/CMakeModules/CoverallsClear.cmake b/rmf_traffic/thirdparty/fcl/CMakeModules/CoverallsClear.cmake new file mode 100644 index 00000000..7206886c --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CMakeModules/CoverallsClear.cmake @@ -0,0 +1,31 @@ +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# Copyright (C) 2014 Joakim Söderberg +# + +# do not follow symlinks in file(GLOB_RECURSE ...) +cmake_policy(SET CMP0009 NEW) + +file(GLOB_RECURSE GCDA_FILES "${PROJECT_BINARY_DIR}/*.gcda") +if(NOT GCDA_FILES STREQUAL "") + file(REMOVE ${GCDA_FILES}) +endif() diff --git a/rmf_traffic/thirdparty/fcl/CMakeModules/CoverallsGenerateGcov.cmake b/rmf_traffic/thirdparty/fcl/CMakeModules/CoverallsGenerateGcov.cmake new file mode 100644 index 00000000..e58622c8 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CMakeModules/CoverallsGenerateGcov.cmake @@ -0,0 +1,480 @@ +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# Copyright (C) 2014 Joakim Söderberg +# +# This is intended to be run by a custom target in a CMake project like this. +# 0. Compile program with coverage support. +# 1. Clear coverage data. (Recursively delete *.gcda in build dir) +# 2. Run the unit tests. +# 3. Run this script specifying which source files the coverage should be performed on. +# +# This script will then use gcov to generate .gcov files in the directory specified +# via the COV_PATH var. This should probably be the same as your cmake build dir. +# +# It then parses the .gcov files to convert them into the Coveralls JSON format: +# https://coveralls.io/docs/api +# +# Example for running as standalone CMake script from the command line: +# (Note it is important the -P is at the end...) +# $ cmake -DCOV_PATH=$(pwd) +# -DCOVERAGE_SRCS="catcierge_rfid.c;catcierge_timer.c" +# -P ../cmake/CoverallsGcovUpload.cmake +# +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + + +# +# Make sure we have the needed arguments. +# +if (NOT COVERALLS_OUTPUT_FILE) + message(FATAL_ERROR "Coveralls: No coveralls output file specified. Please set COVERALLS_OUTPUT_FILE") +endif() + +if (NOT COV_PATH) + message(FATAL_ERROR "Coveralls: Missing coverage directory path where gcov files will be generated. Please set COV_PATH") +endif() + +if (NOT COVERAGE_SRCS) + message(FATAL_ERROR "Coveralls: Missing the list of source files that we should get the coverage data for COVERAGE_SRCS") +endif() + +if (NOT PROJECT_ROOT) + message(FATAL_ERROR "Coveralls: Missing PROJECT_ROOT.") +endif() + +# Since it's not possible to pass a CMake list properly in the +# "1;2;3" format to an external process, we have replaced the +# ";" with "*", so reverse that here so we get it back into the +# CMake list format. +string(REGEX REPLACE "\\*" ";" COVERAGE_SRCS ${COVERAGE_SRCS}) + +if (NOT DEFINED ENV{GCOV}) + find_program(GCOV_EXECUTABLE gcov) +else() + find_program(GCOV_EXECUTABLE $ENV{GCOV}) +endif() + +# convert all paths in COVERAGE_SRCS to absolute paths +set(COVERAGE_SRCS_TMP "") +foreach (COVERAGE_SRC ${COVERAGE_SRCS}) + if (NOT "${COVERAGE_SRC}" MATCHES "^/") + set(COVERAGE_SRC ${PROJECT_ROOT}/${COVERAGE_SRC}) + endif() + list(APPEND COVERAGE_SRCS_TMP ${COVERAGE_SRC}) +endforeach() +set(COVERAGE_SRCS ${COVERAGE_SRCS_TMP}) +unset(COVERAGE_SRCS_TMP) + +if (NOT GCOV_EXECUTABLE) + message(FATAL_ERROR "gcov not found! Aborting...") +endif() + +find_package(Git) + +set(JSON_REPO_TEMPLATE + "{ + \"head\": { + \"id\": \"\@GIT_COMMIT_HASH\@\", + \"author_name\": \"\@GIT_AUTHOR_NAME\@\", + \"author_email\": \"\@GIT_AUTHOR_EMAIL\@\", + \"committer_name\": \"\@GIT_COMMITTER_NAME\@\", + \"committer_email\": \"\@GIT_COMMITTER_EMAIL\@\", + \"message\": \"\@GIT_COMMIT_MESSAGE\@\" + }, + \"branch\": \"@GIT_BRANCH@\", + \"remotes\": [] + }" +) + +# TODO: Fill in git remote data +if (GIT_FOUND) + # Branch. + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_BRANCH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + macro (git_log_format FORMAT_CHARS VAR_NAME) + execute_process( + COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:%${FORMAT_CHARS} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE ${VAR_NAME} + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endmacro() + + git_log_format(an GIT_AUTHOR_NAME) + git_log_format(ae GIT_AUTHOR_EMAIL) + git_log_format(cn GIT_COMMITTER_NAME) + git_log_format(ce GIT_COMMITTER_EMAIL) + git_log_format(B GIT_COMMIT_MESSAGE) + git_log_format(H GIT_COMMIT_HASH) + + string(REPLACE "\n" "\\n" GIT_COMMIT_MESSAGE ${GIT_COMMIT_MESSAGE}) + + message("Git exe: ${GIT_EXECUTABLE}") + message("Git branch: ${GIT_BRANCH}") + message("Git author: ${GIT_AUTHOR_NAME}") + message("Git e-mail: ${GIT_AUTHOR_EMAIL}") + message("Git commiter name: ${GIT_COMMITTER_NAME}") + message("Git commiter e-mail: ${GIT_COMMITTER_EMAIL}") + message("Git commit hash: ${GIT_COMMIT_HASH}") + message("Git commit message: ${GIT_COMMIT_MESSAGE}") + + string(CONFIGURE ${JSON_REPO_TEMPLATE} JSON_REPO_DATA) +else() + set(JSON_REPO_DATA "{}") +endif() + +############################# Macros ######################################### + +# +# This macro converts from the full path format gcov outputs: +# +# /path/to/project/root/build/#path#to#project#root#subdir#the_file.c.gcov +# +# to the original source file path the .gcov is for: +# +# /path/to/project/root/subdir/the_file.c +# +macro(get_source_path_from_gcov_filename _SRC_FILENAME _GCOV_FILENAME) + + # /path/to/project/root/build/#path#to#project#root#subdir#the_file.c.gcov + # -> + # #path#to#project#root#subdir#the_file.c.gcov + get_filename_component(_GCOV_FILENAME_WEXT ${_GCOV_FILENAME} NAME) + + # #path#to#project#root#subdir#the_file.c.gcov -> /path/to/project/root/subdir/the_file.c + string(REGEX REPLACE "\\.gcov$" "" SRC_FILENAME_TMP ${_GCOV_FILENAME_WEXT}) + string(REGEX REPLACE "\#" "/" SRC_FILENAME_TMP ${SRC_FILENAME_TMP}) + set(${_SRC_FILENAME} "${SRC_FILENAME_TMP}") +endmacro() + +############################################################################## + +# Get the coverage data. +file(GLOB_RECURSE GCDA_FILES "${COV_PATH}/*.gcda") +message("GCDA files:") + +# Get a list of all the object directories needed by gcov +# (The directories the .gcda files and .o files are found in) +# and run gcov on those. +foreach(GCDA ${GCDA_FILES}) + message("Process: ${GCDA}") + message("------------------------------------------------------------------------------") + get_filename_component(GCDA_DIR ${GCDA} PATH) + + # + # The -p below refers to "Preserve path components", + # This means that the generated gcov filename of a source file will + # keep the original files entire filepath, but / is replaced with #. + # Example: + # + # /path/to/project/root/build/CMakeFiles/the_file.dir/subdir/the_file.c.gcda + # ------------------------------------------------------------------------------ + # File '/path/to/project/root/subdir/the_file.c' + # Lines executed:68.34% of 199 + # /path/to/project/root/subdir/the_file.c:creating '#path#to#project#root#subdir#the_file.c.gcov' + # + # If -p is not specified then the file is named only "the_file.c.gcov" + # + execute_process( + COMMAND ${GCOV_EXECUTABLE} -p -o ${GCDA_DIR} ${GCDA} + WORKING_DIRECTORY ${COV_PATH} + ) +endforeach() + +# TODO: Make these be absolute path +file(GLOB ALL_GCOV_FILES ${COV_PATH}/*.gcov) + +# Get only the filenames to use for filtering. +#set(COVERAGE_SRCS_NAMES "") +#foreach (COVSRC ${COVERAGE_SRCS}) +# get_filename_component(COVSRC_NAME ${COVSRC} NAME) +# message("${COVSRC} -> ${COVSRC_NAME}") +# list(APPEND COVERAGE_SRCS_NAMES "${COVSRC_NAME}") +#endforeach() + +# +# Filter out all but the gcov files we want. +# +# We do this by comparing the list of COVERAGE_SRCS filepaths that the +# user wants the coverage data for with the paths of the generated .gcov files, +# so that we only keep the relevant gcov files. +# +# Example: +# COVERAGE_SRCS = +# /path/to/project/root/subdir/the_file.c +# +# ALL_GCOV_FILES = +# /path/to/project/root/build/#path#to#project#root#subdir#the_file.c.gcov +# /path/to/project/root/build/#path#to#project#root#subdir#other_file.c.gcov +# +# Result should be: +# GCOV_FILES = +# /path/to/project/root/build/#path#to#project#root#subdir#the_file.c.gcov +# +set(GCOV_FILES "") +#message("Look in coverage sources: ${COVERAGE_SRCS}") +message("\nFilter out unwanted GCOV files:") +message("===============================") + +set(COVERAGE_SRCS_REMAINING ${COVERAGE_SRCS}) + +foreach (GCOV_FILE ${ALL_GCOV_FILES}) + + # + # /path/to/project/root/build/#path#to#project#root#subdir#the_file.c.gcov + # -> + # /path/to/project/root/subdir/the_file.c + get_source_path_from_gcov_filename(GCOV_SRC_PATH ${GCOV_FILE}) + file(RELATIVE_PATH GCOV_SRC_REL_PATH "${PROJECT_ROOT}" "${GCOV_SRC_PATH}") + + # Is this in the list of source files? + # TODO: We want to match against relative path filenames from the source file root... + list(FIND COVERAGE_SRCS ${GCOV_SRC_PATH} WAS_FOUND) + + if (NOT WAS_FOUND EQUAL -1) + message("YES: ${GCOV_FILE}") + list(APPEND GCOV_FILES ${GCOV_FILE}) + + # We remove it from the list, so we don't bother searching for it again. + # Also files left in COVERAGE_SRCS_REMAINING after this loop ends should + # have coverage data generated from them (no lines are covered). + list(REMOVE_ITEM COVERAGE_SRCS_REMAINING ${GCOV_SRC_PATH}) + else() + message("NO: ${GCOV_FILE}") + endif() +endforeach() + +# TODO: Enable setting these +set(JSON_SERVICE_NAME "travis-ci") +set(JSON_SERVICE_JOB_ID $ENV{TRAVIS_JOB_ID}) +set(JSON_REPO_TOKEN $ENV{COVERALLS_REPO_TOKEN}) + +set(JSON_TEMPLATE +"{ + \"repo_token\": \"\@JSON_REPO_TOKEN\@\", + \"service_name\": \"\@JSON_SERVICE_NAME\@\", + \"service_job_id\": \"\@JSON_SERVICE_JOB_ID\@\", + \"source_files\": \@JSON_GCOV_FILES\@, + \"git\": \@JSON_REPO_DATA\@ +}" +) + +set(SRC_FILE_TEMPLATE +"{ + \"name\": \"\@GCOV_SRC_REL_PATH\@\", + \"source_digest\": \"\@GCOV_CONTENTS_MD5\@\", + \"coverage\": \@GCOV_FILE_COVERAGE\@ + }" +) + +message("\nGenerate JSON for files:") +message("=========================") + +set(JSON_GCOV_FILES "[") + +# Read the GCOV files line by line and get the coverage data. +foreach (GCOV_FILE ${GCOV_FILES}) + + get_source_path_from_gcov_filename(GCOV_SRC_PATH ${GCOV_FILE}) + file(RELATIVE_PATH GCOV_SRC_REL_PATH "${PROJECT_ROOT}" "${GCOV_SRC_PATH}") + + # The new coveralls API doesn't need the entire source (Yay!) + # However, still keeping that part for now. Will cleanup in the future. + file(MD5 "${GCOV_SRC_PATH}" GCOV_CONTENTS_MD5) + message("MD5: ${GCOV_SRC_PATH} = ${GCOV_CONTENTS_MD5}") + + # Loads the gcov file as a list of lines. + # (We first open the file and replace all occurences of [] with _ + # because CMake will fail to parse a line containing unmatched brackets... + # also the \ to escaped \n in macros screws up things.) + # https://public.kitware.com/Bug/view.php?id=15369 + file(READ ${GCOV_FILE} GCOV_CONTENTS) + string(REPLACE "[" "_" GCOV_CONTENTS "${GCOV_CONTENTS}") + string(REPLACE "]" "_" GCOV_CONTENTS "${GCOV_CONTENTS}") + string(REPLACE "\\" "_" GCOV_CONTENTS "${GCOV_CONTENTS}") + + # Remove file contents to avoid encoding issues (cmake 2.8 has no ENCODING option) + string(REGEX REPLACE "([^:]*):([^:]*):([^\n]*)\n" "\\1:\\2: \n" GCOV_CONTENTS "${GCOV_CONTENTS}") + file(WRITE ${GCOV_FILE}_tmp "${GCOV_CONTENTS}") + + file(STRINGS ${GCOV_FILE}_tmp GCOV_LINES) + list(LENGTH GCOV_LINES LINE_COUNT) + + # Instead of trying to parse the source from the + # gcov file, simply read the file contents from the source file. + # (Parsing it from the gcov is hard because C-code uses ; in many places + # which also happens to be the same as the CMake list delimeter). + file(READ ${GCOV_SRC_PATH} GCOV_FILE_SOURCE) + + string(REPLACE "\\" "\\\\" GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}") + string(REGEX REPLACE "\"" "\\\\\"" GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}") + string(REPLACE "\t" "\\\\t" GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}") + string(REPLACE "\r" "\\\\r" GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}") + string(REPLACE "\n" "\\\\n" GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}") + # According to http://json.org/ these should be escaped as well. + # Don't know how to do that in CMake however... + #string(REPLACE "\b" "\\\\b" GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}") + #string(REPLACE "\f" "\\\\f" GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}") + #string(REGEX REPLACE "\u([a-fA-F0-9]{4})" "\\\\u\\1" GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}") + + # We want a json array of coverage data as a single string + # start building them from the contents of the .gcov + set(GCOV_FILE_COVERAGE "[") + + set(GCOV_LINE_COUNT 1) # Line number for the .gcov. + set(DO_SKIP 0) + foreach (GCOV_LINE ${GCOV_LINES}) + #message("${GCOV_LINE}") + # Example of what we're parsing: + # Hitcount |Line | Source + # " 8: 26: if (!allowed || (strlen(allowed) == 0))" + string(REGEX REPLACE + "^([^:]*):([^:]*):(.*)$" + "\\1;\\2;\\3" + RES + "${GCOV_LINE}") + + # Check if we should exclude lines using the Lcov syntax. + string(REGEX MATCH "LCOV_EXCL_START" START_SKIP "${GCOV_LINE}") + string(REGEX MATCH "LCOV_EXCL_END" END_SKIP "${GCOV_LINE}") + string(REGEX MATCH "LCOV_EXCL_LINE" LINE_SKIP "${GCOV_LINE}") + + set(RESET_SKIP 0) + if (LINE_SKIP AND NOT DO_SKIP) + set(DO_SKIP 1) + set(RESET_SKIP 1) + endif() + + if (START_SKIP) + set(DO_SKIP 1) + message("${GCOV_LINE_COUNT}: Start skip") + endif() + + if (END_SKIP) + set(DO_SKIP 0) + endif() + + list(LENGTH RES RES_COUNT) + + if (RES_COUNT GREATER 2) + list(GET RES 0 HITCOUNT) + list(GET RES 1 LINE) + list(GET RES 2 SOURCE) + + string(STRIP ${HITCOUNT} HITCOUNT) + string(STRIP ${LINE} LINE) + + # Lines with 0 line numbers are metadata and can be ignored. + if (NOT ${LINE} EQUAL 0) + + if (DO_SKIP) + set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}null, ") + else() + # Translate the hitcount into valid JSON values. + if (${HITCOUNT} STREQUAL "#####" OR ${HITCOUNT} STREQUAL "=====") + set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}0, ") + elseif (${HITCOUNT} STREQUAL "-") + set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}null, ") + else() + set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}${HITCOUNT}, ") + endif() + endif() + endif() + else() + message(WARNING "Failed to properly parse line (RES_COUNT = ${RES_COUNT}) ${GCOV_FILE}:${GCOV_LINE_COUNT}\n-->${GCOV_LINE}") + endif() + + if (RESET_SKIP) + set(DO_SKIP 0) + endif() + math(EXPR GCOV_LINE_COUNT "${GCOV_LINE_COUNT}+1") + endforeach() + + message("${GCOV_LINE_COUNT} of ${LINE_COUNT} lines read!") + + # Advanced way of removing the trailing comma in the JSON array. + # "[1, 2, 3, " -> "[1, 2, 3" + string(REGEX REPLACE ",[ ]*$" "" GCOV_FILE_COVERAGE ${GCOV_FILE_COVERAGE}) + + # Append the trailing ] to complete the JSON array. + set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}]") + + # Generate the final JSON for this file. + message("Generate JSON for file: ${GCOV_SRC_REL_PATH}...") + string(CONFIGURE ${SRC_FILE_TEMPLATE} FILE_JSON) + + set(JSON_GCOV_FILES "${JSON_GCOV_FILES}${FILE_JSON}, ") +endforeach() + +# Loop through all files we couldn't find any coverage for +# as well, and generate JSON for those as well with 0% coverage. +foreach(NOT_COVERED_SRC ${COVERAGE_SRCS_REMAINING}) + + # Set variables for json replacement + set(GCOV_SRC_PATH ${NOT_COVERED_SRC}) + file(MD5 "${GCOV_SRC_PATH}" GCOV_CONTENTS_MD5) + file(RELATIVE_PATH GCOV_SRC_REL_PATH "${PROJECT_ROOT}" "${GCOV_SRC_PATH}") + + # Loads the source file as a list of lines. + file(STRINGS ${NOT_COVERED_SRC} SRC_LINES) + + set(GCOV_FILE_COVERAGE "[") + set(GCOV_FILE_SOURCE "") + + foreach (SOURCE ${SRC_LINES}) + set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}null, ") + + string(REPLACE "\\" "\\\\" SOURCE "${SOURCE}") + string(REGEX REPLACE "\"" "\\\\\"" SOURCE "${SOURCE}") + string(REPLACE "\t" "\\\\t" SOURCE "${SOURCE}") + string(REPLACE "\r" "\\\\r" SOURCE "${SOURCE}") + set(GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}${SOURCE}\\n") + endforeach() + + # Remove trailing comma, and complete JSON array with ] + string(REGEX REPLACE ",[ ]*$" "" GCOV_FILE_COVERAGE ${GCOV_FILE_COVERAGE}) + set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}]") + + # Generate the final JSON for this file. + message("Generate JSON for non-gcov file: ${NOT_COVERED_SRC}...") + string(CONFIGURE ${SRC_FILE_TEMPLATE} FILE_JSON) + set(JSON_GCOV_FILES "${JSON_GCOV_FILES}${FILE_JSON}, ") +endforeach() + +# Get rid of trailing comma. +string(REGEX REPLACE ",[ ]*$" "" JSON_GCOV_FILES ${JSON_GCOV_FILES}) +set(JSON_GCOV_FILES "${JSON_GCOV_FILES}]") + +# Generate the final complete JSON! +message("Generate final JSON...") +string(CONFIGURE ${JSON_TEMPLATE} JSON) + +file(WRITE "${COVERALLS_OUTPUT_FILE}" "${JSON}") +message("###########################################################################") +message("Generated coveralls JSON containing coverage data:") +message("${COVERALLS_OUTPUT_FILE}") +message("###########################################################################") diff --git a/rmf_traffic/thirdparty/fcl/CMakeModules/FindEigen3.cmake b/rmf_traffic/thirdparty/fcl/CMakeModules/FindEigen3.cmake new file mode 100644 index 00000000..cea1afea --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CMakeModules/FindEigen3.cmake @@ -0,0 +1,90 @@ +# - Try to find Eigen3 lib +# +# This module supports requiring a minimum version, e.g. you can do +# find_package(Eigen3 3.1.2) +# to require version 3.1.2 or newer of Eigen3. +# +# Once done this will define +# +# EIGEN3_FOUND - system has eigen lib with correct version +# EIGEN3_INCLUDE_DIR - the eigen include directory +# EIGEN3_VERSION - eigen version +# +# This module reads hints about search locations from +# the following enviroment variables: +# +# EIGEN3_ROOT +# EIGEN3_ROOT_DIR + +# Copyright (c) 2006, 2007 Montel Laurent, +# Copyright (c) 2008, 2009 Gael Guennebaud, +# Copyright (c) 2009 Benoit Jacob +# Redistribution and use is allowed according to the terms of the 2-clause BSD license. + +if(NOT Eigen3_FIND_VERSION) + if(NOT Eigen3_FIND_VERSION_MAJOR) + set(Eigen3_FIND_VERSION_MAJOR 2) + endif(NOT Eigen3_FIND_VERSION_MAJOR) + if(NOT Eigen3_FIND_VERSION_MINOR) + set(Eigen3_FIND_VERSION_MINOR 91) + endif(NOT Eigen3_FIND_VERSION_MINOR) + if(NOT Eigen3_FIND_VERSION_PATCH) + set(Eigen3_FIND_VERSION_PATCH 0) + endif(NOT Eigen3_FIND_VERSION_PATCH) + + set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}") +endif(NOT Eigen3_FIND_VERSION) + +macro(_eigen3_check_version) + file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) + + string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") + set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}") + string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") + set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}") + string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") + set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}") + + set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}) + if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) + set(EIGEN3_VERSION_OK FALSE) + else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) + set(EIGEN3_VERSION_OK TRUE) + endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) + + if(NOT EIGEN3_VERSION_OK) + + message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, " + "but at least version ${Eigen3_FIND_VERSION} is required") + endif(NOT EIGEN3_VERSION_OK) +endmacro(_eigen3_check_version) + +if (EIGEN3_INCLUDE_DIR) + + # in cache already + _eigen3_check_version() + set(EIGEN3_FOUND ${EIGEN3_VERSION_OK}) + +else (EIGEN3_INCLUDE_DIR) + + find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library + HINTS + ENV EIGEN3_ROOT + ENV EIGEN3_ROOT_DIR + PATHS + ${CMAKE_INSTALL_PREFIX}/include + ${KDE4_INCLUDE_DIR} + PATH_SUFFIXES eigen3 eigen + ) + + if(EIGEN3_INCLUDE_DIR) + _eigen3_check_version() + endif(EIGEN3_INCLUDE_DIR) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) + + mark_as_advanced(EIGEN3_INCLUDE_DIR) + +endif(EIGEN3_INCLUDE_DIR) + diff --git a/rmf_traffic/thirdparty/fcl/CMakeModules/cmake_uninstall.cmake.in b/rmf_traffic/thirdparty/fcl/CMakeModules/cmake_uninstall.cmake.in new file mode 100644 index 00000000..14cd01d2 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CMakeModules/cmake_uninstall.cmake.in @@ -0,0 +1,21 @@ +if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +string(REGEX REPLACE "\n" ";" files "${files}") +foreach(file ${files}) + message(STATUS "Uninstalling $ENV{DESTDIR}${file}") + if(EXISTS "$ENV{DESTDIR}${file}") + execute_process( + COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" + OUTPUT_VARIABLE rm_out + RESULT_VARIABLE rm_retval + ) + if(NOT "${rm_retval}" STREQUAL 0) + message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") + endif(NOT "${rm_retval}" STREQUAL 0) + else(EXISTS "$ENV{DESTDIR}${file}") + message(STATUS "File $ENV{DESTDIR}${file} does not exist.") + endif(EXISTS "$ENV{DESTDIR}${file}") +endforeach(file) diff --git a/rmf_traffic/thirdparty/fcl/CPPLINT.cfg b/rmf_traffic/thirdparty/fcl/CPPLINT.cfg new file mode 100644 index 00000000..e9c47a60 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CPPLINT.cfg @@ -0,0 +1,36 @@ +# Copyright (c) 2018, Toyota Research Institute, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# Author: Jamie Snape, Kitware, Inc. + +set noparent + +extensions=cc,cpp,h +filter=-build/c++11,-build/c++14 +root=include diff --git a/rmf_traffic/thirdparty/fcl/CTestConfig.cmake b/rmf_traffic/thirdparty/fcl/CTestConfig.cmake new file mode 100644 index 00000000..6871b27a --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CTestConfig.cmake @@ -0,0 +1,40 @@ +# -*- mode: cmake -*- +# vi: set ft=cmake : + +# Copyright (c) 2018, Toyota Research Institute, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# Author: Jamie Snape, Kitware, Inc. + +set(CTEST_PROJECT_NAME fcl) +set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") +set(CTEST_DROP_METHOD https) +set(CTEST_DROP_SITE drake-cdash.csail.mit.edu) +set(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}") +set(CTEST_DROP_SITE_CDASH ON) diff --git a/rmf_traffic/thirdparty/fcl/CTestCustom.cmake.in b/rmf_traffic/thirdparty/fcl/CTestCustom.cmake.in new file mode 100644 index 00000000..dffbdfa6 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/CTestCustom.cmake.in @@ -0,0 +1,38 @@ +# -*- mode: cmake -*- +# vi: set ft=cmake : + +# Copyright (c) 2018, Toyota Research Institute, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# Author: Jamie Snape, Kitware, Inc. + +list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE ".*/test/.*") + +set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 128) +set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 128) diff --git a/rmf_traffic/thirdparty/fcl/INSTALL b/rmf_traffic/thirdparty/fcl/INSTALL new file mode 100644 index 00000000..7e1b16ba --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/INSTALL @@ -0,0 +1,32 @@ + +Dependencies: +============ + + - Eigen (available at http://eigen.tuxfamily.org/) + - libccd (available at http://libccd.danfis.cz/) + - octomap (optional dependency, available at http://octomap.github.com) + +Eigen and libccd are mandatory dependencies. If octomap is not found, +collision detection with octrees will not be possible. + +For installation, CMake will also be needed (http://cmake.org). + +Install: +======= + +* Linux / Mac OS: + The CMakeLists.txt can be used to generate makefiles; For example, one may use operations such as: + + mkdir build + cd build + cmake .. + make -jN # N is the maximum number of parallel compile jobs + +Once the compilation is finished, + make install +will install the project. To specify the installation prefix, +pass the parameter -DCMAKE_INSTALL_PREFIX=/my/prefix/ to the "cmake .." command above. + + +* Visual Studio (2015 or higher is required): + The CMakeLists.txt can be used to generate a Visual Studio project, using the cmake build tool. diff --git a/rmf_traffic/thirdparty/fcl/LICENSE b/rmf_traffic/thirdparty/fcl/LICENSE new file mode 100644 index 00000000..23afe492 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/LICENSE @@ -0,0 +1,32 @@ +Software License Agreement (BSD License) + + Copyright (c) 2008-2014, Willow Garage, Inc. + Copyright (c) 2014-2016, Open Source Robotics Foundation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Open Source Robotics Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. diff --git a/rmf_traffic/thirdparty/fcl/README.md b/rmf_traffic/thirdparty/fcl/README.md new file mode 100644 index 00000000..33889548 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/README.md @@ -0,0 +1,233 @@ +## FCL -- The Flexible Collision Library + +Linux / OS X [![Build Status](https://travis-ci.org/flexible-collision-library/fcl.svg?branch=master)](https://travis-ci.org/flexible-collision-library/fcl) +Windows [![Build status](https://ci.appveyor.com/api/projects/status/do1k727uu6e8uemf/branch/master?svg=true)](https://ci.appveyor.com/project/flexible-collision-library/fcl) +Coverage [![Coverage Status](https://coveralls.io/repos/github/flexible-collision-library/fcl/badge.svg?branch=master)](https://coveralls.io/github/flexible-collision-library/fcl?branch=master) + +FCL is a library for performing three types of proximity queries on a pair of +geometric models composed of triangles. + - Collision detection: detecting whether the two models overlap, and + optionally, all of the triangles that overlap. + - Distance computation: computing the minimum distance between a pair of + models, i.e., the distance between the closest pair of points. + - Tolerance verification: determining whether two models are closer or farther + than a tolerance distance. + - Continuous collision detection: detecting whether the two moving models + overlap during the movement, and optionally, the time of contact. + - Contact information: for collision detection and continuous collision + detection, the contact information (including contact normals and contact + points) can be returned optionally. + +FCL has the following features + - C++ interface + - Compilable for either linux or win32 (both makefiles and Microsoft Visual + projects can be generated using cmake) + - No special topological constraints or adjacency information required for + input models – all that is necessary is a list of the model's triangles + - Supported different object shapes: + + box + + sphere + + ellipsoid + + capsule + + cone + + cylinder + + convex + + half-space + + plane + + mesh + + octree (optional, octrees are represented using the octomap library + http://octomap.github.com) + + +## Installation + +Before compiling FCL, please make sure Eigen and libccd (for collision checking +between convex objects and is available here https://github.com/danfis/libccd) +are installed. For libccd, make sure to compile from github version instead of +the zip file from the webpage, because one bug fixing is not included in the +zipped version. + +Some optional libraries need to be installed for some optional capability of +FCL. For octree collision, please install the octomap library from +http://octomap.github.com. + +CMakeLists.txt is used to generate makefiles in Linux or Visual studio projects +in windows. In command line, run +``` cmake +mkdir build +cd build +cmake .. +``` +Next, in linux, use make to compile the code. + +In windows, there will generate a visual studio project and then you can compile +the code. + +## Interfaces +Before starting the proximity computation, we need first to set the geometry and +transform for the objects involving in computation. The geometry of an object is +represented as a mesh soup, which can be set as follows: + +```cpp +// set mesh triangles and vertice indices +std::vector vertices; +std::vector triangles; +// code to set the vertices and triangles +... +// BVHModel is a template class for mesh geometry, for default OBBRSS template +// is used +typedef BVHModel Model; +std::shared_ptr geom = std::make_shared(); +// add the mesh data into the BVHModel structure +geom->beginModel(); +geom->addSubModel(vertices, triangles); +geom->endModel(); +``` + +The transform of an object includes the rotation and translation: +```cpp +// R and T are the rotation matrix and translation vector +Matrix3f R; +Vector3f T; +// code for setting R and T +... +// transform is configured according to R and T +Transform3f pose = Transform3f::Identity(); +pose.linear() = R; +pose.translation() = T; +``` + + +Given the geometry and the transform, we can also combine them together to +obtain a collision object instance and here is an example: +```cpp +//geom and tf are the geometry and the transform of the object +std::shared_ptr> geom = ... +Transform3f tf = ... +//Combine them together +CollisionObjectf* obj = new CollisionObjectf(geom, tf); +``` + +Once the objects are set, we can perform the proximity computation between them. +All the proximity queries in FCL follow a common pipeline: first, set the query +request data structure and then run the query function by using request as the +input. The result is returned in a query result data structure. For example, for +collision checking, we first set the CollisionRequest data structure, and then +run the collision function: +```cpp +// Given two objects o1 and o2 +CollisionObjectf* o1 = ... +CollisionObjectf* o2 = ... +// set the collision request structure, here we just use the default setting +CollisionRequest request; +// result will be returned via the collision result structure +CollisionResult result; +// perform collision test +collide(o1, o2, request, result); +``` + +By setting the collision request, the user can easily choose whether to return +contact information (which is slower) or just return binary collision results +(which is faster). + + +For distance computation, the pipeline is almost the same: + +```cpp +// Given two objects o1 and o2 +CollisionObjectf* o1 = ... +CollisionObjectf* o2 = ... +// set the distance request structure, here we just use the default setting +DistanceRequest request; +// result will be returned via the collision result structure +DistanceResult result; +// perform distance test +distance(o1, o2, request, result); +``` + +For continuous collision, FCL requires the goal transform to be provided (the +initial transform is included in the collision object data structure). Beside +that, the pipeline is almost the same as distance/collision: + +```cpp +// Given two objects o1 and o2 +CollisionObjectf* o1 = ... +CollisionObjectf* o2 = ... +// The goal transforms for o1 and o2 +Transform3f tf_goal_o1 = ... +Transform3f tf_goal_o2 = ... +// set the continuous collision request structure, here we just use the default +// setting +ContinuousCollisionRequest request; +// result will be returned via the continuous collision result structure +ContinuousCollisionResult result; +// perform continuous collision test +continuousCollide(o1, tf_goal_o1, o2, tf_goal_o2, request, result); +``` + +FCL supports broadphase collision/distance between two groups of objects and can +avoid the n square complexity. For collision, broadphase algorithm can return +all the collision pairs. For distance, it can return the pair with the minimum +distance. FCL uses a CollisionManager structure to manage all the objects +involving the collision or distance operations. +```cpp +// Initialize the collision manager for the first group of objects. +// FCL provides various different implementations of CollisionManager. +// Generally, the DynamicAABBTreeCollisionManager would provide the best +// performance. +BroadPhaseCollisionManagerf* manager1 = new DynamicAABBTreeCollisionManagerf(); +// Initialize the collision manager for the second group of objects. +BroadPhaseCollisionManagerf* manager2 = new DynamicAABBTreeCollisionManagerf(); +// To add objects into the collision manager, using +// BroadPhaseCollisionManager::registerObject() function to add one object +std::vector objects1 = ... +for(std::size_t i = 0; i < objects1.size(); ++i) +manager1->registerObject(objects1[i]); +// Another choose is to use BroadPhaseCollisionManager::registerObjects() +// function to add a set of objects +std::vector objects2 = ... +manager2->registerObjects(objects2); +// In order to collect the information during broadphase, CollisionManager +// requires two settings: +// a) a callback to collision or distance; +// b) an intermediate data to store the information generated during the +// broadphase computation. +// For convenience, FCL provides default callbacks to satisfy a) and a +// corresponding call back data to satisfy b) for both collision and distance +// queries. For collision use DefaultCollisionCallback and DefaultCollisionData +// and for distance use DefaultDistanceCallback and DefaultDistanceData. +// The default collision/distance data structs are simply containers which +// include the request and distance structures for each query type as mentioned +// above. +DefaultCollisionData collision_data; +DefaultDistanceData distance_data; +// Setup the managers, which is related with initializing the broadphase +// acceleration structure according to objects input +manager1->setup(); +manager2->setup(); +// Examples for various queries +// 1. Collision query between two object groups and get collision numbers +manager2->collide(manager1, &collision_data, DefaultCollisionFunction); +int n_contact_num = collision_data.result.numContacts(); +// 2. Distance query between two object groups and get the minimum distance +manager2->distance(manager1, &distance_data, DefaultDistanceFunction); +double min_distance = distance_data.result.min_distance; +// 3. Self collision query for group 1 +manager1->collide(&collision_data, DefaultCollisionFunction); +// 4. Self distance query for group 1 +manager1->distance(&distance_data, DefaultDistanceFunction); +// 5. Collision query between one object in group 1 and the entire group 2 +manager2->collide(objects1[0], &collision_data, DefaultCollisionFunction); +// 6. Distance query between one object in group 1 and the entire group 2 +manager2->distance(objects1[0], &distance_data, DefaultDistanceFunction); +``` + + +For more examples, please refer to the test folder: +- test_fcl_collision.cpp: provide examples for collision test +- test_fcl_distance.cpp: provide examples for distance test +- test_fcl_broadphase.cpp: provide examples for broadphase collision/distance + test +- test_fcl_frontlist.cpp: provide examples for frontlist collision acceleration +- test_fcl_octomap.cpp: provide examples for collision/distance computation + between octomap data and other data types. diff --git a/rmf_traffic/thirdparty/fcl/ci/install_linux.sh b/rmf_traffic/thirdparty/fcl/ci/install_linux.sh new file mode 100755 index 00000000..8ca130d5 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/ci/install_linux.sh @@ -0,0 +1,15 @@ +sudo add-apt-repository --yes ppa:libccd-debs/ppa +sudo apt-get -qq update + +sudo apt-get -qq --yes --force-yes install libeigen3-dev +sudo apt-get -qq --yes --force-yes install libccd-dev + +# Octomap +git clone https://github.com/OctoMap/octomap +cd octomap +git checkout tags/v1.8.0 +mkdir build +cd build +cmake .. +make +sudo make install diff --git a/rmf_traffic/thirdparty/fcl/ci/install_osx.sh b/rmf_traffic/thirdparty/fcl/ci/install_osx.sh new file mode 100755 index 00000000..867493dc --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/ci/install_osx.sh @@ -0,0 +1,16 @@ +brew update > /dev/null + +brew install git +brew install cmake +brew install eigen +brew install libccd + +# Octomap +git clone https://github.com/OctoMap/octomap +cd octomap +git checkout tags/v1.8.0 +mkdir build +cd build +cmake .. +make +sudo make install diff --git a/rmf_traffic/thirdparty/fcl/doc/Doxyfile.in b/rmf_traffic/thirdparty/fcl/doc/Doxyfile.in new file mode 100644 index 00000000..a366f208 --- /dev/null +++ b/rmf_traffic/thirdparty/fcl/doc/Doxyfile.in @@ -0,0 +1,2425 @@ +# Doxyfile 1.8.11 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "FCL" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = "@FCL_VERSION@" + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "Flexible Collision Library" + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = "@DOXYGEN_OUTPUT_ROOT@" + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = @DOXYGEN_INPUT_ROOT@ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, +# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /