gpuray_glsl

diff src/cone.h @ 2:6e3a4daf3159

adding cones
author John Tsiombikas <nuclear@mutantstargoat.com>
date Sun, 09 Nov 2014 14:39:01 +0200
parents
children 297dbc5080c4
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/cone.h	Sun Nov 09 14:39:01 2014 +0200
     1.3 @@ -0,0 +1,18 @@
     1.4 +#ifndef CONE_H_
     1.5 +#define CONE_H_
     1.6 +
     1.7 +#include "vmath/vmath.h"
     1.8 +#include "object.h"
     1.9 +
    1.10 +class Cone : public Object {
    1.11 +public:
    1.12 +	float angle;
    1.13 +	float ymin, ymax;	/* in local space */
    1.14 +
    1.15 +	Cone();
    1.16 +	explicit Cone(float angle, float ymin = 0.0f, float ymax = 1.0f);
    1.17 +
    1.18 +	bool intersect(const Ray &ray, HitPoint *pt) const;
    1.19 +};
    1.20 +
    1.21 +#endif	/* CONE_H_ */