fix ray test kF_FilterBackfaces and kF_KeepUnflippedNormal flags
add Demos/RaytestDemo to show/test rayTest fix premake batch files
This commit is contained in:
@@ -208,6 +208,11 @@ void btCollisionWorld::updateAabbs()
|
||||
}
|
||||
|
||||
|
||||
void btCollisionWorld::computeOverlappingPairs()
|
||||
{
|
||||
BT_PROFILE("calculateOverlappingPairs");
|
||||
m_broadphasePairCache->calculateOverlappingPairs(m_dispatcher1);
|
||||
}
|
||||
|
||||
void btCollisionWorld::performDiscreteCollisionDetection()
|
||||
{
|
||||
@@ -217,11 +222,7 @@ void btCollisionWorld::performDiscreteCollisionDetection()
|
||||
|
||||
updateAabbs();
|
||||
|
||||
{
|
||||
BT_PROFILE("calculateOverlappingPairs");
|
||||
m_broadphasePairCache->calculateOverlappingPairs(m_dispatcher1);
|
||||
}
|
||||
|
||||
computeOverlappingPairs();
|
||||
|
||||
btDispatcher* dispatcher = getDispatcher();
|
||||
{
|
||||
@@ -456,6 +457,7 @@ void btCollisionWorld::rayTestSingleInternal(const btTransform& rayFromTrans,con
|
||||
: m_userCallback(user), m_i(i)
|
||||
{
|
||||
m_closestHitFraction = m_userCallback->m_closestHitFraction;
|
||||
m_flags = m_userCallback->m_flags;
|
||||
}
|
||||
virtual bool needsCollision(btBroadphaseProxy* p) const
|
||||
{
|
||||
|
||||
@@ -144,6 +144,11 @@ public:
|
||||
void updateSingleAabb(btCollisionObject* colObj);
|
||||
|
||||
virtual void updateAabbs();
|
||||
|
||||
///the computeOverlappingPairs is usually already called by performDiscreteCollisionDetection (or stepSimulation)
|
||||
///it can be useful to use if you perform ray tests without collision detection/simulation
|
||||
virtual void computeOverlappingPairs();
|
||||
|
||||
|
||||
virtual void setDebugDrawer(btIDebugDraw* debugDrawer)
|
||||
{
|
||||
@@ -198,8 +203,8 @@ public:
|
||||
const btCollisionObject* m_collisionObject;
|
||||
short int m_collisionFilterGroup;
|
||||
short int m_collisionFilterMask;
|
||||
//@BP Mod - Custom flags, currently used to enable backface culling on tri-meshes, see btRaycastCallback
|
||||
unsigned int m_flags;
|
||||
//@BP Mod - Custom flags, currently used to enable backface culling on tri-meshes, see btRaycastCallback.h. Apply any of the EFlags defined there on m_flags here to invoke.
|
||||
unsigned int m_flags;
|
||||
|
||||
virtual ~RayResultCallback()
|
||||
{
|
||||
@@ -214,8 +219,8 @@ public:
|
||||
m_collisionObject(0),
|
||||
m_collisionFilterGroup(btBroadphaseProxy::DefaultFilter),
|
||||
m_collisionFilterMask(btBroadphaseProxy::AllFilter),
|
||||
//@BP Mod
|
||||
m_flags(0)
|
||||
//@BP Mod
|
||||
m_flags(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user