Skip to main content

IsTriangle

Trait IsTriangle 

Source
pub trait IsTriangle<'a, T: IsPoint, N: IsUnitVector>: IsPolygon<'a, T, N> {
    // Required methods
    fn a_id(&self) -> PointId;
    fn set_a_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>;
    fn b_id(&self) -> PointId;
    fn set_b_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>;
    fn c_id(&self) -> PointId;
    fn set_c_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>;

    // Provided methods
    fn a(&self) -> Option<T> { ... }
    fn b(&self) -> Option<T> { ... }
    fn c(&self) -> Option<T> { ... }
    fn edge_ab(&self) -> Option<<Self as HasEdges>::Edge> { ... }
    fn edge_bc(&self) -> Option<<Self as HasEdges>::Edge> { ... }
    fn edge_ca(&self) -> Option<<Self as HasEdges>::Edge> { ... }
}
Expand description

A triangle primitive backed by a point table and treated as a polygon specialization.

Required Methods§

Source

fn a_id(&self) -> PointId

Returns the point-table id of the first vertex.

Source

fn set_a_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>

Sets the point-table id of the first vertex.

Source

fn b_id(&self) -> PointId

Returns the point-table id of the second vertex.

Source

fn set_b_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>

Sets the point-table id of the second vertex.

Source

fn c_id(&self) -> PointId

Returns the point-table id of the third vertex.

Source

fn set_c_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>

Sets the point-table id of the third vertex.

Provided Methods§

Source

fn a(&self) -> Option<T>

Resolves and returns the first vertex from the point table.

Source

fn b(&self) -> Option<T>

Resolves and returns the second vertex from the point table.

Source

fn c(&self) -> Option<T>

Resolves and returns the third vertex from the point table.

Source

fn edge_ab(&self) -> Option<<Self as HasEdges>::Edge>

Returns the edge from a to b.

Source

fn edge_bc(&self) -> Option<<Self as HasEdges>::Edge>

Returns the edge from b to c.

Source

fn edge_ca(&self) -> Option<<Self as HasEdges>::Edge>

Returns the edge from c to a.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§