1 #ifndef BT_CONTACT_H_STRUCTS_INCLUDED 2 #define BT_CONTACT_H_STRUCTS_INCLUDED 35 #define NORMAL_CONTACT_AVERAGE 1 37 #define CONTACT_DIFF_EPSILON 0.00001f 56 m_point(contact.m_point),
57 m_normal(contact.m_normal),
58 m_depth(contact.m_depth),
59 m_feature1(contact.m_feature1),
60 m_feature2(contact.m_feature2)
65 btScalar depth,
int feature1,
int feature2):
78 (int)(m_point[0]*1000.0f+1.0f),
79 (int)(m_point[1]*1333.0f),
80 (int)(m_point[2]*2133.0f+3.0f)};
82 unsigned int *_uitmp = (
unsigned int *)(&_coords[0]);
85 _hash += (*_uitmp)<<4;
87 _hash += (*_uitmp)<<8;
94 for(
int i=0;i<normal_count;i++)
96 vec_sum += normals[i];
104 m_normal = vec_sum/
btSqrt(vec_sum_len);
109 #endif // BT_CONTACT_H_STRUCTS_INCLUDED
btScalar length2() const
Return the length of the vector squared.
btScalar btSqrt(btScalar y)
#define SIMD_FORCE_INLINE
btVector3 can be used to represent 3D points and vectors.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...