void RigidBodyImpl::ProcessCollisionWithMask (CollisionEventType event_type, RigidBody& this_body, RigidBody& second_body, const math::vec3f& collision_point, const stl::string& wanted_group_mask, const CollisionCallback& callback_handler) { if (!common::wcmatch (second_body.CollisionGroup (), wanted_group_mask.c_str ())) return; callback_handler (event_type, this_body, second_body, collision_point); }
void RigidBodyImpl::ProcessCollisionWithHash (CollisionEventType event_type, RigidBody& this_body, RigidBody& second_body, const math::vec3f& collision_point, size_t wanted_group_hash, const CollisionCallback& callback_handler) { if (common::strhash (second_body.CollisionGroup ()) != wanted_group_hash) return; callback_handler (event_type, this_body, second_body, collision_point); }
void dump (const RigidBody& body) { printf ("Body '%s':\n", body.Name ()); printf (" mass %.2f\n", body.Mass ()); printf (" mass space inertia tensor "); dump (body.MassSpaceInertiaTensor ()); printf ("\n"); printf (" flags %08x\n", body.Flags ()); printf (" shape '%s'\n", body.Shape ().Name ()); printf (" material '%s'\n", body.Material ().Name ()); printf (" collision group '%s'\n", body.CollisionGroup ()); }