Struct mgf::Triangle[][src]

pub struct Triangle {
    pub a: Vector3<f32>,
    pub b: Vector3<f32>,
    pub c: Vector3<f32>,
}

Three points in space.

Fields

The first point in the triangle.

The second point in the triangle.

The third point in the triangle.

Methods

impl Triangle
[src]

Create a new triangle.

Calculates the normal vector of a triangle. This is not cached.

Find the barycentric co-ordinates for a given point.

Trait Implementations

impl BoundedBy<AABB> for Triangle
[src]

impl BoundedBy<Sphere> for Triangle
[src]

impl Contacts<Moving<Component>> for Triangle
[src]

Calls the closure for each contact found. Returns true if any contact was found. Read more

Returns the last contact found, if one exists.

impl Contains<Point3<f32>> for Triangle
[src]

Returns true if the current object contains the argument.

impl Contacts<Triangle> for Moving<Sphere>
[src]

Calls the closure for each contact found. Returns true if any contact was found. Read more

Returns the last contact found, if one exists.

impl Contacts<Triangle> for Moving<Capsule>
[src]

Calls the closure for each contact found. Returns true if any contact was found. Read more

Returns the last contact found, if one exists.

impl Copy for Triangle
[src]

impl Clone for Triangle
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Triangle
[src]

Formats the value using the given formatter. Read more

impl From<(Point3<f32>, Point3<f32>, Point3<f32>)> for Triangle
[src]

Performs the conversion.

impl From<Triangle> for Plane
[src]

Performs the conversion.

impl Add<Vector3<f32>> for Triangle
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Sub<Vector3<f32>> for Triangle
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl AddAssign<Vector3<f32>> for Triangle
[src]

Performs the += operation.

impl SubAssign<Vector3<f32>> for Triangle
[src]

Performs the -= operation.

impl Shape for Triangle
[src]

Returns the center of mass of the geometry, assuming a regular density.

Returns the closest point on the shape to the given point.

Sets the center of the shape to p.

impl Polygon for Triangle
[src]

NUM_VERTICES: usize = 3

The number of vertices and edges available to query.

Returns the ith vertex as a Point.

Returns the ith edge of the polygon as a pair of indices. Read more

Auto Trait Implementations

impl Send for Triangle

impl Sync for Triangle