/* ====================================================================== Regions of interest used by mkpmap to constrain location of photons Roland Schregle (roland.schregle@{hslu.ch, gmail.com} (c) Fraunhofer Institute for Solar Energy Systems, supported by the German Research Foundation (DFG LU-204/10-2, "Fassadenintegrierte Regelsysteme" (FARESYS)) (c) Lucerne University of Applied Sciences and Arts, supported by the Swiss National Science Foundation (SNSF #147053, "Daylight Redirecting Components", SNSF #179067, "Light Fields for Spatio-Temporal Glare Assessment") (c) Tokyo University of Science, supported by the JSPS Grants-in-Aid for Scientific Research (KAKENHI JP19KK0115, "Three-Dimensional Light Flow") ====================================================================== $Id$ */ #ifndef _PMAP_ROI_H #define _PMAP_ROI_H #include "ray.h" #define PMAP_MAXROI 32768 #define PMAP_ROI_ISSPHERE(roi) ((roi)->siz[1] <= 0 && (roi)->siz[2] <= 0) #define PMAP_ROI_SETSPHERE(roi) ((roi)->siz[1] = (roi)->siz[2] = -1) /* Region of interest defined by geometry */ typedef struct { /* siz [1], siz [2] <= 0 --> sphere, else rectangle */ float pos [3], siz [3]; } PhotonMapROI; /* Rectangular / spherical regions of interest */ extern unsigned pmapNumROI; extern PhotonMapROI *pmapROI; /* Polyhedral regions of interest by modifier */ extern char *pmapROImodList []; extern OBJECT polyROIset []; /* Bounding box for polyhedral ROI */ extern PhotonMapROI polyROIbbox; void getPolyROIs (char **roiModList); /* Find geometry of polyhedral regions of interest from modifier list */ int photonInROI (const RAY *photonRay); /* Returns nonzero if photon defined by photonRay lies in any defined * region of interest */ #endif