PSM Predicates: orient_2d() signature
glennDittmann opened this issue · comments
Hello, first of all thanks for the library, the concept of the PSM is really cool!
I have generated the predicates PSM and it is working fine so far.
However, the method
GEO::PCK::orient_2d(const double *p0, const double *p1, const double *p2)
only exists with parameters as three double
s (the 2 overloading functions did not get generated).
How is the signature meant? How can I interpret a triangle with 3 double
s? Am I missing something obvious?
It is three pointers to doubles. Your points are supposed to be stored as contiguous arrays of doubles. For instance, you can use ``orient_2d()` as follows:
double p1[2];
double p2[2];
double p3[2];
...
Sign s = GEO::PCK::orient_2d(p1,p2,p3);
...
Hope this helps,
Best,
-- B
Fairly unexperienced with c++ and didn't know const double *p0
can also point to an array of doubles.
Now that makes sense, thanks!