39#ifndef COAL_DATA_TYPES_H 40#define COAL_DATA_TYPES_H 43#include <Eigen/Geometry> 45#include "coal/config.hh" 47#ifdef COAL_HAS_OCTOMAP 48#define OCTOMAP_VERSION_AT_LEAST(x, y, z) \ 49 (OCTOMAP_MAJOR_VERSION > x || \ 50 (OCTOMAP_MAJOR_VERSION >= x && \ 51 (OCTOMAP_MINOR_VERSION > y || \ 52 (OCTOMAP_MINOR_VERSION >= y && OCTOMAP_PATCH_VERSION >= z)))) 54#define OCTOMAP_VERSION_AT_MOST(x, y, z) \ 55 (OCTOMAP_MAJOR_VERSION < x || \ 56 (OCTOMAP_MAJOR_VERSION <= x && \ 57 (OCTOMAP_MINOR_VERSION < y || \ 58 (OCTOMAP_MINOR_VERSION <= y && OCTOMAP_PATCH_VERSION <= z)))) 62#ifdef COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL 65typedef double FCL_REAL;
66typedef Eigen::Matrix<FCL_REAL, 3, 1> Vec3f;
67typedef Eigen::Matrix<FCL_REAL, 2, 1> Vec2f;
68typedef Eigen::Matrix<FCL_REAL, 6, 1> Vec6f;
69typedef Eigen::Matrix<FCL_REAL, Eigen::Dynamic, 1> VecXf;
70typedef Eigen::Matrix<FCL_REAL, 3, 3> Matrix3f;
71typedef Eigen::Matrix<FCL_REAL, Eigen::Dynamic, 3, Eigen::RowMajor> Matrixx3f;
72typedef Eigen::Matrix<FCL_REAL, Eigen::Dynamic, 2, Eigen::RowMajor> Matrixx2f;
73typedef Eigen::Matrix<FCL_REAL, Eigen::Dynamic, Eigen::Dynamic> MatrixXf;
77typedef Eigen::Matrix<CoalScalar, 3, 1>
Vec3s;
78typedef Eigen::Matrix<CoalScalar, 2, 1>
Vec2s;
79typedef Eigen::Matrix<CoalScalar, 6, 1>
Vec6s;
80typedef Eigen::Matrix<CoalScalar, Eigen::Dynamic, 1>
VecXs;
81typedef Eigen::Matrix<CoalScalar, 3, 3>
Matrix3s;
82typedef Eigen::Matrix<CoalScalar, Eigen::Dynamic, 3, Eigen::RowMajor>
MatrixX3s;
83typedef Eigen::Matrix<CoalScalar, Eigen::Dynamic, 2, Eigen::RowMajor>
MatrixX2s;
84typedef Eigen::Matrix<Eigen::DenseIndex, Eigen::Dynamic, 3, Eigen::RowMajor>
86typedef Eigen::Matrix<CoalScalar, Eigen::Dynamic, Eigen::Dynamic>
MatrixXs;
137 return vids[0] == other.vids[0] && vids[1] == other.vids[1] &&
138 vids[2] == other.vids[2];
144 return vids[0] != (std::numeric_limits<index_type>::max)() &&
145 vids[1] != (std::numeric_limits<index_type>::max)() &&
146 vids[2] != (std::numeric_limits<index_type>::max)();
151 index_type vids[3] = {(std::numeric_limits<index_type>::max)(),
152 (std::numeric_limits<index_type>::max)(),
153 (std::numeric_limits<index_type>::max)()};
183 return vids[0] == other.vids[0] && vids[1] == other.vids[1] &&
184 vids[2] == other.vids[2] && vids[3] == other.vids[3];
188 return !(*
this == other);
int size_type
Definition data_types.h:114
bool isValid() const
Definition data_types.h:143
bool operator!=(const Triangle &other) const
Definition data_types.h:141
index_type operator[](index_type i) const
Access the triangle index.
Definition data_types.h:130
void set(index_type p1, index_type p2, index_type p3)
Set the vertex indices of the triangle.
Definition data_types.h:123
bool operator==(const Triangle &other) const
Definition data_types.h:136
static size_type size()
Definition data_types.h:134
Triangle(index_type p1, index_type p2, index_type p3)
Create a triangle with given vertex indices.
Definition data_types.h:120
index_type & operator[](index_type i)
Definition data_types.h:132
Triangle()
Default constructor.
Definition data_types.h:117
std::size_t index_type
Definition data_types.h:113
Main namespace.
Definition broadphase_bruteforce.h:44
Eigen::Matrix< CoalScalar, 6, 1 > Vec6s
Definition data_types.h:79
Eigen::Matrix< CoalScalar, 3, 3 > Matrix3s
Definition data_types.h:81
Eigen::Matrix< CoalScalar, Eigen::Dynamic, 1 > VecXs
Definition data_types.h:80
GJKConvergenceCriterionType
Wether the convergence criterion is scaled on the norm of the solution or not.
Definition data_types.h:108
@ Absolute
Definition data_types.h:108
@ Relative
Definition data_types.h:108
Eigen::Matrix< CoalScalar, Eigen::Dynamic, Eigen::Dynamic > MatrixXs
Definition data_types.h:86
Eigen::Matrix< CoalScalar, 2, 1 > Vec2s
Definition data_types.h:78
Eigen::Vector2i support_func_guess_t
Definition data_types.h:87
Eigen::Matrix< Eigen::DenseIndex, Eigen::Dynamic, 3, Eigen::RowMajor > Matrixx3i
Definition data_types.h:85
GJKConvergenceCriterion
Which convergence criterion is used to stop the algorithm (when the shapes are not in collision)....
Definition data_types.h:104
@ Default
Definition data_types.h:104
@ Hybrid
Definition data_types.h:104
@ DualityGap
Definition data_types.h:104
GJKInitialGuess
Initial guess to use for the GJK algorithm DefaultGuess: Vec3s(1, 0, 0) CachedGuess: previous vector ...
Definition data_types.h:95
@ DefaultGuess
Definition data_types.h:95
@ BoundingVolumeGuess
Definition data_types.h:95
@ CachedGuess
Definition data_types.h:95
Eigen::Matrix< CoalScalar, Eigen::Dynamic, 3, Eigen::RowMajor > MatrixX3s
Definition data_types.h:82
Eigen::Matrix< CoalScalar, Eigen::Dynamic, 2, Eigen::RowMajor > MatrixX2s
Definition data_types.h:83
Eigen::Matrix< CoalScalar, 3, 1 > Vec3s
Definition data_types.h:77
double CoalScalar
Definition data_types.h:76
GJKVariant
Variant to use for the GJK algorithm.
Definition data_types.h:98
@ NesterovAcceleration
Definition data_types.h:98
@ DefaultGJK
Definition data_types.h:98
@ PolyakAcceleration
Definition data_types.h:98
bool operator==(const Quadrilateral &other) const
Definition data_types.h:182
void set(index_type p0, index_type p1, index_type p2, index_type p3)
Set the vertex indices of the quadrilateral.
Definition data_types.h:168
Quadrilateral(index_type p0, index_type p1, index_type p2, index_type p3)
Definition data_types.h:163
static size_type size()
Definition data_types.h:180
index_type & operator[](index_type i)
Definition data_types.h:178
index_type operator[](index_type i) const
@access the quadrilateral index
Definition data_types.h:176
bool operator!=(const Quadrilateral &other) const
Definition data_types.h:187
int size_type
Definition data_types.h:159
Quadrilateral()
Definition data_types.h:161
std::size_t index_type
Definition data_types.h:158