PostGIS  2.3.7dev-r@@SVN_REVISION@@
static void calculate_mbc_3 ( const SUPPORTING_POINTS support,
LWBOUNDINGCIRCLE mbc 
)
static

Definition at line 143 of file lwboundingcircle.c.

References LWBOUNDINGCIRCLE::center, circumcenter(), distance2d_pt_pt(), FP_MAX, SUPPORTING_POINTS::p1, SUPPORTING_POINTS::p2, SUPPORTING_POINTS::p3, and LWBOUNDINGCIRCLE::radius.

Referenced by calculate_mbc_from_support().

144 {
145  double d1, d2, d3;
146  circumcenter(support->p1, support->p2, support->p3, mbc->center);
147 
148  d1 = distance2d_pt_pt(mbc->center, support->p1);
149  d2 = distance2d_pt_pt(mbc->center, support->p2);
150  d3 = distance2d_pt_pt(mbc->center, support->p3);
151 
152  mbc->radius = FP_MAX(FP_MAX(d1, d2), d3);
153 }
double distance2d_pt_pt(const POINT2D *p1, const POINT2D *p2)
The old function nessecary for ptarray_segmentize2d in ptarray.c.
Definition: measures.c:2315
const POINT2D * p1
const POINT2D * p3
POINT2D * center
Definition: liblwgeom.h:1621
static void circumcenter(const POINT2D *a, const POINT2D *b, const POINT2D *c, POINT2D *result)
const POINT2D * p2
#define FP_MAX(A, B)

Here is the call graph for this function:

Here is the caller graph for this function: