Skip to content

Commit 3fae2f1

Browse files
committed
Fix Travis
1 parent 4add979 commit 3fae2f1

File tree

3 files changed

+75
-69
lines changed

3 files changed

+75
-69
lines changed

src/appleseed/renderer/modeling/light/ArHosekSkyModelData_Spectral.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ This file contains the coefficient data for the spectral version of the model.
100100
*/
101101

102102
// uses Apr 26 dataset
103-
103+
/*
104104
double dataset320[] =
105105
{
106106
// albedo 0, turbidity 1
@@ -13858,7 +13858,7 @@ double* datasetsRad[] =
1385813858
datasetRad680,
1385913859
datasetRad720
1386013860
};
13861-
13861+
*/
1386213862
// Uses Feb 9 dataset
1386313863
double solarDataset320[] =
1386413864
{
@@ -33718,7 +33718,7 @@ double* solarDatasets[] =
3371833718
solarDataset680,
3371933719
solarDataset720
3372033720
};
33721-
33721+
/*
3372233722
double limbDarkeningDataset320[] =
3372333723
{ 0.087657, 0.767174, 0.658123, -1.02953, 0.703297, -0.186735 };
3372433724

@@ -33766,3 +33766,4 @@ double* limbDarkeningDatasets[] =
3376633766
limbDarkeningDataset680,
3376733767
limbDarkeningDataset720
3376833768
};
33769+
*/

src/appleseed/renderer/modeling/light/HosekSun.cpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
#include <cstddef>
5858

5959
// Forward declarations.
60-
namespace foundation { class IAbortSwitch; }
61-
namespace renderer { class Assembly; }
62-
namespace renderer { class ShadingContext; }
60+
namespace foundation { class IAbortSwitch; }
61+
namespace renderer { class Assembly; }
62+
namespace renderer { class ShadingContext; }
6363

6464
using namespace foundation;
6565

@@ -72,9 +72,8 @@ namespace
7272
// Hosek & Wilkie model data.
7373
//
7474

75-
#include "renderer\modeling\light\ArHosekSkyModelData_Spectral.h"
76-
77-
75+
#include "renderer/modeling/light/ArHosekSkyModelData_Spectral.h"
76+
7877
//
7978
// Hosek Sun light.
8079
//
@@ -228,10 +227,12 @@ namespace
228227
void HosekSunLightFactory::release()
229228
{
230229
delete this;
230+
}
231231

232232
const char* HosekSunLightFactory::get_model() const
233233
{
234234
return Model;
235+
}
235236

236237
Dictionary HosekSunLightFactory::get_model_metadata() const
237238
{
@@ -240,13 +241,17 @@ Dictionary HosekSunLightFactory::get_model_metadata() const
240241
.insert("name", Model)
241242
.insert("label", "Hosek Sun Light")
242243
.insert("help", "Hosek's Physically-based sun light");
244+
}
243245

