Struct mgf::Triangle
[−]
[src]
pub struct Triangle {
pub a: Vector3<f32>,
pub b: Vector3<f32>,
pub c: Vector3<f32>,
}Triangles are three points in space.
Fields
a: Vector3<f32>
b: Vector3<f32>
c: Vector3<f32>
Trait Implementations
impl BoundedBy<AABB> for Triangle[src]
impl BoundedBy<Sphere> for Triangle[src]
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]
type FaceType = Self
Type of the face object the polygon returns.
fn num_vertices(&self) -> usize[src]
The number of edges available to query.
fn vertex(&self, i: usize) -> Point3<f32>[src]
Returns the ith vertex as a Point.
fn num_edges(&self) -> usize[src]
The number of edges available to query.
fn edge(&self, i: usize) -> (usize, usize)[src]
Returns the ith edge of the polygon as a pair of indices.
fn face(&self) -> &Triangle[src]
impl Collider<Contains, Point3<f32>> for Triangle[src]
fn check_collision(&self, p: &Point3<f32>) -> Option<Contains>[src]
Returns the first collision found if any exists.
fn collide<F: FnMut(CollisionType)>(&self, other: &T, 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
impl Collider<Intersection, Ray> for Triangle[src]
fn collide<F: FnMut(Intersection)>(&self, r: &Ray, 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.