Last active
November 10, 2021 05:23
-
-
Save milespossing/e849522623ee0d17d64beabb52fcc54f to your computer and use it in GitHub Desktop.
Simple ray for ray tracer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use amethyst::{ | |
core::math::{Vector3}, | |
ecs::{Component, VecStorage}, | |
}; | |
#[derive(Debug)] | |
pub struct Ray { | |
pub pos: Vector3<f32>, | |
pub vel: Vector3<f32>, | |
} | |
impl Ray { | |
pub fn new(pos: Vector3<f32>, vel: Vector3<f32>) -> Ray{ | |
Ray { pos, vel } | |
} | |
} | |
impl Component for Ray { | |
type Storage = VecStorage<Self>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment