IDConfigEigen.hpp 956 B

1234567891011121314151617181920212223242526272829303132
  1. ///@file Configuration for Inverse Dynamics Library with Eigen
  2. #ifndef INVDYNCONFIG_EIGEN_HPP_
  3. #define INVDYNCONFIG_EIGEN_HPP_
  4. #define btInverseDynamics btInverseDynamicsEigen
  5. #ifdef BT_USE_DOUBLE_PRECISION
  6. // choose double/single precision version
  7. typedef double idScalar;
  8. #else
  9. typedef float idScalar;
  10. #endif
  11. // use std::vector for arrays
  12. #include <vector>
  13. // this is to make it work with C++2003, otherwise we could do this
  14. // template <typename T>
  15. // using idArray = std::vector<T>;
  16. template <typename T>
  17. struct idArray
  18. {
  19. typedef std::vector<T> type;
  20. };
  21. typedef std::vector<int>::size_type idArrayIdx;
  22. // default to standard malloc/free
  23. #include <cstdlib>
  24. #define ID_DECLARE_ALIGNED_ALLOCATOR() EIGEN_MAKE_ALIGNED_OPERATOR_NEW
  25. // Note on interfaces:
  26. // Eigen::Matrix has data(), to get c-array storage
  27. // HOWEVER: default storage is column-major!
  28. #define ID_LINEAR_MATH_USE_EIGEN
  29. #include "Eigen/Eigen"
  30. #include "details/IDEigenInterface.hpp"
  31. #endif