1 #ifndef BT_CONTACT_H_STRUCTS_INCLUDED 2 #define BT_CONTACT_H_STRUCTS_INCLUDED 34 #define NORMAL_CONTACT_AVERAGE 1 36 #define CONTACT_DIFF_EPSILON 0.00001f 55 m_normal(contact.m_normal),
56 m_depth(contact.m_depth),
57 m_feature1(contact.m_feature1),
58 m_feature2(contact.m_feature2)
63 btScalar depth,
int feature1,
int feature2) : m_point(point),
75 (int)(m_point[0] * 1000.0f + 1.0f),
76 (int)(m_point[1] * 1333.0f),
77 (int)(m_point[2] * 2133.0f + 3.0f)};
78 unsigned int _hash = 0;
79 unsigned int *_uitmp = (
unsigned int *)(&_coords[0]);
82 _hash += (*_uitmp) << 4;
84 _hash += (*_uitmp) << 8;
91 for (
int i = 0; i < normal_count; i++)
93 vec_sum += normals[i];
101 m_normal = vec_sum /
btSqrt(vec_sum_len);
105 #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...