Files
vroni/intersections.h
T
SaraP f3e15b8c8d vroni 7.6 :
- aggiunti file della libreria e progetto visual studio.
2023-09-06 15:44:02 +02:00

89 lines
4.6 KiB
C

/*****************************************************************************/
/* */
/* Copyright (C) 1999-2023 M. Held */
/* */
/* This code is not in the public domain. All rights reserved! Please make */
/* sure to read the full copyright statement contained in "README.txt" or in */
/* the "main" file of this code, such as "main.c". */
/* */
/*****************************************************************************/
/* */
/* Written by: Martin Held */
/* */
/* E-Mail: held@cs.sbg.ac.at */
/* Fax Mail: (+43 662) 8044-611 */
/* Voice Mail: (+43 662) 8044-6304 */
/* Snail Mail: Martin Held */
/* Universitaet Salzburg */
/* FB Informatik */
/* A-5020 Salzburg, Austria */
/* */
/*****************************************************************************/
#ifndef VRONI_INTERSECTIONS_H
#define VRONI_INTERSECTIONS_H
#include <string.h>
//#ifdef VRONI_INFO
#ifdef VRONI_DBG_WARN
#define IntWarning(S1, I1, S2, I2) \
{\
if (verbose) { \
printf("\nwarning in ComputeVD() - the %s %d and the %s %d intersect!\n",\
S1, I1, S2, I2); \
if (strcmp(S1, "pnt") == 0) { \
printf("pnt %d: (%20.16f,%20.16f)\n", I1, \
UnscaleX(pnts[I1].p.x), \
UnscaleY(pnts[I1].p.y)); \
} \
else if (strcmp(S1, "seg") == 0) { \
printf("seg %d: (%20.16f,%20.16f) to (%20.16f,%20.16f)\n", I1, \
UnscaleX(pnts[segs[I1].i1].p.x), \
UnscaleY(pnts[segs[I1].i1].p.y), \
UnscaleX(pnts[segs[I1].i2].p.x), \
UnscaleY(pnts[segs[I1].i2].p.y)); \
} \
else if (strcmp(S1, "arc") == 0) { \
printf("arc %d: (%20.16f,%20.16f) to (%20.16f,%20.16f) centered at (%20.16f,%20.16f)\n", I1, \
UnscaleX(pnts[arcs[I1].i1].p.x), \
UnscaleY(pnts[arcs[I1].i1].p.y), \
UnscaleX(pnts[arcs[I1].i2].p.x), \
UnscaleY(pnts[arcs[I1].i2].p.y), \
UnscaleX(arcs[I1].c.x), \
UnscaleY(arcs[I1].c.y)); \
} \
if (strcmp(S2, "pnt") == 0) { \
printf("pnt %d: (%20.16f,%20.16f)\n", I2, \
UnscaleX(pnts[I2].p.x), \
UnscaleY(pnts[I2].p.y)); \
} \
else if (strcmp(S2, "seg") == 0) { \
printf("seg %d: (%20.16f,%20.16f) to (%20.16f,%20.16f)\n", I2, \
UnscaleX(pnts[segs[I2].i1].p.x), \
UnscaleY(pnts[segs[I2].i1].p.y), \
UnscaleX(pnts[segs[I2].i2].p.x), \
UnscaleY(pnts[segs[I2].i2].p.y)); \
} \
else if (strcmp(S2, "arc") == 0) { \
printf("arc %d: (%20.16f,%20.16f) to (%20.16f,%20.16f) centered at (%20.16f,%20.16f)\n", I2, \
UnscaleX(pnts[arcs[I2].i1].p.x), \
UnscaleY(pnts[arcs[I2].i1].p.y), \
UnscaleX(pnts[arcs[I2].i2].p.x), \
UnscaleY(pnts[arcs[I2].i2].p.y), \
UnscaleX(arcs[I2].c.x), \
UnscaleY(arcs[I2].c.y)); \
} \
} \
}
#else
#define IntWarning(S1, I1, S2, I2) {}
#endif
#endif