Skip to content

Broad Phase: Brute Force Broad Phase

BruteForceBroadPhase is a broad phase component, which is used in a Collision Detection pipeline.

The method is based on the comparison of the overall bounding volumes of objects to determine if they are in collision or not. This test is very exhaustive because of its \(n^2/2\) pairwise checks. In SOFA, the proposed bounding volumes are commonly Axis-Aligned-Bounding-Box (AABB).

Since, the bounding volumes are very simple (AABB), the tests are very fast for a few collision models. A more advanced method must be selected for simulations involving a high number of objects.

A parallel implementation (ParallelBruteForceBroadPhase) can be found in the plugin MultiThreading.

Example of Usage

This component is used as follows in XML format:

xml <FreeMotionAnimationLoop /> <DefaultPipeline depth="15" verbose="0" draw="0" /> <BruteForceBroadPhase name="N2" /> <BVHNarrowPhase/> <MinProximityIntersection name="Proximity" alarmDistance="1.5" contactDistance="1" /> <DefaultContactManager name="Response" response="FrictionContactConstraint" />

Broad phase collision detection using extensive pair-wise tests.

Target: Sofa.Component.Collision.Detection.Algorithm

namespace: sofa::component::collision::detection::algorithm

parents:

  • BroadPhaseDetection

Data

Name Description Default value
name object name unnamed
printLog if true, emits extra messages at runtime. 0
tags list of the subsets the object 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
box if not empty, objects that do not intersect this bounding-box will be ignored
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