00001 00002 /*************************************************************************** 00003 * Copyright (C) 1998-2008 by authors (see AUTHORS.txt ) * 00004 * * 00005 * This file is part of Lux Renderer. * 00006 * * 00007 * Lux Renderer is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 3 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 * Lux Renderer is distributed in the hope that it will be useful, * 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00015 * GNU General Public License for more details. * 00016 * * 00017 * You should have received a copy of the GNU General Public License * 00018 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 00019 * * 00020 * This project is based on PBRT ; see http://www.pbrt.org * 00021 * Lux Renderer website : http://www.luxrender.org * 00022 ***************************************************************************/ 00023 00024 // bruteforce.cpp* 00025 #include "lux.h" 00026 #include "primitive.h" 00027 00028 namespace lux 00029 { 00030 00031 // BruteForceAccel Declarations 00032 class BruteForceAccel : public Aggregate { 00033 public: 00034 // BruteForceAccel Public Methods 00035 BruteForceAccel(const vector<Primitive* > &p); 00036 ~BruteForceAccel(); 00037 BBox WorldBound() const; 00038 bool CanIntersect() const { return true; } 00039 bool Intersect(const Ray &ray, Intersection *isect) const; 00040 bool IntersectP(const Ray &ray) const; 00041 00042 static Primitive *CreateAccelerator(const vector<Primitive* > &prims, const ParamSet &ps); 00043 00044 private: 00045 // BruteForceAccel Private Data 00046 vector<Primitive* > prims; 00047 BBox bounds; 00048 }; 00049 00050 }//namespace lux 00051