Type Definition fenris_geometry::Triangle3d

source ·
pub type Triangle3d<T> = Triangle<T, U3>;

Implementations§

source§

impl<T> Triangle3d<T>where
    T: Real,

source

pub fn normal_dir(&self) -> Vector3<T>

Returns a vector normal to the triangle. The vector is not normalized.

source

pub fn normal(&self) -> Vector3<T>

source

pub fn orientation(&self) -> Orientation

TODO: Remove this. It makes no sense for 3D.

source

pub fn signed_area(&self) -> T

TODO: Remove this. It makes no sense for 3D (moreover, the current implementation gives the non-negative ara in any case).

source

pub fn area(&self) -> T

source

pub fn point_orientation(&self, point: &Point3<T>) -> OrientationTestResult

Determines the orientation of a point with respect to the plane containing the triangle.

This is the common “orientation test” used in computational geometry. The test returns a value whose sign is the same as dot(n, x - x0), where x0 is the projection of the point onto the triangle plane.

Note that at the moment, this implementation is NOT robust (in the sense of exact/robust geometric predicates).

source§

impl<T: Real> Triangle3d<T>

source

pub fn compute_solid_angle(&self, p: &Point3<T>) -> T

Compute the solid angle to the given point.

Trait Implementations§

source§

impl<'a, T: Real> ConvexPolygon3d<'a, T> for Triangle3d<T>

source§

fn num_vertices(&self) -> usize

source§

fn get_vertex(&self, index: usize) -> Option<OPoint<T, U3>>

source§

fn compute_plane(&self) -> Option<Plane<T>>where
    T: Real,

source§

fn compute_half_space(&self) -> Option<HalfSpace<T>>where
    T: Real,

source§

fn compute_area_vector(&self) -> Vector3<T>where
    T: Real,

Computes a vector normal to the polygon (oriented outwards w.r.t. a counter-clockwise orientation), whose absolute magnitude is the area of the polygon. Read more
source§

fn compute_normal(&self) -> Vector3<T>where
    T: Real,

Computes an outwards-facing normalized vector perpendicular to the polygon.
source§

fn closest_point(&self, point: &Point3<T>) -> PolygonClosestPoint<T, U3>where
    T: Real,

source§

impl<T> Distance<T, OPoint<T, Const<3>>> for Triangle3d<T>where
    T: Real,

source§

fn distance(&self, point: &OPoint<T, U3>) -> T

source§

fn distance_bound(&self, query_geometry: &QueryGeometry) -> [T; 2]

Returns an interval [l, u] for the distance d, such that d is contained in [l, u].