25 lines
316 B
C
25 lines
316 B
C
#ifndef RAY2_H
|
|
#define RAY2_H
|
|
|
|
#include "../../../geo/Point2.h"
|
|
|
|
struct Ray2 {
|
|
|
|
/** starting position */
|
|
Point2 start;
|
|
|
|
/** ray direction */
|
|
Point2 dir;
|
|
|
|
/** empty ctor */
|
|
Ray2() {;}
|
|
|
|
/** ctor */
|
|
Ray2(const Point2 start, const Point2 dir) : start(start), dir(dir.normalized()) {
|
|
;
|
|
}
|
|
|
|
};
|
|
|
|
#endif // RAY2_H
|