a1d3acdea9d120670d1338eb1551ed3345244a62
2 #include "PerspectiveCamera.hxx"
5 : m_camera(new PerspectiveCamera(Vec3f(0,0,8),
12 m_bgColor(Vec3f(0,0,0))
21 Scene::Scene(const Scene
& s
)
27 Scene::operator=(const Scene
& s
)
33 Scene::Add(Primitive
* p
)
35 m_primitives
.push_back(p
);
41 m_lights
.push_back(l
);
45 Scene::Intersect(Ray
& ray
)
47 bool intersect
= false;
49 for(unsigned int i
= 0; i
< m_primitives
.size(); ++i
)
51 intersect
|= m_primitives
[i
]->Intersect(ray
);
58 Scene::Occluded(Ray
& ray
)
64 Scene::RayTrace(Ray
& ray
)
66 bool intersect
= this->Intersect(ray
);
67 return (intersect
) ? ray
.hit()->shader()->Shade(ray
) : m_bgColor
;
This page took 0.044814 seconds and 3 git commands to generate.