Struct turbine::math::Ray
[−]
[src]
pub struct Ray { pub pos: Vec3, pub dir: Vec3, }
A ray.
Fields
pos: Vec3
The position of the ray.
dir: Vec3
The direction of the ray.
Methods
impl Ray
[src]
fn from_2d(
pos: [f64; 2],
draw_size: [u32; 2],
fov: f32,
near_clip: f32,
far_clip: f32
) -> Ray
[src]
pos: [f64; 2],
draw_size: [u32; 2],
fov: f32,
near_clip: f32,
far_clip: f32
) -> Ray
Creates a ray in view coordinates.
fn ground_plane(&self) -> Option<Vec3>
[src]
Returns position in ground plane.
Returns None
if looking up above the ground.
Returns None
if ground intersects the start position.