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

Function StaticEnvironmentCB

ogsr_engine/xrGame/CharacterPhysicsSupport.cpp:885–900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

883ICollisionHitCallback* CCharacterPhysicsSupport::get_collision_hit_callback() { return m_collision_hit_callback; }
884
885void StaticEnvironmentCB(bool& do_colide, bool bo1, dContact& c, SGameMtl* material_1, SGameMtl* material_2)
886{
887 dJointID contact_joint = dJointCreateContact(0, ContactGroup, &c);
888
889 if (bo1)
890 {
891 ((CPHIsland*)(retrieveGeomUserData(c.geom.g1)->callback_data))->DActiveIsland()->ConnectJoint(contact_joint);
892 dJointAttach(contact_joint, dGeomGetBody(c.geom.g1), 0);
893 }
894 else
895 {
896 ((CPHIsland*)(retrieveGeomUserData(c.geom.g2)->callback_data))->DActiveIsland()->ConnectJoint(contact_joint);
897 dJointAttach(contact_joint, 0, dGeomGetBody(c.geom.g2));
898 }
899 do_colide = false;
900}
901
902void CCharacterPhysicsSupport::FlyTo(const Fvector& disp)
903{

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