a = (dx * dx) / (ea * ea) + (dy * dy) / (eb * eb);
return (a <= 1);
}
-int point_within_sphere_with_coords(float x0, float y0, float z0, float r,
- float x, float y, float z)
-{
- float rr =
- (x - x0) * (x - x0) + (y - y0) * (y - y0) + (z - z0) * (z - z0);
- rr = (float) pow(rr, 0.5);
- if (rr <= r)
- return 1;
- return 0;
-}
int point_in_polygon(glCompPoly* selPoly,glCompPoint p)
{
extern int point_within_ellips_with_coords(float ex, float ey,
float ea, float eb,
float px, float py);
-extern int point_within_sphere_with_coords(float x0, float y0, float z0,
- float r, float x, float y,
- float z);