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
);
40 Scene::Intersect(Ray
& ray
)
43 for( std::vector
<Primitive
*>::iterator i
= m_primitives
.begin();
44 i
!= m_primitives
.end(); i
++ ) {
45 hit
|= (*i
)->Intersect(ray
);
51 Scene::Occluded(Ray
& ray
)
57 Scene::RayTrace(Ray
& ray
)
59 return (Intersect(ray
)) ? Vec3f(255,255,255) : Vec3f(0,0,0);
This page took 0.046535 seconds and 5 git commands to generate.