Back to index

supertuxkart  0.5+dfsg1
Classes | Enumerations | Functions
btBroadphaseProxy.h File Reference
#include "LinearMath/btScalar.h"
#include "LinearMath/btAlignedAllocator.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  btBroadphasePairSortPredicate

Enumerations

enum  BroadphaseNativeTypes {
  BOX_SHAPE_PROXYTYPE, TRIANGLE_SHAPE_PROXYTYPE, TETRAHEDRAL_SHAPE_PROXYTYPE, CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE,
  CONVEX_HULL_SHAPE_PROXYTYPE, IMPLICIT_CONVEX_SHAPES_START_HERE, SPHERE_SHAPE_PROXYTYPE, MULTI_SPHERE_SHAPE_PROXYTYPE,
  CAPSULE_SHAPE_PROXYTYPE, CONE_SHAPE_PROXYTYPE, CONVEX_SHAPE_PROXYTYPE, CYLINDER_SHAPE_PROXYTYPE,
  UNIFORM_SCALING_SHAPE_PROXYTYPE, MINKOWSKI_SUM_SHAPE_PROXYTYPE, MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE, CONCAVE_SHAPES_START_HERE,
  TRIANGLE_MESH_SHAPE_PROXYTYPE, FAST_CONCAVE_MESH_PROXYTYPE, TERRAIN_SHAPE_PROXYTYPE, GIMPACT_SHAPE_PROXYTYPE,
  EMPTY_SHAPE_PROXYTYPE, STATIC_PLANE_PROXYTYPE, CONCAVE_SHAPES_END_HERE, COMPOUND_SHAPE_PROXYTYPE,
  SOFTBODY_SHAPE_PROXYTYPE, MAX_BROADPHASE_COLLISION_TYPES
}
 btDispatcher uses these types IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and concave to facilitate type checking More...

Functions

 ATTRIBUTE_ALIGNED16 (struct) btBroadphaseProxy
 btBroadphaseProxy
SIMD_FORCE_INLINE bool operator== (const btBroadphasePair &a, const btBroadphasePair &b)

Enumeration Type Documentation

btDispatcher uses these types IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and concave to facilitate type checking

Enumerator:
BOX_SHAPE_PROXYTYPE 
TRIANGLE_SHAPE_PROXYTYPE 
TETRAHEDRAL_SHAPE_PROXYTYPE 
CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE 
CONVEX_HULL_SHAPE_PROXYTYPE 
IMPLICIT_CONVEX_SHAPES_START_HERE 
SPHERE_SHAPE_PROXYTYPE 
MULTI_SPHERE_SHAPE_PROXYTYPE 
CAPSULE_SHAPE_PROXYTYPE 
CONE_SHAPE_PROXYTYPE 
CONVEX_SHAPE_PROXYTYPE 
CYLINDER_SHAPE_PROXYTYPE 
UNIFORM_SCALING_SHAPE_PROXYTYPE 
MINKOWSKI_SUM_SHAPE_PROXYTYPE 
MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE 
CONCAVE_SHAPES_START_HERE 
TRIANGLE_MESH_SHAPE_PROXYTYPE 
FAST_CONCAVE_MESH_PROXYTYPE 

used for demo integration FAST/Swift collision library and Bullet

TERRAIN_SHAPE_PROXYTYPE 
GIMPACT_SHAPE_PROXYTYPE 

Used for GIMPACT Trimesh integration.

EMPTY_SHAPE_PROXYTYPE 
STATIC_PLANE_PROXYTYPE 
CONCAVE_SHAPES_END_HERE 
COMPOUND_SHAPE_PROXYTYPE 
SOFTBODY_SHAPE_PROXYTYPE 
MAX_BROADPHASE_COLLISION_TYPES 

Definition at line 26 of file btBroadphaseProxy.h.


Function Documentation

ATTRIBUTE_ALIGNED16 ( struct  )

btBroadphaseProxy

btOptimizedBvhNode contains both internal and leaf node information. Total node size is 44 bytes / node. You can use the compressed version of 16 bytes.

contains a pair of aabb-overlapping objects

optional filtering to cull potential collisions

Definition at line 70 of file btBroadphaseProxy.h.

{

BT_DECLARE_ALIGNED_ALLOCATOR();
       
       enum CollisionFilterGroups
       {
               DefaultFilter = 1,
               StaticFilter = 2,
               KinematicFilter = 4,
               DebrisFilter = 8,
                     SensorTrigger = 16,
               AllFilter = DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger
       };

       //Usually the client btCollisionObject or Rigidbody class
       void*  m_clientObject;

       short int m_collisionFilterGroup;
       short int m_collisionFilterMask;

       void*  m_multiSapParentProxy;             


       int                  m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc.

       SIMD_FORCE_INLINE int getUid() const
       {
              return m_uniqueId;
       }

       //used for memory pools
       btBroadphaseProxy() :m_clientObject(0),m_multiSapParentProxy(0)
       {
       }

       btBroadphaseProxy(void* userPtr,short int collisionFilterGroup, short int collisionFilterMask,void* multiSapParentProxy=0)
              :m_clientObject(userPtr),
              m_collisionFilterGroup(collisionFilterGroup),
              m_collisionFilterMask(collisionFilterMask)
       {
              m_multiSapParentProxy = multiSapParentProxy;
       }

       

       static SIMD_FORCE_INLINE bool isPolyhedral(int proxyType)
       {
              return (proxyType  < IMPLICIT_CONVEX_SHAPES_START_HERE);
       }

       static SIMD_FORCE_INLINE bool      isConvex(int proxyType)
       {
              return (proxyType < CONCAVE_SHAPES_START_HERE);
       }

       static SIMD_FORCE_INLINE bool      isConcave(int proxyType)
       {
              return ((proxyType > CONCAVE_SHAPES_START_HERE) &&
                     (proxyType < CONCAVE_SHAPES_END_HERE));
       }
       static SIMD_FORCE_INLINE bool      isCompound(int proxyType)
       {
              return (proxyType == COMPOUND_SHAPE_PROXYTYPE);
       }
       static SIMD_FORCE_INLINE bool isInfinite(int proxyType)
       {
              return (proxyType == STATIC_PLANE_PROXYTYPE);
       }
       
}
SIMD_FORCE_INLINE bool operator== ( const btBroadphasePair &  a,
const btBroadphasePair &  b 
)

Definition at line 223 of file btBroadphaseProxy.h.

{
        return (a.m_pProxy0 == b.m_pProxy0) && (a.m_pProxy1 == b.m_pProxy1);
}