Beispiel #1
0
	hkBool isCollisionEnabled(const hkpCollidable& a, const hkpCollidable& b) const
	{
		hkpRigidBody* body[2] = { (hkpRigidBody*)a.getOwner(), (hkpRigidBody*)b.getOwner() };
		if (body[0]->isFixedOrKeyframed() && body[1]->isFixedOrKeyframed())
		{
			return false;
		}
		return true;
	}
// This decides if two collidables (overlapping in the broadphase for example) should collide and is inherited from
// hkpCollidableCollidableFilter
hkBool MyCollisionFilter::isCollisionEnabled( const hkpCollidable& a, const hkpCollidable& b ) const
{
	return isCollisionEnabled( a.getCollisionFilterInfo(), b.getCollisionFilterInfo() );
}
hkBool MyCollisionFilter::isCollisionEnabled( const hkpWorldRayCastInput& aInput, const hkpCollidable& collidableB ) const
{
	return isCollisionEnabled( aInput.m_filterInfo, collidableB.getCollisionFilterInfo() );
}
Beispiel #4
0
hkBool gep::HavokCollisionFilter_Simple::isCollisionEnabled(const hkpWorldRayCastInput& a,
                                                            const hkpCollidable& collidableB) const
{
    return isCollisionEnabled(a.m_filterInfo, collidableB.getCollisionFilterInfo());
}
Beispiel #5
0
hkBool gep::HavokCollisionFilter_Simple::isCollisionEnabled(const hkpCollidable& a,
                                                            const hkpCollidable& b) const
{
    return isCollisionEnabled(a.getCollisionFilterInfo(), b.getCollisionFilterInfo());
}