bbd67851355a17d674c7b49267255c8b0024ece0
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
);
44 Scene::Intersect(Ray
& ray
)
46 bool intersect
= false;
48 for(unsigned int i
= 0; i
< m_primitives
.size(); ++i
)
50 intersect
|= m_primitives
[i
]->Intersect(ray
);
57 Scene::Occluded(Ray
& ray
)
63 Scene::RayTrace(Ray
& ray
)
65 bool intersect
= this->Intersect(ray
);
66 return (intersect
) ? ray
.hit()->shader()->Shade(ray
) : m_bgColor
;
This page took 0.038269 seconds and 3 git commands to generate.