import Vertice from './Vertice' ; import Vector from './Vector' ; export default class Ray { public vertice : Vertice ; public vector : Vector ; param position param direction constructor constructor ( position , direction ) { this . vertice = position . clone ( ) ; this . vector = direction . clone ( ) ; this . vector . normalize ( ) ; } setVertice ( position ) { this . vertice = position . clone ( ) ; return this ; } setVector ( direction ) { this . vector = direction . clone ( ) ; this . vector . normalize ( ) ; return this ; } clone ( ) { var rayCopy = new Ray ( this . vertice , this . vector ) ; return rayCopy ; } } ;