|
PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
|
Point-triangle continuous collision detection (CCD) implementation. More...
#include "IntersectionQueries.h"#include "pbat/HostDevice.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 TXT, math::linalg::mini::CReadableVectorizedMatrix TAT, math::linalg::mini::CReadableVectorizedMatrix TBT, math::linalg::mini::CReadableVectorizedMatrix TCT, math::linalg::mini::CReadableVectorizedMatrix TX, math::linalg::mini::CReadableVectorizedMatrix TA, math::linalg::mini::CReadableVectorizedMatrix TB, math::linalg::mini::CReadableVectorizedMatrix TC, class TScalar = typename TX::ScalarType> | |
| PBAT_HOST_DEVICE std::array< TScalar, 4 > | pbat::geometry::detail::PointTriangleCcdUnivariatePolynomial (TXT const &XT, TAT const &AT, TBT const &BT, TCT const &CT, TX const &X, TA const &A, TB const &B, TC const &C) |
| Computes the univariate linearly swept point-triangle co-planarity polynomial. | |
| template<math::linalg::mini::CReadableVectorizedMatrix TXT, math::linalg::mini::CReadableVectorizedMatrix TAT, math::linalg::mini::CReadableVectorizedMatrix TBT, math::linalg::mini::CReadableVectorizedMatrix TCT, math::linalg::mini::CReadableVectorizedMatrix TX, math::linalg::mini::CReadableVectorizedMatrix TA, math::linalg::mini::CReadableVectorizedMatrix TB, math::linalg::mini::CReadableVectorizedMatrix TC, class TScalar = typename TXT::ScalarType> | |
| PBAT_HOST_DEVICE auto | pbat::geometry::PointTriangleCcd (TXT const &XT, TAT const &AT, TBT const &BT, TCT const &CT, TX const &X, TA const &A, TB const &B, TC const &C) -> math::linalg::mini::SVector< TScalar, 4 > |
| Computes the time of impact \( t^* \) and barycentric coordinates \( \mathbf{\beta} \) of the intersection point between a point and a triangle moving along a linear trajectory. | |
Point-triangle continuous collision detection (CCD) implementation.
| PBAT_HOST_DEVICE std::array< TScalar, 4 > pbat::geometry::detail::PointTriangleCcdUnivariatePolynomial | ( | TXT const & | XT, |
| TAT const & | AT, | ||
| TBT const & | BT, | ||
| TCT const & | CT, | ||
| TX const & | X, | ||
| TA const & | A, | ||
| TB const & | B, | ||
| TC const & | C ) |
Computes the univariate linearly swept point-triangle co-planarity polynomial.
\[\langle \mathbf{n}(t), \mathbf{q}(t) \rangle = 0 , \]
where \( \mathbf{n}(t) = (\mathbf{b}(t) - \mathbf{a}) \times (\mathbf{c}(t) - \mathbf{a}) \) and \( \mathbf{q}(t) = \mathbf{x}(t) - \mathbf{a} \)
| TXT | Type of the input matrix XT |
| TAT | Type of the input matrix AT |
| TBT | Type of the input matrix BT |
| TCT | Type of the input matrix CT |
| TX | Type of the input matrix X |
| TA | Type of the input matrix A |
| TB | Type of the input matrix B |
| TC | Type of the input matrix C |
| TScalar | Type of the scalar |
| XT | Matrix of the initial positions of the point |
| AT | Matrix of the initial positions of the triangle vertex A |
| BT | Matrix of the initial positions of the triangle vertex B |
| CT | Matrix of the initial positions of the triangle vertex C |
| X | Matrix of the final positions of the point |
| A | Matrix of the final positions of the triangle vertex A |
| B | Matrix of the final positions of the triangle vertex B |
| C | Matrix of the final positions of the triangle vertex C |