Struct mgf::Triangle
[−]
[src]
pub struct Triangle { pub a: Vector3<f32>, pub b: Vector3<f32>, pub c: Vector3<f32>, }
Three points in space.
Fields
a: Vector3<f32>
The first point in the triangle.
b: Vector3<f32>
The second point in the triangle.
c: Vector3<f32>
The third point in the triangle.
Methods
impl Triangle
[src]
Trait Implementations
impl BoundedBy<AABB> for Triangle
[src]
impl BoundedBy<Sphere> for Triangle
[src]
impl Contacts<Moving<Component>> for Triangle
[src]
fn contacts<F: FnMut(Contact)>(
&self,
rhs: &Moving<Component>,
callback: F
) -> bool
[src]
&self,
rhs: &Moving<Component>,
callback: F
) -> bool
Calls the closure for each contact found. Returns true if any contact was found. Read more
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
Returns the last contact found, if one exists.
impl Contains<Point3<f32>> for Triangle
[src]
fn contains(&self, p: &Point3<f32>) -> bool
[src]
Returns true if the current object contains the argument.
impl Copy for Triangle
[src]
impl Clone for Triangle
[src]
fn clone(&self) -> Triangle
[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 Triangle
[src]
impl From<(Point3<f32>, Point3<f32>, Point3<f32>)> for Triangle
[src]
impl MinDistance<Point3<f32>> for Triangle
[src]
impl Add<Vector3<f32>> for Triangle
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, v: Vector3<f32>) -> Triangle
[src]
Performs the +
operation.
impl Sub<Vector3<f32>> for Triangle
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, v: Vector3<f32>) -> Triangle
[src]
Performs the -
operation.
impl AddAssign<Vector3<f32>> for Triangle
[src]
fn add_assign(&mut self, v: Vector3<f32>)
[src]
Performs the +=
operation.
impl SubAssign<Vector3<f32>> for Triangle
[src]
fn sub_assign(&mut self, v: Vector3<f32>)
[src]
Performs the -=
operation.
impl Shape for Triangle
[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 Polygon for Triangle
[src]
const NUM_VERTICES: usize
NUM_VERTICES: usize = 3
The number of vertices and edges available to query.
fn vertex(&self, i: usize) -> Point3<f32>
[src]
Returns the ith vertex as a Point.
fn edge(&self, i: usize) -> (usize, usize)
[src]
Returns the ith edge of the polygon as a pair of indices. Read more