UNPKG
cga.js
Version:
latest (0.0.1)
1.0.0
0.0.1
Xtor Compute Geometry Algorithm Libary 计算几何算法库
github.com/yszhao91/cga-ts
yszhao91/cga-ts
cga.js
/
src
/
struct
/
3d
/
Ray.ts
9 lines
•
240 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
import
{
Vec3
}
from
'../../math/Vec3'
;
export
class
Ray
{
origin
:
Vec3
;
direction
:
Vec3
;
constructor
(
origin: Vec3, direction: Vec3
) {
this
.
origin
= origin;
this
.
direction
= direction.
normalize
(); } }