pub trait RayCast<T: Aabb> {
fn cast_to_aaline<A: Axis>(
&mut self,
ray: &Ray<T::Num>,
line: A,
val: T::Num
) -> CastResult<T::Num>;
fn cast_broad(
&mut self,
ray: &Ray<T::Num>,
a: AabbPin<&mut T>
) -> Option<CastResult<T::Num>>;
fn cast_fine(
&mut self,
ray: &Ray<T::Num>,
a: AabbPin<&mut T>
) -> CastResult<T::Num>;
}
Expand description
A Vec
Required Methods
fn cast_to_aaline<A: Axis>(
&mut self,
ray: &Ray<T::Num>,
line: A,
val: T::Num
) -> CastResult<T::Num>
fn cast_to_aaline<A: Axis>(
&mut self,
ray: &Ray<T::Num>,
line: A,
val: T::Num
) -> CastResult<T::Num>
Return the cast result to a axis aligned line of infinite length.
fn cast_broad(
&mut self,
ray: &Ray<T::Num>,
a: AabbPin<&mut T>
) -> Option<CastResult<T::Num>>
fn cast_broad(
&mut self,
ray: &Ray<T::Num>,
a: AabbPin<&mut T>
) -> Option<CastResult<T::Num>>
Return the cast result that is cheap and overly conservative. It may be that the precise cast is fast enough, in which case you can simply return None. If None is desired, every call to this function for a particular element must always return None.