Add backface culling and option to keep unflipped hit normal in case a ray hits a back-facing triangle.
Usage: set RayResultCallback.m_flags to kF_FilterBackfaces, optionally combined with kF_KeepUnflippedNormal. Thanks Andy O'Neil for the patch! Remove the force_inline for some internal constraint solver methods, it makes re-use easier. Workaround/avoid MSVC 2005 compiler error in LibXML/trionan.c
This commit is contained in:
@@ -186,6 +186,8 @@ public:
|
||||
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;
|
||||
|
||||
virtual ~RayResultCallback()
|
||||
{
|
||||
@@ -199,7 +201,9 @@ public:
|
||||
:m_closestHitFraction(btScalar(1.)),
|
||||
m_collisionObject(0),
|
||||
m_collisionFilterGroup(btBroadphaseProxy::DefaultFilter),
|
||||
m_collisionFilterMask(btBroadphaseProxy::AllFilter)
|
||||
m_collisionFilterMask(btBroadphaseProxy::AllFilter),
|
||||
//@BP Mod
|
||||
m_flags(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user