1 //******************************************************************************
2 ///
3 /// @file frontend/configfrontend.h
4 ///
5 /// This header file defines all types that can be configured by platform
6 /// specific code for frontend use. It further allows insertion of platform
7 /// specific function prototypes making use of those types.
8 ///
9 /// @copyright
10 /// @parblock
11 ///
12 /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
13 /// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
14 ///
15 /// POV-Ray is free software: you can redistribute it and/or modify
16 /// it under the terms of the GNU Affero General Public License as
17 /// published by the Free Software Foundation, either version 3 of the
18 /// License, or (at your option) any later version.
19 ///
20 /// POV-Ray is distributed in the hope that it will be useful,
21 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
22 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 /// GNU Affero General Public License for more details.
24 ///
25 /// You should have received a copy of the GNU Affero General Public License
26 /// along with this program.  If not, see <http://www.gnu.org/licenses/>.
27 ///
28 /// ----------------------------------------------------------------------------
29 ///
30 /// POV-Ray is based on the popular DKB raytracer version 2.12.
31 /// DKBTrace was originally written by David K. Buck.
32 /// DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
33 ///
34 /// @endparblock
35 ///
36 //******************************************************************************
37 
38 #ifndef POVRAY_FRONTEND_CONFIGFRONTEND_H
39 #define POVRAY_FRONTEND_CONFIGFRONTEND_H
40 
41 #include "base/configbase.h"
42 #include "syspovconfigfrontend.h"
43 
44 //##############################################################################
45 ///
46 /// @defgroup PovFrontendConfig Front-End Compile-Time Configuration
47 /// @ingroup PovFrontend
48 /// @ingroup PovConfig
49 ///
50 /// @{
51 
52 /// @def DEFAULT_OUTPUT_FORMAT
53 /// The output file format used if the user doesn't specify one.
54 ///
55 /// Must be one of the `kPOVList_FileType_*` enum values defined in
56 /// @ref povmsid.h
57 ///
58 #ifndef DEFAULT_OUTPUT_FORMAT
59     #define DEFAULT_OUTPUT_FORMAT   kPOVList_FileType_Targa
60 #endif
61 
62 //******************************************************************************
63 ///
64 /// @name Default Display Gamma
65 ///
66 /// Default `Display_Gamma` INI setting.
67 ///
68 /// The information from these settings is used for `Display_Gamma` when there
69 /// isn't one specified by the user in the POVRAY.INI.  For those systems that
70 /// are very savvy, these could be functions which return the current display
71 /// gamma.
72 ///
73 /// @{
74 
75 /// @def DEFAULT_DISPLAY_GAMMA_TYPE
76 /// General gamma curve type, as defined in @ref GammaTypeId.
77 ///
78 #ifndef DEFAULT_DISPLAY_GAMMA_TYPE
79     #define DEFAULT_DISPLAY_GAMMA_TYPE kPOVList_GammaType_SRGB
80 #endif
81 
82 /// @def DEFAULT_DISPLAY_GAMMA
83 /// Gamma curve numerial parameter.
84 ///
85 /// If @ref DEFAULT_DISPLAY_GAMMA_TYPE is set to @ref kPOVList_GammaType_PowerLaw,
86 /// this is the overall effective gamma of the display system.
87 ///
88 #ifndef DEFAULT_DISPLAY_GAMMA
89     #define DEFAULT_DISPLAY_GAMMA 2.2
90 #endif
91 
92 /// @}
93 ///
94 //******************************************************************************
95 
96 /// @def POVMSLongToCDouble
97 /// Macro to convert values of type @ref POVMSLong to `double`.
98 ///
99 /// This macro converts a `POVMSLong` 64 bit value to a double precision
100 /// floating point value, to allow further processing of such values (albeit at
101 /// potentially lower precision) even if it is a compound data type.
102 ///
103 #ifndef POVMSLongToCDouble
104     #define POVMSLongToCDouble(x) double(x)
105 #endif
106 
107 //******************************************************************************
108 ///
109 /// @name Debug Settings.
110 ///
111 /// The following settings enable or disable certain debugging aids, such as run-time sanity checks
112 /// or additional log output.
113 ///
114 /// Unless noted otherwise, a non-zero integer will enable the respective debugging aids, while a
115 /// zero value will disable them.
116 ///
117 /// It is recommended that system-specific configurations leave these settings undefined in release
118 /// builds, in which case they will default to @ref POV_DEBUG unless noted otherwise.
119 ///
120 /// @{
121 
122 /// @def POV_FRONTEND_DEBUG
123 /// Enable run-time sanity checks for the @ref PovFrontend.
124 ///
125 /// Define as non-zero integer to enable, or zero to disable.
126 ///
127 #ifndef POV_FRONTEND_DEBUG
128     #define POV_FRONTEND_DEBUG POV_DEBUG
129 #endif
130 
131 /// @}
132 ///
133 //******************************************************************************
134 ///
135 /// @name Non-Configurable Macros
136 ///
137 /// The following macros are configured automatically at compile-time; they cannot be overridden by
138 /// system-specific configuration.
139 ///
140 /// @{
141 
142 #if POV_FRONTEND_DEBUG
143     #define POV_FRONTEND_ASSERT(expr) POV_ASSERT_HARD(expr)
144 #else
145     #define POV_FRONTEND_ASSERT(expr) POV_ASSERT_DISABLE(expr)
146 #endif
147 
148 /// @}
149 ///
150 //******************************************************************************
151 
152 /// @}
153 ///
154 //##############################################################################
155 
156 #endif // POVRAY_FRONTEND_CONFIGFRONTEND_H
157