nuclear@3: /* nuclear@3: Simple introductory ray tracer nuclear@3: Copyright (C) 2012 John Tsiombikas nuclear@3: nuclear@3: This program is free software: you can redistribute it and/or modify nuclear@3: it under the terms of the GNU General Public License as published by nuclear@3: the Free Software Foundation, either version 3 of the License, or nuclear@3: (at your option) any later version. nuclear@3: nuclear@3: This program is distributed in the hope that it will be useful, nuclear@3: but WITHOUT ANY WARRANTY; without even the implied warranty of nuclear@3: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nuclear@3: GNU General Public License for more details. nuclear@3: nuclear@3: You should have received a copy of the GNU General Public License nuclear@3: along with this program. If not, see . nuclear@3: */ nuclear@2: #ifndef CONE_H_ nuclear@2: #define CONE_H_ nuclear@2: nuclear@2: #include "vmath/vmath.h" nuclear@2: #include "object.h" nuclear@2: nuclear@2: class Cone : public Object { nuclear@2: public: nuclear@2: float angle; nuclear@2: float ymin, ymax; /* in local space */ nuclear@2: nuclear@2: Cone(); nuclear@2: explicit Cone(float angle, float ymin = 0.0f, float ymax = 1.0f); nuclear@2: nuclear@2: bool intersect(const Ray &ray, HitPoint *pt) const; nuclear@2: }; nuclear@2: nuclear@2: #endif /* CONE_H_ */