244246
DictionaryArray HosekSunLightFactory::get_input_metadata() const
245247
{
246-
DictionaryArray metada
248+
DictionaryArray metadata;
249+
247250
add_common_sun_input_metadata(metadata);
248-
add_common_input_metadata(metadat
251+
add_common_input_metadata(metadata);
252+
249253
return metadata;
254+
}
250255

251256
auto_release_ptr<Light> HosekSunLightFactory::create(
252257
const char* name,

src/appleseed/renderer/modeling/light/PreethamSun.cpp

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include "renderer/modeling/input/inputarray.h"
3838
#include "renderer/modeling/input/source.h"
3939
#include "renderer/modeling/light/lighttarget.h"
40-
#include "renderer/modeling/light/sunLight.h"
40+
#include "renderer/modeling/light/sunlight.h"
4141
#include "renderer/modeling/project/project.h"
4242
#include "renderer/modeling/scene/scene.h"
4343

@@ -64,29 +64,29 @@ using namespace foundation;
6464
namespace renderer
6565
{
6666

67-
namespace
68-
{
69-
//
70-
// Physically-based Sun light.
71-
//
72-
// References:
73-
//
74-
// http://www.cs.utah.edu/~shirley/papers/sunsky/sunsky.pdf
75-
// http://ompf2.com/viewtopic.php?f=3&t=33
76-
//
67+
namespace
68+
{
69+
//
70+
// Physically-based Sun light.
71+
//
72+
// References:
73+
//
74+
// http://www.cs.utah.edu/~shirley/papers/sunsky/sunsky.pdf
75+
// http://ompf2.com/viewtopic.php?f=3&t=33
76+
//
7777

78-
const char* Model = "Preetham_sun_light";
78+
const char* Model = "Preetham_sun_light";
79+
80+
constexpr float SolidAngleSun = 6.807e-5f;
7981

80-
constexpr float SolidAngleSun = 6.807e-5f;
81-
}
8282

8383
class PreethamSunLight
8484
:public SunLight
8585
{
8686
public:
8787
PreethamSunLight(
88-
const char* name,
89-
const ParamArray& params)
88+
const char* name,
89+
const ParamArray& params)
9090
: SunLight(name, params)
9191
{
9292
}
@@ -102,10 +102,10 @@ namespace renderer
102102
}
103103

104104
bool on_frame_begin(
105-
const Project& project,
106-
const BaseGroup* parent,
107-
OnFrameBeginRecorder& recorder,
108-
IAbortSwitch* abort_switch) override
105+
const Project& project,
106+
const BaseGroup* parent,
107+
OnFrameBeginRecorder& recorder,
108+
IAbortSwitch* abort_switch) override
109109
{
110110
if (!SunLight::on_frame_begin(project, parent, recorder, abort_switch))
111111
return false;
@@ -115,16 +115,16 @@ namespace renderer
115115
return true;
116116
}
117117

118-
private:
118+
private:
119119

120120
RegularSpectrum31f m_k1;
121121
RegularSpectrum31f m_k2;
122122

123123
void PreethamSunLight::compute_sun_radiance(
124-
const Vector3d& outgoing,
124+
const Vector3d& outgoing,
125125
const float turbidity,
126126
const float radiance_multiplier,
127-
RegularSpectrum31f& radiance,
127+
RegularSpectrum31f& radiance,
128128
const float squared_distance_to_center = 0.0f) const override
129129
{
130130
// Compute the relative optical mass.
@@ -234,7 +234,7 @@ namespace renderer
234234
tau_a[i] *
235235
tau_o[i] *
236236
#ifdef COMPUTE_REDUNDANT
237-
tau_g[i] * // always 1.0
237+
tau_g[i] * // always 1.0
238238
#endif
239239
tau_wa[i] *
240240
limb_darkening *
@@ -253,45 +253,45 @@ namespace renderer
253253
m_k2[i] = std::pow(g_light_wavelengths_um[i], -Alpha);
254254
}
255255
};
256+
}
257+
//
258+
// PreethamSunLightFactory class implementation.
259+
//
256260

257-
//
258-
// PreethamSunLightFactory class implementation.
259-
//
260-
261-
void PreethamSunLightFactory::release()
262-
{
263-
delete this;
264-
}
261+
void PreethamSunLightFactory::release()
262+
{
263+
delete this;
264+
}
265265

266-
const char* PreethamSunLightFactory::get_model() const
267-
{
268-
return Model;
269-
}
266+
const char* PreethamSunLightFactory::get_model() const
267+
{
268+
return Model;
269+
}
270270

271-
Dictionary PreethamSunLightFactory::get_model_metadata() const
272-
{
273-
return
274-
Dictionary()
275-
.insert("name", Model)
276-
.insert("label", "Preetham sun Light")
277-
.insert("help", "Preetham's Physically-based sun light");
278-
}
279-
280-
DictionaryArray PreethamSunLightFactory::get_input_metadata() const
281-
{
282-
DictionaryArray metadata;
271+
Dictionary PreethamSunLightFactory::get_model_metadata() const
272+
{
273+
return
274+
Dictionary()
275+
.insert("name", Model)
276+
.insert("label", "Preetham sun Light")
277+
.insert("help", "Preetham's Physically-based sun light");
278+
}
279+
280+
DictionaryArray PreethamSunLightFactory::get_input_metadata() const
281+
{
282+
DictionaryArray metadata;
283283

284-
add_common_sun_input_metadata(metadata);
285-
add_common_input_metadata(metadata);
284+
add_common_sun_input_metadata(metadata);
285+
add_common_input_metadata(metadata);
286286

287-
return metadata;
288-
}
287+
return metadata;
288+
}
289289

290-
auto_release_ptr<Light> PreethamSunLightFactory::create(
291-
const char* name,
292-
const ParamArray& params) const
293-
{
294-
return auto_release_ptr<Light>(new PreethamSunLight(name, params));
295-
}
290+
auto_release_ptr<Light> PreethamSunLightFactory::create(
291+
const char* name,
292+
const ParamArray& params) const
293+
{
294+
return auto_release_ptr<Light>(new PreethamSunLight(name, params));
295+
}
296296

297297
} // namespace renderer

0 commit comments

Comments
 (0)