ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/cmglare.h
Revision: 2.1
Committed: Mon Sep 9 17:19:51 2019 UTC (4 years, 6 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R4, rad5R3, HEAD
Log Message:
Added Nathaniel Jones' dcglare utility

File Contents

# User Rev Content
1 greg 2.1 #ifndef _RAD_CMGLARE_H_
2     #define _RAD_CMGLARE_H_
3    
4     #include "rtio.h"
5     #include "time.h"
6     #include "fvect.h"
7     #include "cmatrix.h"
8    
9     #define DC_GLARE /* Perform glare autonomy calculation */
10    
11     #ifdef __cplusplus
12     extern "C" {
13     #endif
14    
15     #ifdef DC_GLARE
16     #define TIMER(c, m) do { \
17     clock_t temp = clock(); \
18     fprintf(stderr, "%s: %g s\n", m, 1.0 * (temp - c) / CLOCKS_PER_SEC); \
19     c = temp; } while(0)
20     #else
21     #define TIMER(c, m)
22     #endif
23    
24     float* cm_glare(const CMATRIX *dcmx, const CMATRIX *evmx, const CMATRIX *smx, const int *occupied, const double dgp_limit, const double dgp_threshold, const FVECT *views, const FVECT dir, const FVECT up);
25     int cm_load_schedule(const int count, int* schedule, FILE *fp);
26     FVECT* cm_load_views(const int nrows, const int inform, FILE *fp);
27     int cm_write_glare(const float *mp, const int nrows, const int ncols, const int dtype, FILE *fp);
28    
29     #ifdef __cplusplus
30     }
31     #endif
32     #endif /* _RAD_CMGLARE_H_ */