00001 /*************************************************************************** 00002 * Copyright (C) 1998-2010 by authors (see AUTHORS.txt ) * 00003 * * 00004 * This file is part of LuxRays. * 00005 * * 00006 * LuxRays is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 3 of the License, or * 00009 * (at your option) any later version. * 00010 * * 00011 * LuxRays is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License * 00017 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 00018 * * 00019 * LuxRays website: http://www.luxrender.net * 00020 ***************************************************************************/ 00021 00022 #ifndef _LUXRAYS_BSPHERE_H 00023 #define _LUXRAYS_BSPHERE_H 00024 00025 #include "luxrays/core/geometry/vector.h" 00026 #include "luxrays/core/geometry/point.h" 00027 #include "luxrays/core/geometry/ray.h" 00028 00029 namespace luxrays { 00030 00031 class BSphere { 00032 public: 00033 // BBox Public Methods 00034 00035 BSphere() : center(0.f, 0.f, 0.f) { 00036 rad = 0.f; 00037 } 00038 00039 BSphere(const Point &c, const float r) : center(c) { 00040 rad = r; 00041 } 00042 00043 // BSphere Public Data 00044 Point center; 00045 float rad; 00046 }; 00047 00048 inline std::ostream &operator<<(std::ostream &os, const BSphere &s) { 00049 os << "BSphere[" << s.center << ", " << s.rad << "]"; 00050 return os; 00051 } 00052 00053 } 00054 00055 #endif /* _LUXRAYS_BSPHERE_H */
1.6.3