Skip to content

Commit 564093c

Browse files
committed
Document OverlapQueries
1 parent a6cabaf commit 564093c

File tree

4 files changed

+244
-145
lines changed

4 files changed

+244
-145
lines changed

doc/latex/bibliography.bib

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,11 @@ @article{li2020ipc
122122
articleno = {49},
123123
numpages = {20},
124124
keywords = {constrained optimization, contact mechanics, elastodynamics, friction}
125+
}
126+
127+
@book{ericson2004real,
128+
title={Real-time collision detection},
129+
author={Ericson, Christer},
130+
year={2004},
131+
publisher={Crc Press}
125132
}

source/pbat/geometry/ClosestPointQueries.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ PBAT_HOST_DEVICE auto PointOnPlane(TMatrixX const& X, TMatrixP const& P, TMatrix
152152
assert(bIsNormalUnit);
153153
#endif
154154
/**
155-
* Ericson, Christer. Real-time collision detection. Crc Press, 2004. section 5.ScalarType(1)1
155+
* See \cite ericson2004real section 5.11
156156
*/
157157
ScalarType const t = Dot(n, X - P);
158158
mini::SVector<ScalarType, TMatrixX::kRows> Xplane = X - t * n;
@@ -166,7 +166,7 @@ PBAT_HOST_DEVICE auto PointOnLineSegment(TMatrixX const& X, TMatrixP const& P, T
166166
using ScalarType = typename TMatrixX::ScalarType;
167167
using namespace std;
168168
/**
169-
* Ericson, Christer. Real-time collision detection. Crc Press, 2004. section 5.ScalarType(1)2
169+
* See \cite ericson2004real section 5.12
170170
*/
171171
mini::SVector<ScalarType, TMatrixX::kRows> const PQ = Q - P;
172172
// Project X onto PQ, computing parameterized position R(t) = P + t*(Q � P)
@@ -185,7 +185,7 @@ PointOnAxisAlignedBoundingBox(TMatrixX const& P, TMatrixL const& L, TMatrixU con
185185
{
186186
using namespace std;
187187
/**
188-
* Ericson, Christer. Real-time collision detection. Crc Press, 2004. section 5.ScalarType(1)3
188+
* See \cite ericson2004real section 5.13
189189
*/
190190
mini::SVector<typename TMatrixX::ScalarType, TMatrixX::kRows> X = P;
191191
pbat::common::ForRange<0, TMatrixX::kRows>(
@@ -204,7 +204,7 @@ UvwPointInTriangle(TMatrixP const& P, TMatrixA const& A, TMatrixB const& B, TMat
204204
{
205205
using ScalarType = typename TMatrixP::ScalarType;
206206
/**
207-
* Ericson, Christer. Real-time collision detection. Crc Press, 2004. section 5.ScalarType(1)5
207+
* See \cite ericson2004real section 5.15
208208
*/
209209

210210
// Check if P in vertex region outside A
@@ -310,7 +310,7 @@ PBAT_HOST_DEVICE auto PointInTetrahedron(
310310
static_assert(kRows == kDims, "This overlap test is specialized for 3D");
311311

312312
/**
313-
* Ericson, Christer. Real-time collision detection. Crc Press, 2004. section 5.ScalarType(1)6
313+
* See \cite ericson2004real section 5.16
314314
*/
315315

316316
// Start out assuming point inside all halfspaces, so closest to itself

source/pbat/geometry/IntersectionQueries.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ PBAT_HOST_DEVICE auto UvwLineTriangle3D(
405405
auto constexpr kDims = 3;
406406
static_assert(kRows == kDims, "This overlap test is specialized for 3D");
407407
/**
408-
* Ericson, Christer. Real-time collision detection. Crc Press, 2004. section 5.3.4
408+
* See \cite ericson2004real section 5.3.4
409409
*/
410410
mini::SVector<ScalarType, kDims> const PQ = Q - P;
411411
mini::SVector<ScalarType, kDims> const PA = A - P;

0 commit comments

Comments
 (0)