PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
|
This file contains functions to answer overlap queries. More...
#include "ClosestPointQueries.h"
#include "IntersectionQueries.h"
#include "pbat/HostDevice.h"
#include "pbat/common/ConstexprFor.h"
#include "pbat/math/linalg/mini/Mini.h"
#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. | |
namespace | pbat::geometry::OverlapQueries |
This namespace contains functions to answer overlap queries. | |
Functions | |
template<mini::CMatrix TMatrixP, mini::CMatrix TMatrixL, mini::CMatrix TMatrixU> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::PointAxisAlignedBoundingBox (TMatrixP const &P, TMatrixL const &L, TMatrixU const &U) |
Tests for overlap between point P and axis-aligned bounding box (L,U) | |
template<mini::CMatrix TMatrixP, mini::CMatrix TMatrixA, mini::CMatrix TMatrixB, mini::CMatrix TMatrixC> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::PointTriangle (TMatrixP const &P, TMatrixA const &A, TMatrixB const &B, TMatrixC const &C) |
Tests for overlap between point P and triangle ABC. | |
template<mini::CMatrix TMatrixP, mini::CMatrix TMatrixA, mini::CMatrix TMatrixB, mini::CMatrix TMatrixC, mini::CMatrix TMatrixD> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::PointTetrahedron3D (TMatrixP const &P, TMatrixA const &A, TMatrixB const &B, TMatrixC const &C, TMatrixD const &D) |
Checks if point P is contained in tetrahedron ABCD, in at least 3D. | |
template<mini::CMatrix TMatrixC1, mini::CMatrix TMatrixC2> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::Spheres (TMatrixC1 const &C1, typename TMatrixC1::ScalarType R1, TMatrixC2 const &C2, typename TMatrixC2::ScalarType R2) |
Tests for overlap between sphere (C1,R1) and sphere (C2,R2). | |
template<mini::CMatrix TMatrixL1, mini::CMatrix TMatrixU1, mini::CMatrix TMatrixL2, mini::CMatrix TMatrixU2> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::AxisAlignedBoundingBoxes (TMatrixL1 const &L1, TMatrixU1 const &U1, TMatrixL2 const &L2, TMatrixU2 const &U2) |
Tests for overlap between axis-aligned bounding box (L1,U1) and axis-aligned bounding box (L2,U2) | |
template<mini::CMatrix TMatrixC, mini::CMatrix TMatrixL, mini::CMatrix TMatrixU> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::SphereAxisAlignedBoundingBox (TMatrixC const &C, typename TMatrixC::ScalarType R, TMatrixL const &L, TMatrixU const &U) |
Tests for overlap between sphere (c,r) and axis-aligned bounding box (low,up) | |
template<mini::CMatrix TMatrixP, mini::CMatrix TMatrixQ, mini::CMatrix TMatrixC> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::LineSegmentSphere (TMatrixP const &P, TMatrixQ const &Q, TMatrixC const &C, typename TMatrixC::ScalarType R) |
Tests for overlap between line segment PQ and sphere (C,R) | |
template<mini::CMatrix TMatrixP, mini::CMatrix TMatrixQ, mini::CMatrix TMatrixL, mini::CMatrix TMatrixU> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::LineSegmentAxisAlignedBoundingBox (TMatrixP const &P, TMatrixQ const &Q, TMatrixL const &L, TMatrixU const &U) |
Tests for overlap between line segment PQ and axis-aligned bounding box (L,U) | |
template<mini::CMatrix TMatrixP, mini::CMatrix TMatrixQ, mini::CMatrix TMatrixA, mini::CMatrix TMatrixB, mini::CMatrix TMatrixC> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::LineSegmentTriangle3D (TMatrixP const &P, TMatrixQ const &Q, TMatrixA const &A, TMatrixB const &B, TMatrixC const &C) |
Detects if the line segment PQ passes through the triangle ABC, in 3D. | |
template<mini::CMatrix TMatrixP, mini::CMatrix TMatrixQ, mini::CMatrix TMatrixA1, mini::CMatrix TMatrixB1, mini::CMatrix TMatrixC1, mini::CMatrix TMatrixA2, mini::CMatrix TMatrixB2, mini::CMatrix TMatrixC2> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::LineSegmentSweptTriangle3D (TMatrixP const &P, TMatrixQ const &Q, TMatrixA1 const &A1, TMatrixB1 const &B1, TMatrixC1 const &C1, TMatrixA2 const &A2, TMatrixB2 const &B2, TMatrixC2 const &C2) |
Tests overlap between line segment PQ and the swept volume spanned by linear interpolation of A1B1C1 to A2B2C2. | |
template<mini::CMatrix TMatrixP, mini::CMatrix TMatrixN, mini::CMatrix TMatrixL, mini::CMatrix TMatrixU> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::PlaneAxisAlignedBoundingBox (TMatrixP const &P, TMatrixN const &n, TMatrixL const &L, TMatrixU const &U) |
Tests for overlap between plane (P,n) and axis-aligned bounding box (low,up) | |
template<mini::CMatrix TMatrixA, mini::CMatrix TMatrixB, mini::CMatrix TMatrixC, mini::CMatrix TMatrixL, mini::CMatrix TMatrixU> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::TriangleAxisAlignedBoundingBox (TMatrixA const &A, TMatrixB const &B, TMatrixC const &C, TMatrixL const &L, TMatrixU const &U) |
Tests for overlap between triangle ABC and axis-aligned bounding box (low,up) | |
template<mini::CMatrix TMatrixA, mini::CMatrix TMatrixB, mini::CMatrix TMatrixC, mini::CMatrix TMatrixD, mini::CMatrix TMatrixL, mini::CMatrix TMatrixU> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::TetrahedronAxisAlignedBoundingBox (TMatrixA const &A, TMatrixB const &B, TMatrixC const &C, TMatrixD const &D, TMatrixL const &L, TMatrixU const &U) |
Tests for overlap between tetrahedron ABCD and axis-aligned bounding box (L,U), in at least 3D. | |
template<mini::CMatrix TMatrixA1, mini::CMatrix TMatrixB1, mini::CMatrix TMatrixC1, mini::CMatrix TMatrixA2, mini::CMatrix TMatrixB2, mini::CMatrix TMatrixC2> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::Triangles2D (TMatrixA1 const &A1, TMatrixB1 const &B1, TMatrixC1 const &C1, TMatrixA2 const &A2, TMatrixB2 const &B2, TMatrixC2 const &C2) |
Tests for overlap between triangle A1B1C1 and triangle A2B2C2, in 2D. | |
template<mini::CMatrix TMatrixA1, mini::CMatrix TMatrixB1, mini::CMatrix TMatrixC1, mini::CMatrix TMatrixA2, mini::CMatrix TMatrixB2, mini::CMatrix TMatrixC2> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::Triangles3D (TMatrixA1 const &A1, TMatrixB1 const &B1, TMatrixC1 const &C1, TMatrixA2 const &A2, TMatrixB2 const &B2, TMatrixC2 const &C2) |
Tests for overlap between triangle A1B1C1 and triangle A2B2C2, in 3D. | |
template<mini::CMatrix TMatrixA, mini::CMatrix TMatrixB, mini::CMatrix TMatrixC, mini::CMatrix TMatrixI, mini::CMatrix TMatrixJ, mini::CMatrix TMatrixK, mini::CMatrix TMatrixL> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::TriangleTetrahedron (TMatrixA const &A, TMatrixB const &B, TMatrixC const &C, TMatrixI const &I, TMatrixJ const &J, TMatrixK const &K, TMatrixL const &L) |
Tests for overlap between triangle ABC and tetrahedron IJKL, in at least 3D. | |
template<mini::CMatrix TMatrixA1, mini::CMatrix TMatrixB1, mini::CMatrix TMatrixC1, mini::CMatrix TMatrixD1, mini::CMatrix TMatrixA2, mini::CMatrix TMatrixB2, mini::CMatrix TMatrixC2, mini::CMatrix TMatrixD2> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::Tetrahedra (TMatrixA1 const &A1, TMatrixB1 const &B1, TMatrixC1 const &C1, TMatrixD1 const &D1, TMatrixA2 const &A2, TMatrixB2 const &B2, TMatrixC2 const &C2, TMatrixD2 const &D2) |
Tests for overlap between tetrahedron A1B1C1D1 and tetrahedron A2B2C2D2, in at least 3D. | |
template<mini::CMatrix TMatrixA, mini::CMatrix TMatrixB, mini::CMatrix TMatrixC, mini::CMatrix TMatrixSC> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::TriangleSphere (TMatrixA const &A, TMatrixB const &B, TMatrixC const &C, TMatrixSC const &SC, typename TMatrixSC::ScalarType R) |
Tests for overlap between a triangle ABC and a sphere with center SC of radius R. | |
template<mini::CMatrix TMatrixA, mini::CMatrix TMatrixB, mini::CMatrix TMatrixC, mini::CMatrix TMatrixD, mini::CMatrix TMatrixSC> | |
PBAT_HOST_DEVICE bool | pbat::geometry::OverlapQueries::TetrahedronSphere (TMatrixA const &A, TMatrixB const &B, TMatrixC const &C, TMatrixD const &D, TMatrixSC const &SC, typename TMatrixSC::ScalarType R) |
Tests for overlap between a tetrahedron ABCD and a sphere with center SC of radius R. | |
This file contains functions to answer overlap queries.