P2tPoint* p2t_triangle_opposite_point (P2tTriangle* THIS, P2tTriangle* t, P2tPoint* p) { if (THIS == NULL) { fprintf(stderr, "P2tTriangle* THIS is NULL!\n"); THROW( MAPTOOL_00001_EXCEPTION ); } P2tPoint *cw = p2t_triangle_point_cw (t, p); /*double x = cw->x; double y = cw->y; x = p->x; y = p->y; P2tPoint* ham = */p2t_triangle_point_cw (THIS, cw); return p2t_triangle_point_cw (THIS, cw); }
void p2t_sweepcontext_map_triangle_to_nodes (P2tSweepContext *THIS, P2tTriangle* t) { int i; for (i = 0; i < 3; i++) { if (!p2t_triangle_get_neighbor (t, i)) { P2tNode* n = p2t_advancingfront_locate_point (THIS->front_, p2t_triangle_point_cw (t, p2t_triangle_get_point (t, i))); if (n) n->triangle = t; } } }