69 int AddTri(
const PQP_REAL *p1,
const PQP_REAL *p2,
const PQP_REAL *p3,
71 const PQP_REAL *n1,
const PQP_REAL *n2,
const PQP_REAL *n3,
72 int _vertex_id[3],
int _neighbor_id[3],
85 PQP_REAL position1[3];
87 PQP_REAL position2[3];
110 void Add(
int i1,
int i2, PQP_REAL _depth, PQP_REAL position1[3],
int _vertex_id1, PQP_REAL position2[3],
int _vertex_id2, PQP_REAL normal[3]);
114 if(vertex_id < 0)
return -1;
115 for(
int i=0;
i<num_pairs;
i++)
117 if(pairs[
i].vertex_id1 == vertex_id)
return i;
122 if(vertex_id < 0)
return -1;
123 for(
int i=0;
i<num_pairs;
i++)
125 if(pairs[
i].vertex_id2 == vertex_id)
return i;
143 void FreePairsList();
152 return pairs[k].
depth;
165 _norm[0] = pairs[k].
normal[0];
166 _norm[1] = pairs[k].
normal[1];
167 _norm[2] = pairs[k].
normal[2];
172 #if PQP_BV_TYPE & RSS_TYPE // distance/tolerance are only available with RSS 174 struct PQP_DistanceResult
180 double query_time_secs;
199 int NumBVTests() {
return num_bv_tests; }
200 int NumTriTests() {
return num_tri_tests; }
201 double QueryTimeSecs() {
return query_time_secs; }
208 PQP_REAL Distance() {
return distance; }
209 const PQP_REAL *P1() {
return p1; }
210 const PQP_REAL *P2() {
return p2; }
211 int ID1() {
return id1; }
212 int ID2() {
return id2; }
216 struct PQP_ToleranceResult
222 double query_time_secs;
229 int closer_than_tolerance;
239 int NumBVTests() {
return num_bv_tests; }
240 int NumTriTests() {
return num_tri_tests; }
241 double QueryTimeSecs() {
return query_time_secs; }
247 PQP_REAL Distance() {
return distance; }
248 const PQP_REAL *P1() {
return p1; }
249 const PQP_REAL *P2() {
return p2; }
253 int CloserThanTolerance() {
return closer_than_tolerance; }
void Position1(int k, PQP_REAL _pos[3])
void Position2(int k, PQP_REAL _pos[3])
int BeginModel(int num_tris=8)
int AddTri(const PQP_REAL *p1, const PQP_REAL *p2, const PQP_REAL *p3, const PQP_REAL *n1, const PQP_REAL *n2, const PQP_REAL *n3, int _vertex_id[3], int _neighbor_id[3], int id)
int have_vertex2(int vertex_id)
int have_vertex1(int vertex_id)
void Normal(int k, PQP_REAL _norm[3])