33 #define MAX_COINCIDENT 8
40 if (contacts.
size() == 1)
53 for (i = 0; i < contacts.
size(); i++)
55 keycontacts[i].m_key = contacts[i].calc_key_contact();
56 keycontacts[i].m_value = i;
64 GUINT coincident_count = 0;
67 GUINT last_key = keycontacts[0].m_key;
70 push_back(contacts[keycontacts[0].m_value]);
73 for (i = 1; i < keycontacts.
size(); i++)
75 key = keycontacts[i].m_key;
76 const GIM_CONTACT* scontact = &contacts[keycontacts[i].m_value];
83 *pcontact = *scontact;
86 else if (normal_contact_average)
92 coincident_normals[coincident_count] = scontact->
m_normal;
101 if (normal_contact_average && coincident_count > 0)
104 coincident_count = 0;
118 if (contacts.
size() == 1)
126 for (
GUINT i = 1; i < contacts.
size(); i++)
128 average_contact.
m_point += contacts[i].m_point;
129 average_contact.
m_normal += contacts[i].m_normal * contacts[i].m_depth;
135 average_contact.
m_point *= divide_average;
137 average_contact.
m_normal *= divide_average;
SIMD_FORCE_INLINE btScalar btFabs(btScalar x)
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
Prototype for comparators.
Very simple array container with fast access and simd memory.
void push_back(const GIM_CONTACT &obj)
void resize(GUINT size, bool call_constructor=true, const T &fillData=T())
void gim_heap_sort(T *pArr, GUINT element_count, COMP_CLASS CompareFunc)