Skip to main content

CustomShapePoints

Trait CustomShapePoints 

Source
pub trait CustomShapePoints {
    // Required methods
    fn point_count(&self) -> usize;
    fn point(&self, point: usize) -> Vector2f;
}
Expand description

The points of a custom shape.

Required Methods§

Source

fn point_count(&self) -> usize

Gets the total count of points.

Return the points count

Source

fn point(&self, point: usize) -> Vector2f

Gets a given point.

§Argument
  • point - The index of the point to return

Returns a Vector2f containing the coordinates.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§