Struct ncollide::query::Ray
[−]
[src]
pub struct Ray<P> where
P: Point, { pub origin: P, pub dir: <P as Point>::Vector, }
A Ray.
Fields
origin: P
Starting point of the ray.
dir: <P as Point>::Vector
Direction of the ray.
Methods
impl<P> Ray<P> where
P: Point,
[src]
P: Point,
fn new(origin: P, dir: <P as Point>::Vector) -> Ray<P>
Creates a new ray starting from origin
and with the direction dir
. dir
must be
normalized.
fn transform_by<M>(&self, m: &M) -> Ray<P> where
M: Isometry<P>,
M: Isometry<P>,
Transforms this ray by the given isometry.
fn inverse_transform_by<M>(&self, m: &M) -> Ray<P> where
M: Isometry<P>,
M: Isometry<P>,
Transforms this ray by the inverse of the given isometry.
fn translate_by(&self, v: <P as Point>::Vector) -> Ray<P>
Translates this ray by the given vector. Its direction is left unchanged.
Trait Implementations
impl<P> Clone for Ray<P> where
P: Clone + Point,
<P as Point>::Vector: Clone,
[src]
P: Clone + Point,
<P as Point>::Vector: Clone,
impl<P> Copy for Ray<P> where
P: Copy + Point,
<P as Point>::Vector: Copy,
[src]
P: Copy + Point,
<P as Point>::Vector: Copy,
impl<P> Decodable for Ray<P> where
P: Decodable + Point,
<P as Point>::Vector: Decodable,
[src]
P: Decodable + Point,
<P as Point>::Vector: Decodable,
fn decode<__DP>(__arg_0: &mut __DP) -> Result<Ray<P>, <__DP as Decoder>::Error> where
__DP: Decoder,
__DP: Decoder,
impl<P> Encodable for Ray<P> where
P: Encodable + Point,
<P as Point>::Vector: Encodable,
[src]
P: Encodable + Point,
<P as Point>::Vector: Encodable,
fn encode<__SP>(
&self,
__arg_0: &mut __SP
) -> Result<(), <__SP as Encoder>::Error> where
__SP: Encoder,
&self,
__arg_0: &mut __SP
) -> Result<(), <__SP as Encoder>::Error> where
__SP: Encoder,
impl<P> Debug for Ray<P> where
P: Debug + Point,
<P as Point>::Vector: Debug,
[src]
P: Debug + Point,
<P as Point>::Vector: Debug,