Struct mgf::Ray
[−]
[src]
pub struct Ray {
pub p: Point3<f32>,
pub d: Vector3<f32>,
}Rays are points and direction with infinite distance. Distance vector does not need to be normalized.
Fields
p: Point3<f32>
d: Vector3<f32>
Trait Implementations
impl Copy for Ray[src]
impl Clone for Ray[src]
fn clone(&self) -> Ray[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for Ray[src]
impl From<Segment> for Ray[src]
impl MinDistance<Point3<f32>> for Ray[src]
impl Add<Vector3<f32>> for Ray[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, v: Vector3<f32>) -> Self[src]
Performs the + operation.
impl Sub<Vector3<f32>> for Ray[src]
type Output = Self
The resulting type after applying the - operator.
fn sub(self, v: Vector3<f32>) -> Self[src]
Performs the - operation.
impl AddAssign<Vector3<f32>> for Ray[src]
fn add_assign(&mut self, v: Vector3<f32>)[src]
Performs the += operation.
impl SubAssign<Vector3<f32>> for Ray[src]
fn sub_assign(&mut self, v: Vector3<f32>)[src]
Performs the -= operation.
impl Shape for Ray[src]
fn center(&self) -> Point3<f32>[src]
Returns the center of mass of the geometry, assuming a regular density.
fn set_pos(&mut self, p: Point3<f32>)[src]
Sets the center of the shape to p.
impl Collider<Intersection, Plane> for Ray[src]
fn collide<F: FnMut(Intersection)>(&self, rhs: &Plane, callback: F) -> bool[src]
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
fn check_collision(&self, other: &T) -> Option<CollisionType>[src]
Returns the first collision found if any exists.
impl Collider<Intersection, AABB> for Ray[src]
fn collide<F: FnMut(Intersection)>(&self, a: &AABB, callback: F) -> bool[src]
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
fn check_collision(&self, other: &T) -> Option<CollisionType>[src]
Returns the first collision found if any exists.
impl Collider<Intersection, Sphere> for Ray[src]
fn collide<F: FnMut(Intersection)>(&self, s: &Sphere, callback: F) -> bool[src]
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
fn check_collision(&self, other: &T) -> Option<CollisionType>[src]
Returns the first collision found if any exists.
impl Collider<Intersection, Capsule> for Ray[src]
fn collide<F: FnMut(Intersection)>(&self, cap: &Capsule, callback: F) -> bool[src]
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
fn check_collision(&self, other: &T) -> Option<CollisionType>[src]
Returns the first collision found if any exists.
impl Collider<Intersection, Moving<Sphere>> for Ray[src]
fn collide<F: FnMut(Intersection)>(
&self,
s: &Moving<Sphere>,
callback: F
) -> bool[src]
&self,
s: &Moving<Sphere>,
callback: F
) -> bool
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
fn check_collision(&self, other: &T) -> Option<CollisionType>[src]
Returns the first collision found if any exists.