Skip to content

Commit

Permalink
Resolve test build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
philippitts committed Apr 8, 2022
1 parent 8870c63 commit 9130824
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ src/build
src/bin
src/objs
.sconsign.dblite
build
37 changes: 19 additions & 18 deletions src/tests/analytic_scenes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "shapes/sphere.h"
#include "spectrum.h"
#include "textures/constant.h"
#include "films/image.h"

struct TestScene {
std::shared_ptr<Scene> scene;
Expand Down Expand Up @@ -271,9 +272,9 @@ std::vector<TestIntegrator> GetIntegrators() {
// Path tracing integrators
for (auto sampler : GetSamplers(Bounds2i(Point2i(0, 0), resolution))) {
std::unique_ptr<Filter> filter(new BoxFilter(Vector2f(0.5, 0.5)));
Film *film =
new Film(resolution, Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
Film *film = new ImageFilm(resolution,
Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
std::shared_ptr<Camera> camera =
std::make_shared<PerspectiveCamera>(
identity, Bounds2f(Point2f(-1, -1), Point2f(1, 1)), 0., 1.,
Expand All @@ -290,9 +291,9 @@ std::vector<TestIntegrator> GetIntegrators() {

for (auto sampler : GetSamplers(Bounds2i(Point2i(0, 0), resolution))) {
std::unique_ptr<Filter> filter(new BoxFilter(Vector2f(0.5, 0.5)));
Film *film =
new Film(resolution, Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
Film *film = new ImageFilm(resolution,
Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
std::shared_ptr<Camera> camera =
std::make_shared<OrthographicCamera>(
identity, Bounds2f(Point2f(-.1, -.1), Point2f(.1, .1)), 0.,
Expand All @@ -309,9 +310,9 @@ std::vector<TestIntegrator> GetIntegrators() {
// Volume path tracing integrators
for (auto sampler : GetSamplers(Bounds2i(Point2i(0, 0), resolution))) {
std::unique_ptr<Filter> filter(new BoxFilter(Vector2f(0.5, 0.5)));
Film *film =
new Film(resolution, Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
Film *film = new ImageFilm(resolution,
Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
std::shared_ptr<Camera> camera =
std::make_shared<PerspectiveCamera>(
identity, Bounds2f(Point2f(-1, -1), Point2f(1, 1)), 0., 1.,
Expand All @@ -327,9 +328,9 @@ std::vector<TestIntegrator> GetIntegrators() {
}
for (auto sampler : GetSamplers(Bounds2i(Point2i(0, 0), resolution))) {
std::unique_ptr<Filter> filter(new BoxFilter(Vector2f(0.5, 0.5)));
Film *film =
new Film(resolution, Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
Film *film = new ImageFilm(resolution,
Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
std::shared_ptr<Camera> camera =
std::make_shared<OrthographicCamera>(
identity, Bounds2f(Point2f(-.1, -.1), Point2f(.1, .1)), 0.,
Expand All @@ -347,9 +348,9 @@ std::vector<TestIntegrator> GetIntegrators() {
// BDPT
for (auto sampler : GetSamplers(Bounds2i(Point2i(0, 0), resolution))) {
std::unique_ptr<Filter> filter(new BoxFilter(Vector2f(0.5, 0.5)));
Film *film =
new Film(resolution, Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
Film *film = new ImageFilm(resolution,
Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
std::shared_ptr<Camera> camera =
std::make_shared<PerspectiveCamera>(
identity, Bounds2f(Point2f(-1, -1), Point2f(1, 1)), 0., 1.,
Expand Down Expand Up @@ -384,9 +385,9 @@ std::vector<TestIntegrator> GetIntegrators() {
// MLT
{
std::unique_ptr<Filter> filter(new BoxFilter(Vector2f(0.5, 0.5)));
Film *film =
new Film(resolution, Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
Film *film = new ImageFilm(resolution,
Bounds2f(Point2f(0, 0), Point2f(1, 1)),
std::move(filter), 1., "test.exr", 1.);
std::shared_ptr<Camera> camera =
std::make_shared<PerspectiveCamera>(
identity, Bounds2f(Point2f(-1, -1), Point2f(1, 1)), 0., 1.,
Expand Down

0 comments on commit 9130824

Please sign in to comment.