From 7bceea80d4a04649f495f4f4331d7e3bdcdb05ca Mon Sep 17 00:00:00 2001 From: Marijn Tamis Date: Wed, 12 Sep 2018 14:12:47 +0200 Subject: 1.1.5 Release (24934621) --- .../CollisionDetection/InterCollision.html | 288 +++++++++++++++++++++ 1 file changed, 288 insertions(+) create mode 100644 NvCloth/docs/documentation/CollisionDetection/InterCollision.html (limited to 'NvCloth/docs/documentation/CollisionDetection/InterCollision.html') diff --git a/NvCloth/docs/documentation/CollisionDetection/InterCollision.html b/NvCloth/docs/documentation/CollisionDetection/InterCollision.html new file mode 100644 index 0000000..4db71f8 --- /dev/null +++ b/NvCloth/docs/documentation/CollisionDetection/InterCollision.html @@ -0,0 +1,288 @@ + + + + + + + + + Inter Collision — NvCloth 1.1.3 documentation + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+

Inter Collision

+
+

Overview

+

Inter collision tries to keep multiple cloth objects from intersecting, but does not keep any cloth from self intersecting. +It does this by keeping the particles from every cloth a minimum distance away from the particles of every other cloth. +This distance can be set using Cloth::setInterCollisionDistance().

+
+
+

Broad phase collision detection

+
+
+

Acceleration structure

+

The acceleration structures used for Inter Collision are very similar to those used in Self Collision. +The only addition is the broad phase which is used to cull cloth pairs based their bounding boxes, and cull particles from the narrow phase based on the overlapping volumes.

+
+

Broad phase collision detection

+

calculatePotentialColliders() takes care of the broad phase. +It first calculates the individual bounding boxes of each cloth in world space. +The sweep axis is determined using the bounding box enclosing all cloths. +The worldspace bounding boxes are sorted by the lower boundary on the sweep axis. +Sorting this way gives the following properties:

+
true = clothBounds[sortedIndices[i]].mLower <= clothBounds[sortedIndices[i+1]].mLower
+
+if(clothBounds[sortedIndices[a]].mUpper < clothBounds[sortedIndices[b]].mLower)
+{
+       true = clothBounds[sortedIndices[a]].mUpper < clothBounds[sortedIndices[b+1]].mLower
+       // b and all sorted cloths after b do not intersect a
+}
+
+

Now the clothes are tested against the bounds of every other cloth.

+

For cloth A, all overlapping bounds of the other cloths are stored in temporary memory (in overlapBounds) in the local space of cloth A. +All the particles of cloth A that overlap with any of those bounds are marked for narrow phase collision (and transformed to world space). +Marking a particle for narrow phase collision is done by storing it in the mClothIndices and mParticleIndices arrays. +Now the narrow phase only has to deal with the particles in those lists.

+
+
+

Differences with self collision

+

Some of the obvious differences:

+
+
    +
  • Instead of iterating over all particles only particles from the mClothIndices and mParticleIndices arrays are used.
  • +
  • The particle cannot be directly accessed, the getParticle() function is used instead.
  • +
  • Intercollision has no equivalent to self collision indices.
  • +
  • The particles need to be transformed back into local space after collision response.
  • +
+
+
+
+
+ + +
+
+
+
+
+
+ +
+ + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3