jagua_rs::geometry::geo_traits

Trait Shape

Source
pub trait Shape {
    // Required methods
    fn centroid(&self) -> Point;
    fn area(&self) -> fsize;
    fn bbox(&self) -> AARectangle;
    fn diameter(&self) -> fsize;
}
Expand description

Trait for shared properties of geometric primitives.

Required Methods§

Source

fn centroid(&self) -> Point

Geometric center of the shape

Source

fn area(&self) -> fsize

Area of the interior of the shape

Source

fn bbox(&self) -> AARectangle

Bounding box of the shape

Source

fn diameter(&self) -> fsize

The distance between the two furthest points in the shape.

Implementors§