Grouping Bodies Included in the Control Set
Collision control often requires to detect collisions between body groups instead of collisions for all pairs in the control body set. For example, you can improve performance by skipping the intersection tests if it is known that the bodies in the group do not intersect, or if a detection in the group is not required due to some reason. Two methods are used to form such groups.
The first method is to use the same appItem value in the AddItem() method when the bodies are added in the group**.** This method is useful when the bodies belonging to one “monolithic” object on the client application side are naturally grouped.
The second method is to configure cdet_query to skip the intersection test for pairs of bodies belonging to the same group. An example of this method is included in the cdet_collided_faces class source code. To do this, you need to return CBACK_SKIP for the CDET_STARTED event in the call-back method for a pair of bodies belonging to the same group.