Module pix_engine::core::shape::quad[][src]

Expand description

A shape type representing quadrilaterals used for drawing.

Quad is similar to Rect but the angles between edges are not constrained to 90 degrees and can also be used to represent a Plane in 3D space.

Examples

You can create a Quad using Quad::new:

use pix_engine::prelude_3d::*;

let quad: QuadI2 = Quad::new(
    [10, 20],
    [30, 10],
    [20, 25],
    [15, 15]
);

let plane: QuadI3 = Quad::new(
    [10, 20, 10],
    [30, 10, 5],
    [20, 25, 20],
    [15, 15, 10],
);

Structs

A Quad or quadrilateral, a four-sided polygon.

Type Definitions

A 2D Quad represented by floating point numbers.

A 3D Quad represented by floating point numbers.

A 2D Quad represented by integers.

A 3D Quad represented by integers.