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]);
75 for( i=1;i<keycontacts.size();i++)
77 key = keycontacts[i].m_key;
78 const GIM_CONTACT * scontact = &contacts[keycontacts[i].m_value];
85 *pcontact = *scontact;
88 else if(normal_contact_average)
94 coincident_normals[coincident_count] = scontact->
m_normal;
103 if(normal_contact_average && coincident_count>0)
106 coincident_count = 0;
120 if(contacts.
size()==1)
130 average_contact.
m_point += contacts[i].m_point;
131 average_contact.
m_normal += contacts[i].m_normal * contacts[i].m_depth;
137 average_contact.
m_point *= divide_average;
139 average_contact.
m_normal *= divide_average;
void resize(GUINT size, bool call_constructor=true, const T &fillData=T())
void gim_heap_sort(T *pArr, GUINT element_count, COMP_CLASS CompareFunc)
btScalar length() const
Return the length of the vector.
Very simple array container with fast access and simd memory.
btVector3 can be used to represent 3D points and vectors.
Prototype for comparators.
void push_back(const GIM_CONTACT &obj)
btScalar btFabs(btScalar x)