BRL-CAD
defines.h
Go to the documentation of this file.
1/* D E F I N E S . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2015-2023 United States Government as represented by
5 * the U.S. Army Research Laboratory.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * version 2.1 as published by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this file; see the file named COPYING for more
18 * information.
19 */
20
21#ifndef OPTICAL_DEFINES_H
22#define OPTICAL_DEFINES_H
23
24#include "common.h"
25
26#include "bu/vls.h"
27#include "bn/tabdata.h"
28#include "rt/region.h"
29
30/** @addtogroup liboptical
31 *
32 * @brief
33 * Definitions for the BRL-CAD Optical Library, LIBOPTICAL.
34 *
35 */
36/** @{ */
37/** @file optical/defines.h */
38
39__BEGIN_DECLS
40
41#ifndef OPTICAL_EXPORT
42# if defined(OPTICAL_DLL_EXPORTS) && defined(OPTICAL_DLL_IMPORTS)
43# error "Only OPTICAL_DLL_EXPORTS or OPTICAL_DLL_IMPORTS can be defined, not both."
44# elif defined(OPTICAL_DLL_EXPORTS)
45# define OPTICAL_EXPORT COMPILER_DLLEXPORT
46# elif defined(OPTICAL_DLL_IMPORTS)
47# define OPTICAL_EXPORT COMPILER_DLLIMPORT
48# else
49# define OPTICAL_EXPORT
50# endif
51#endif
52
53/* for liboptical */
54OPTICAL_EXPORT extern double AmbientIntensity;
55OPTICAL_EXPORT extern vect_t background;
56
57/* defined in sh_text.c */
58OPTICAL_EXPORT extern struct region env_region; /* environment map region */
59
60/* defined in refract.c */
61OPTICAL_EXPORT extern int max_bounces;
62OPTICAL_EXPORT extern int max_ireflect;
63
64struct floatpixel {
65 double ff_dist; /**< @brief range to ff_hitpt[], <-INFINITY for miss */
66 float ff_hitpt[3];
67 struct region *ff_regp;
68 int ff_frame; /**< @brief >= 0 means pixel was reprojected */
69 short ff_x; /**< @brief screen x, y coords of first location */
70 short ff_y;
71 char ff_color[3];
72};
73
74__END_DECLS
75
76#endif /* OPTICAL_H */
77
78/** @} */
79/*
80 * Local Variables:
81 * mode: C
82 * tab-width: 8
83 * indent-tabs-mode: t
84 * c-file-style: "stroustrup"
85 * End:
86 * ex: shiftwidth=4 tabstop=8
87 */
Header file for the BRL-CAD common definitions.
int max_bounces
struct region env_region
int max_ireflect
double AmbientIntensity
vect_t background
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
Definition: vmath.h:345
double ff_dist
range to ff_hitpt[], <-INFINITY for miss
Definition: defines.h:65
short ff_x
screen x, y coords of first location
Definition: defines.h:69
struct region * ff_regp
Definition: defines.h:67
float ff_hitpt[3]
Definition: defines.h:66
short ff_y
Definition: defines.h:70
int ff_frame
>= 0 means pixel was reprojected
Definition: defines.h:68
char ff_color[3]
Definition: defines.h:71
Definition: region.h:44