YafaRay Core  v3.2.0-ALPHA-10-g60452c5
ray.h
Go to the documentation of this file.
1 
2 #ifndef Y_RAY_H
3 #define Y_RAY_H
4 
5 #include <yafray_config.h>
6 
7 #include "vector3d.h"
8 
10 
11 class ray_t
12 {
13 public:
14  ray_t(): tmin(0), tmax(-1.0), time(0.0) {}
15  ray_t(const point3d_t &f, const vector3d_t &d, float start=0.0, float end=-1.0, float ftime=0.0):
16  from(f), dir(d), tmin(start), tmax(end), time(ftime) { }
17 
20  mutable float tmin, tmax;
21  float time;
22 };
23 
24 class diffRay_t: public ray_t
25 {
26  public:
27  diffRay_t(): ray_t(), hasDifferentials(false) {}
28  diffRay_t(const ray_t &r): ray_t(r), hasDifferentials(false) {}
29  diffRay_t(const point3d_t &f, const vector3d_t &d, float start=0.0, float end=-1.0, float ftime=0.0):
30  ray_t(f, d, start, end, ftime), hasDifferentials(false) {}
32  point3d_t xfrom, yfrom;
34 };
35 
37 
38 #endif //Y_RAY_H
vector3d_t dir
Definition: ray.h:19
diffRay_t(const ray_t &r)
Definition: ray.h:28
#define __BEGIN_YAFRAY
float tmin
Definition: ray.h:20
Definition: ray.h:11
point3d_t yfrom
Definition: ray.h:32
bool hasDifferentials
Definition: ray.h:31
diffRay_t()
Definition: ray.h:27
float tmax
Definition: ray.h:20
vector3d_t ydir
Definition: ray.h:33
float time
relative frame time (values between [0;1]) at which ray was generated
Definition: ray.h:21
diffRay_t(const point3d_t &f, const vector3d_t &d, float start=0.0, float end=-1.0, float ftime=0.0)
Definition: ray.h:29
ray_t(const point3d_t &f, const vector3d_t &d, float start=0.0, float end=-1.0, float ftime=0.0)
Definition: ray.h:15
Definition: ray.h:24
ray_t()
Definition: ray.h:14
point3d_t from
Definition: ray.h:18
#define __END_YAFRAY