PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
|
Edge-edge continuous collision detection (CCD) implementation. More...
#include "pbat/HostDevice.h"
#include "pbat/geometry/ClosestPointQueries.h"
#include "pbat/math/linalg/mini/Concepts.h"
#include "pbat/math/linalg/mini/Matrix.h"
#include "pbat/math/linalg/mini/Reductions.h"
#include "pbat/math/polynomial/Roots.h"
#include <array>
#include <cmath>
Go to the source code of this file.
Namespaces | |
namespace | pbat |
The main namespace of the library. | |
namespace | pbat::geometry |
Geometric queries, quantities and data structures. | |
Functions | |
template<math::linalg::mini::CReadableVectorizedMatrix TP1T, math::linalg::mini::CReadableVectorizedMatrix TQ1T, math::linalg::mini::CReadableVectorizedMatrix TP2T, math::linalg::mini::CReadableVectorizedMatrix TQ2T, math::linalg::mini::CReadableVectorizedMatrix TP1, math::linalg::mini::CReadableVectorizedMatrix TQ1, math::linalg::mini::CReadableVectorizedMatrix TP2, math::linalg::mini::CReadableVectorizedMatrix TQ2, class TScalar = typename TP1T::ScalarType> | |
PBAT_HOST_DEVICE std::array< TScalar, 4 > | pbat::geometry::detail::EdgeEdgeCcdUnivariatePolynomial (TP1T const &P1T, TQ1T const &Q1T, TP2T const &P2T, TQ2T const &Q2T, TP1 const &P1, TQ1 const &Q1, TP2 const &P2, TQ2 const &Q2) |
Computes the univariate linearly swept edge-edge co-planarity polynomial. | |
template<math::linalg::mini::CReadableVectorizedMatrix TP1T, math::linalg::mini::CReadableVectorizedMatrix TQ1T, math::linalg::mini::CReadableVectorizedMatrix TP2T, math::linalg::mini::CReadableVectorizedMatrix TQ2T, math::linalg::mini::CReadableVectorizedMatrix TP1, math::linalg::mini::CReadableVectorizedMatrix TQ1, math::linalg::mini::CReadableVectorizedMatrix TP2, math::linalg::mini::CReadableVectorizedMatrix TQ2, class TScalar = typename TP1T::ScalarType> | |
PBAT_HOST_DEVICE auto | pbat::geometry::EdgeEdgeCcd (TP1T const &P1T, TQ1T const &Q1T, TP2T const &P2T, TQ2T const &Q2T, TP1 const &P1, TQ1 const &Q1, TP2 const &P2, TQ2 const &Q2) -> math::linalg::mini::SVector< TScalar, 3 > |
Computes the time of impact \( t^* \) and barycentric coordinates \( \mathbf{\beta} \) of the intersection point between an edge \( (P1,Q1) \) and another edge \( (P2,Q2) \) moving along a linear trajectory. | |
Edge-edge continuous collision detection (CCD) implementation.
PBAT_HOST_DEVICE std::array< TScalar, 4 > pbat::geometry::detail::EdgeEdgeCcdUnivariatePolynomial | ( | TP1T const & | P1T, |
TQ1T const & | Q1T, | ||
TP2T const & | P2T, | ||
TQ2T const & | Q2T, | ||
TP1 const & | P1, | ||
TQ1 const & | Q1, | ||
TP2 const & | P2, | ||
TQ2 const & | Q2 ) |
Computes the univariate linearly swept edge-edge co-planarity polynomial.
\[\langle \mathbf{n}(t), \mathbf{q}(t) \rangle = 0 , \]
where \( \mathbf{n}(t) = (\mathbf{q}_1(t) - \mathbf{p}_1(t)) \times (\mathbf{q}_2(t) - \mathbf{p}_2(t)) \) and \( \mathbf{q}(t) = \mathbf{x}(t) - \mathbf{p}_1(t) \)
TP1T | Type of the input matrix P1T |
TQ1T | Type of the input matrix Q1T |
TP2T | Type of the input matrix P2T |
TQ2T | Type of the input matrix Q2T |
TP1 | Type of the input matrix P1 |
TQ1 | Type of the input matrix Q1 |
TP2 | Type of the input matrix P2 |
TQ2 | Type of the input matrix Q2 |
TScalar | Type of the scalar |
P1T | Matrix of the initial positions of the point P on edge 1 |
Q1T | Matrix of the initial positions of the point Q on edge 1 |
P2T | Matrix of the initial positions of the point P on edge 2 |
Q2T | Matrix of the initial positions of the point Q on edge 2 |
P1 | Matrix of the final positions of the point P on edge 1 |
Q1 | Matrix of the final positions of the point Q on edge 1 |
P2 | Matrix of the final positions of the point P on edge 2 |
Q2 | Matrix of the final positions of the point Q on edge 2 |