fixed compile issues with switch to new Shape::IntersectionList

git-svn-id: svn://anubis/fart/branches/2009-02-23_Shape_IntersectList_Update@145 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2009-02-23 20:26:45 +00:00
parent 0c7f85db96
commit ab2832a660
2 changed files with 6 additions and 6 deletions

View File

@ -171,17 +171,17 @@ vector<Scene::ShapeDistance> Scene::getRayHits(const Ray & ray)
it != m_shapes.end();
it++)
{
Shape::IntersectionList intersections = (*it)->intersect(ray);
Shape::IntersectionList intersections = (*it)->intersect(*it, ray);
for (int i = 0, num_results = intersections.size();
i < num_results;
i++)
{
refptr<Shape> shape = intersections[i].first;
refptr<Vector> isect_point = intersections[i].second;
Vector normal = shape->getNormalAt(*isect_point);
const Vector & isect_point = intersections[i].second;
Vector normal = shape->getNormalAt(isect_point);
double dot = normal % ray.getDirection();
double intersect_dist = ((*isect_point) - ray.getOrigin()).mag();
double intersect_dist = (isect_point - ray.getOrigin()).mag();
if (dot < 0.0) /* cull back faces */
{
double transparency = (*it)->getTransparency();

View File

@ -10,8 +10,8 @@ Intersect::Intersect(refptr<Shape> shape1, refptr<Shape> shape2)
Shape::IntersectionList Intersect::intersect(refptr<Shape> _this, const Ray & ray)
{
IntersectionList res;
IntersectionList res1 = m_shape1->intersect(ray);
IntersectionList res2 = m_shape2->intersect(ray);
IntersectionList res1 = m_shape1->intersect(m_shape1, ray);
IntersectionList res2 = m_shape2->intersect(m_shape2, ray);
/* TODO: finish */