pub fn test(self, rb_type1: RigidBodyType, rb_type2: RigidBodyType) -> bool {
        // NOTE: This test is quite complicated so here is an explanation.
        //       First, we associate the following bit masks:
        //           - DYNAMIC = 0001
        //           - STATIC = 0010
        //           - KINEMATIC = 1100
        //       These are equal to the bits indexed by `RigidBodyType as u32`.
        //       The bit masks defined by ActiveCollisionTypes are defined is such a way
        //       that the first part of the variant name (e.g. DYNAMIC_*) indicates which
        //       groups of four bits should be considered:
        //           - DYNAMIC_* = the first group of four bits.
        //           - STATIC_* = the second group of four bits.
        //           - KINEMATIC_* = the third and fourth groups of four bits.
        //       The second part of the variant name (e.g. *_DYNAMIC) indicates the value
        //       of the aforementioned groups of four bits.
        //       For example, DYNAMIC_STATIC means that the first group of four bits (because
        //       of DYNAMIC_*) must have the value 0010 (because of *_STATIC). That gives
        //       us 0b0000_0000_0000_0010 for the DYNAMIC_STATIC_VARIANT.
        //
        //       The KINEMATIC_* is special because it occupies two groups of four bits. This is
        //       because it combines both KinematicPositionBased and KinematicVelocityBased.
        //
        //       Now that we have a way of building these bit masks, let's see how we use them.
        //       Given a pair of rigid-body types, the first rigid-body type is used to select
        //       the group of four bits we want to test (the selection is done by to the
        //       `>> (rb_type1 as u32 * 4) & 0b0000_1111`) and the second rigid-body type is
        //       used to form the bit mask we test this group of four bits against.
        //       In other word, the selection of the group of four bits tells us "for this type
        //       of rigid-body I can have collision with rigid-body types with these bit representation".
        //       Then the `(1 << rb_type2)` gives us the bit-representation of the rigid-body type,
        //       which needs to be checked.
        //
        //       Because that test must be symmetric, we perform two similar tests by swapping
        //       rb_type1 and rb_type2.
        ((self.bits >> (rb_type1 as u32 * 4)) & 0b0000_1111) & (1 << rb_type2 as u32) != 0
            || ((self.bits >> (rb_type2 as u32 * 4)) & 0b0000_1111) & (1 << rb_type1 as u32) != 0
    }
/// Test whether contact should be computed between two rigid-bodies with the given types.
Test whether contact should be computed between two rigid-bodies with the given types.
Test whether contact should be computed between two rigid - bodies with the given types .
pub fn test(self, rb_type1: RigidBodyType, rb_type2: RigidBodyType) -> bool {
        // NOTE: This test is quite complicated so here is an explanation.
        //       First, we associate the following bit masks:
        //           - DYNAMIC = 0001
        //           - STATIC = 0010
        //           - KINEMATIC = 1100
        //       These are equal to the bits indexed by `RigidBodyType as u32`.
        //       The bit masks defined by ActiveCollisionTypes are defined is such a way
        //       that the first part of the variant name (e.g. DYNAMIC_*) indicates which
        //       groups of four bits should be considered:
        //           - DYNAMIC_* = the first group of four bits.
        //           - STATIC_* = the second group of four bits.
        //           - KINEMATIC_* = the third and fourth groups of four bits.
        //       The second part of the variant name (e.g. *_DYNAMIC) indicates the value
        //       of the aforementioned groups of four bits.
        //       For example, DYNAMIC_STATIC means that the first group of four bits (because
        //       of DYNAMIC_*) must have the value 0010 (because of *_STATIC). That gives
        //       us 0b0000_0000_0000_0010 for the DYNAMIC_STATIC_VARIANT.
        //
        //       The KINEMATIC_* is special because it occupies two groups of four bits. This is
        //       because it combines both KinematicPositionBased and KinematicVelocityBased.
        //
        //       Now that we have a way of building these bit masks, let's see how we use them.
        //       Given a pair of rigid-body types, the first rigid-body type is used to select
        //       the group of four bits we want to test (the selection is done by to the
        //       `>> (rb_type1 as u32 * 4) & 0b0000_1111`) and the second rigid-body type is
        //       used to form the bit mask we test this group of four bits against.
        //       In other word, the selection of the group of four bits tells us "for this type
        //       of rigid-body I can have collision with rigid-body types with these bit representation".
        //       Then the `(1 << rb_type2)` gives us the bit-representation of the rigid-body type,
        //       which needs to be checked.
        //
        //       Because that test must be symmetric, we perform two similar tests by swapping
        //       rb_type1 and rb_type2.
        ((self.bits >> (rb_type1 as u32 * 4)) & 0b0000_1111) & (1 << rb_type2 as u32) != 0
            || ((self.bits >> (rb_type2 as u32 * 4)) & 0b0000_1111) & (1 << rb_type1 as u32) != 0
    }
pub fn test ( self , rb_type1 : RigidBodyType , rb_type2 : RigidBodyType ) -> bool { // NOTE: This test is quite complicated so here is an explanation. //       First, we associate the following bit masks: //           - DYNAMIC = 0001 //           - STATIC = 0010 //           - KINEMATIC = 1100 //       These are equal to the bits indexed by `RigidBodyType as u32`. //       The bit masks defined by ActiveCollisionTypes are defined is such a way //       that the first part of the variant name (e.g. DYNAMIC_*) indicates which //       groups of four bits should be considered: //           - DYNAMIC_* = the first group of four bits. //           - STATIC_* = the second group of four bits. //           - KINEMATIC_* = the third and fourth groups of four bits. //       The second part of the variant name (e.g. *_DYNAMIC) indicates the value //       of the aforementioned groups of four bits. //       For example, DYNAMIC_STATIC means that the first group of four bits (because //       of DYNAMIC_*) must have the value 0010 (because of *_STATIC). That gives //       us 0b0000_0000_0000_0010 for the DYNAMIC_STATIC_VARIANT. // //       The KINEMATIC_* is special because it occupies two groups of four bits. This is //       because it combines both KinematicPositionBased and KinematicVelocityBased. // //       Now that we have a way of building these bit masks, let's see how we use them. //       Given a pair of rigid-body types, the first rigid-body type is used to select //       the group of four bits we want to test (the selection is done by to the //       `>> (rb_type1 as u32 * 4) & 0b0000_1111`) and the second rigid-body type is //       used to form the bit mask we test this group of four bits against. //       In other word, the selection of the group of four bits tells us "for this type //       of rigid-body I can have collision with rigid-body types with these bit representation". //       Then the `(1 << rb_type2)` gives us the bit-representation of the rigid-body type, //       which needs to be checked. // //       Because that test must be symmetric, we perform two similar tests by swapping //       rb_type1 and rb_type2. ( ( self . bits >> ( rb_type1 as u32 * 4 ) ) & 0b0000_1111 ) & ( 1 << rb_type2 as u32 ) != 0 || ( ( self . bits >> ( rb_type2 as u32 * 4 ) ) & 0b0000_1111 ) & ( 1 << rb_type1 as u32 ) != 0 }
Test whether contact should be computed between two rigid-bodies with the given types.
Test whether contact should be computed between two rigid - bodies with the given types .
self
rb_type1
RigidBodyType
rb_type2
RigidBodyType