/*****************************************************************************/ /* */ /* Copyright (C) 2001-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.cc". */ /* */ /*****************************************************************************/ /* */ /* 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 */ /* FB Informatik */ /* Universitaet Salzburg */ /* A-5020 Salzburg, Austria */ /* */ /*****************************************************************************/ #ifndef VRONI_WMAT_H #define VRONI_WMAT_H #include "types.h" #ifdef WMAT #ifndef MAT #define MAT #endif #endif #ifdef MAT typedef struct { vr_bool in_w_mat; /* true if a portion of this VD edge belongs also to */ /* WMAT or MAT */ #ifdef WMAT double r_min; /* minimum contour clearance of this edge */ double r_max; /* maximum contour clearance of this edge */ coord lft_mn_pnt; /* left contact point for disk with radius r_min */ coord lft_mx_pnt; /* left contact point for disk with radius r_max */ coord rgt_mn_pnt; /* right contact point for disk with radius r_min */ coord rgt_mx_pnt; /* right contact point for disk with radius r_max */ #endif #ifdef EXT_APPL_WMAT eam_type ext_appl;/* this field can be set by an application program to */ /* refer to a user-defined entity. */ #endif } w_mat_data; /*********** (weighted) medial axis *********************/ #define IsWmatEdge(E) \ (\ assert(InEdgesList(E)), \ (edges[E].w_mat.in_w_mat)) #define SetWmatEdge(E, B) \ {\ assert(InEdgesList(E)); \ edges[E].w_mat.in_w_mat = B; \ } #endif #ifdef WMAT #define GetWmatRMin(E) \ (\ assert(InEdgesList(E)), \ (edges[E].w_mat.r_min)) #define SetWmatRMin(E, R) \ {\ assert(InEdgesList(E)); \ edges[E].w_mat.r_min = R; \ } #define GetWmatRMax(E) \ (\ assert(InEdgesList(E)), \ (edges[E].w_mat.r_max)) #define SetWmatRMax(E, R) \ {\ assert(InEdgesList(E)); \ edges[E].w_mat.r_max = R; \ } #define GetWmatLftMnPnt(E) \ (\ assert(InEdgesList(E)), \ (edges[E].w_mat.lft_mn_pnt)) #define SetWmatLftMnPnt(E, P) \ {\ assert(InEdgesList(E)); \ edges[E].w_mat.lft_mn_pnt = P; \ } #define GetWmatRgtMnPnt(E) \ (\ assert(InEdgesList(E)), \ (edges[E].w_mat.rgt_mn_pnt)) #define SetWmatRgtMnPnt(E, P) \ {\ assert(InEdgesList(E)); \ edges[E].w_mat.rgt_mn_pnt = P; \ } #define GetWmatLftMxPnt(E) \ (\ assert(InEdgesList(E)), \ (edges[E].w_mat.lft_mx_pnt)) #define SetWmatLftMxPnt(E, P) \ {\ assert(InEdgesList(E)); \ edges[E].w_mat.lft_mx_pnt = P; \ } #define GetWmatRgtMxPnt(E) \ (\ assert(InEdgesList(E)), \ (edges[E].w_mat.rgt_mx_pnt)) #define SetWmatRgtMxPnt(E, P) \ {\ assert(InEdgesList(E)); \ edges[E].w_mat.rgt_mx_pnt = P; \ } #endif #endif