gpuray_glsl

annotate src/cone.h @ 3:297dbc5080c4

cone intersection
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 09 Nov 2014 20:13:33 +0200
parents 6e3a4daf3159
children
rev   line source
nuclear@3 1 /*
nuclear@3 2 Simple introductory ray tracer
nuclear@3 3 Copyright (C) 2012 John Tsiombikas <nuclear@member.fsf.org>
nuclear@3 4
nuclear@3 5 This program is free software: you can redistribute it and/or modify
nuclear@3 6 it under the terms of the GNU General Public License as published by
nuclear@3 7 the Free Software Foundation, either version 3 of the License, or
nuclear@3 8 (at your option) any later version.
nuclear@3 9
nuclear@3 10 This program is distributed in the hope that it will be useful,
nuclear@3 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
nuclear@3 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
nuclear@3 13 GNU General Public License for more details.
nuclear@3 14
nuclear@3 15 You should have received a copy of the GNU General Public License
nuclear@3 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
nuclear@3 17 */
nuclear@2 18 #ifndef CONE_H_
nuclear@2 19 #define CONE_H_
nuclear@2 20
nuclear@2 21 #include "vmath/vmath.h"
nuclear@2 22 #include "object.h"
nuclear@2 23
nuclear@2 24 class Cone : public Object {
nuclear@2 25 public:
nuclear@2 26 float angle;
nuclear@2 27 float ymin, ymax; /* in local space */
nuclear@2 28
nuclear@2 29 Cone();
nuclear@2 30 explicit Cone(float angle, float ymin = 0.0f, float ymax = 1.0f);
nuclear@2 31
nuclear@2 32 bool intersect(const Ray &ray, HitPoint *pt) const;
nuclear@2 33 };
nuclear@2 34
nuclear@2 35 #endif /* CONE_H_ */