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

Expand description

A shape type representing lines used for drawing.

Examples

You can create a Line using Line::new:

use pix_engine::prelude_3d::*;

// 2D
let line: LineI2 = Line::new([10, 20], [30, 10]);

let p1 = point![10, 20];
let p2 = point![30, 10];
let line: LineI2 = Line::new(p1, p2);

// 3D
let line: LineI3 = Line::new([10, 20, 5], [30, 10, 5]);

Structs

A Line with start and end Points.

Type Definitions

A 2D Line represented by floating point numbers.

A 3D Line represented by floating point numbers.

A 2D Line represented by integers.

A 3D Line represented by integers.