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

Function StaticEnvironment

ogsr_engine/xrGame/PHActivationShape.cpp:51–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 }
50}
51void StaticEnvironment(bool& do_colide, bool bo1, dContact& c, SGameMtl* material_1, SGameMtl* material_2)
52{
53 dJointID contact_joint = dJointCreateContact(0, ContactGroup, &c);
54
55 if (bo1)
56 {
57 ((CPHActivationShape*)(retrieveGeomUserData(c.geom.g1)->callback_data))->DActiveIsland()->ConnectJoint(contact_joint);
58 dJointAttach(contact_joint, dGeomGetBody(c.geom.g1), 0);
59 }
60 else
61 {
62 ((CPHActivationShape*)(retrieveGeomUserData(c.geom.g2)->callback_data))->DActiveIsland()->ConnectJoint(contact_joint);
63 dJointAttach(contact_joint, 0, dGeomGetBody(c.geom.g2));
64 }
65 do_colide = false;
66}
67void GetMaxDepthCallback(bool& do_colide, bool bo1, dContact& c, SGameMtl* material_1, SGameMtl* material_2)
68{
69 if (do_colide && !material_1->Flags.test(SGameMtl::flPassable) && !material_2->Flags.test(SGameMtl::flPassable))

Callers

nothing calls this directly

Calls 5

dJointCreateContactFunction · 0.85
dJointAttachFunction · 0.85
dGeomGetBodyFunction · 0.85
ConnectJointMethod · 0.80
DActiveIslandMethod · 0.45

Tested by

no test coverage detected