4998bd11f3d8b7df9408aa8b2f2746d8ddec4b0f
2 #include "PerspectiveCamera.hxx"
6 : m_camera(new PerspectiveCamera(Vec3f(0,0,8),
13 m_bgColor(Vec3f(0,0,0))
22 Scene::Scene(const Scene
& s
)
28 Scene::operator=(const Scene
& s
)
34 Scene::Add(Primitive
* p
)
36 m_primitives
.push_back(p
);
41 Scene::Intersect(Ray
& ray
)
44 float t
= std::numeric_limits
<float>::max();
45 for (std::vector
<Primitive
*>::iterator i
= m_primitives
.begin();
46 i
!= m_primitives
.end(); i
++) {
47 // store closest object hit
48 if (hit
|= (*i
)->Intersect(ray
)) {
59 Scene::Occluded(Ray
& ray
)
65 Scene::RayTrace(Ray
& ray
)
68 return ray
.hit()->shader()->Shade(ray
);
This page took 0.047062 seconds and 3 git commands to generate.