Struct mgf::Segment [−][src]
A point and a direction with a finite distance.
Fields
a: Point3<f32>
The starting point of the segment.
b: Point3<f32>
The end point of the segment.
Methods
impl Segment
[src]
impl Segment
Trait Implementations
impl Copy for Segment
[src]
impl Copy for Segment
impl Clone for Segment
[src]
impl Clone for Segment
fn clone(&self) -> Segment
[src]
fn clone(&self) -> Segment
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Segment
[src]
impl Debug for Segment
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<(Point3<f32>, Point3<f32>)> for Segment
[src]
impl From<(Point3<f32>, Point3<f32>)> for Segment
impl From<Segment> for Ray
[src]
impl From<Segment> for Ray
impl From<Capsule> for Segment
[src]
impl From<Capsule> for Segment
impl Add<Vector3<f32>> for Segment
[src]
impl Add<Vector3<f32>> for Segment
type Output = Self
The resulting type after applying the +
operator.
fn add(self, v: Vector3<f32>) -> Segment
[src]
fn add(self, v: Vector3<f32>) -> Segment
Performs the +
operation.
impl Sub<Vector3<f32>> for Segment
[src]
impl Sub<Vector3<f32>> for Segment
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, v: Vector3<f32>) -> Segment
[src]
fn sub(self, v: Vector3<f32>) -> Segment
Performs the -
operation.
impl AddAssign<Vector3<f32>> for Segment
[src]
impl AddAssign<Vector3<f32>> for Segment
fn add_assign(&mut self, v: Vector3<f32>)
[src]
fn add_assign(&mut self, v: Vector3<f32>)
Performs the +=
operation.
impl SubAssign<Vector3<f32>> for Segment
[src]
impl SubAssign<Vector3<f32>> for Segment
fn sub_assign(&mut self, v: Vector3<f32>)
[src]
fn sub_assign(&mut self, v: Vector3<f32>)
Performs the -=
operation.
impl Shape for Segment
[src]
impl Shape for Segment
fn center(&self) -> Point3<f32>
[src]
fn center(&self) -> Point3<f32>
Returns the center of mass of the geometry, assuming a regular density.
fn closest_point(&self, to: Point3<f32>) -> Point3<f32>
[src]
fn closest_point(&self, to: Point3<f32>) -> Point3<f32>
Returns the closest point on the shape to the given point.
fn set_pos(&mut self, p: Point3<f32>)
[src]
fn set_pos(&mut self, p: Point3<f32>)
Sets the center of the shape to p.
impl Particle for Segment
[src]
impl Particle for Segment
A segment represents a point particle traveling in a direction with finite velocity.
const DT: f32
DT: f32 = 1.0
The length of the time step.
fn pos(&self) -> Point3<f32>
[src]
fn pos(&self) -> Point3<f32>
The origin of the particle.
fn dir(&self) -> Vector3<f32>
[src]
fn dir(&self) -> Vector3<f32>
The direction of the particle.
fn rotate_around<R: Rotation3<f32>>(&self, c: Point3<f32>, r: R) -> Self
[src]
fn rotate_around<R: Rotation3<f32>>(&self, c: Point3<f32>, r: R) -> Self
Rotate this particle around the world space of an object.