gpuray_glsl
diff src/cone.cc @ 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.cc Sun Nov 09 14:39:01 2014 +0200 1.3 @@ -0,0 +1,20 @@ 1.4 +#include "cone.h" 1.5 + 1.6 +Cone::Cone() 1.7 +{ 1.8 + angle = M_PI / 4.0; 1.9 + ymin = 0.0f; 1.10 + ymax = 1.0f; 1.11 +} 1.12 + 1.13 +Cone::Cone(float angle, float ymin, float ymax) 1.14 +{ 1.15 + this->angle = angle; 1.16 + this->ymin = ymin; 1.17 + this->ymax = ymax; 1.18 +} 1.19 + 1.20 +bool Cone::intersect(const Ray &ray, HitPoint *pt) const 1.21 +{ 1.22 + return false; // TODO 1.23 +}