MinProximityIntersection
This proximity method for intersection detection:
- detects a possible contact as soon as pair of collision elements are close to each other (distance smaller than the alarmDistance)
- and creates contact (aka DetectionOutput) when the distance is lower than contactDistance.
This method is optimized for meshes. The intersection is implemented for the following primitives: Triangle/Point, Line/Point, Line/Line, so that it covers all Triangle/Triangle intersections. To get a proper detection, the TriangleModel, LineModel and PointModel must be simultaneously used in the scene.
In the figure below, we describe the detection of the contacts for Object 1 due to an Object 2. It assumes here that a PointCollisionModel and a LineCollisionModel are defined. The detection gives: - 2 Point-Point contacts (yellow) - 1 Point-Line contact (blue) - 1 Line-Line contact (pink)
Although the method is working properly, the intersection might result in a high number of contacts. This works just fine for Penalty method (many springs will be generated). However, using a response method based on Lagrange multipliers, many constraints will be generated which might rapidly become computationally-demanding.
Moreover, the contacts can be a bit degenerated: many contacts with different orientations. Again, using Penalty, it might only create some numerical friction but, using the Lagrange multiplier resolution, this can lead to contradictory constraints (worsening the convergence).
Usage
The MinProximityIntersection must be placed right after the CollisionPipeline and the associated Detection methods (usually BruteForceBroadPhase and BVHNarrowPhase) on top the scene graph.
Additional information
- collision models in the scene will have the data proximity corresponding to an enlargement of the collision model, i.e., value added to the alarmDistance and the contactDistance and also when building AABBs in the broad phase
- a different alarmDistance and contactDistance can be specified for each CollisionModel by setting alarmDistance and contactDistance to zero and changing the proximity parameter
A set of methods to compute if two primitives are close enough to consider they collide
Target: Sofa.Component.Collision.Detection.Intersection
namespace: sofa::component::collision::detection::intersection
parents:
- BaseProximityIntersection
Data
Name | Description | Default value |
---|---|---|
name | object name | unnamed |
printLog | if true, emits extra messages at runtime. | 0 |
tags | list of the subsets the objet belongs to | |
bbox | this object bounding box | |
componentState | The state of the component among (Dirty, Valid, Undefined, Loading, Invalid). | Undefined |
listening | if true, handle the events, otherwise ignore the events | 0 |
alarmDistance | Distance above which the intersection computations ignores the promixity pair. This distance can also be used in some broad phase algorithms to reduce the search area | 1 |
contactDistance | Distance below which a contact is created | 0.5 |
useSphereTriangle | activate Sphere-Triangle intersection tests | 1 |
usePointPoint | activate Point-Point intersection tests | 1 |
useSurfaceNormals | Compute the norms of the Detection Outputs by considering the normals of the surfaces involved. | 0 |
useLinePoint | activate Line-Point intersection tests | 1 |
useLineLine | activate Line-Line intersection tests | 1 |
Links
Name | Description | Destination type name |
---|---|---|
context | Graph Node containing this object (or BaseContext::getDefault() if no graph is used) | BaseContext |
slaves | Sub-objects used internally by this object | BaseObject |
master | nullptr for regular objects, or master object for which this object is one sub-objects | BaseObject |