MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / NearCallback

Function NearCallback

ogsr_engine/xrGame/Physics.cpp:276–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276void NearCallback(CPHObject* obj1, CPHObject* obj2, dGeomID o1, dGeomID o2)
277{
278 CPHIsland* island1 = obj1->DActiveIsland();
279 CPHIsland* island2 = obj2->DActiveIsland();
280 obj2->near_callback(obj1);
281 int MAX_CONTACTS = -1;
282
283 if (!island1->CanMerge(island2, MAX_CONTACTS))
284 return;
285
286 if (CollideIntoGroup(o1, o2, ContactGroup, island1, MAX_CONTACTS) != 0)
287 {
288 obj1->MergeIsland(obj2);
289
290 if (!obj2->is_active())
291 obj2->EnableObject(obj1);
292 }
293}
294
295void CollideStatic(dGeomID o2, CPHObject* obj2)
296{

Callers 2

CollideMethod · 0.85
CollideDynamicsMethod · 0.85

Calls 7

CollideIntoGroupFunction · 0.85
CanMergeMethod · 0.80
MergeIslandMethod · 0.80
DActiveIslandMethod · 0.45
near_callbackMethod · 0.45
is_activeMethod · 0.45
EnableObjectMethod · 0.45

Tested by

no test coverage detected