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

Expand description

A N-dimensional shape type representing geometric points used for drawing.

Examples

You can create a Point using Point::new:

use pix_engine::prelude::*;

let p: PointI2 = Point::new([10, 20]);

…or by using the point! macro:

use pix_engine::prelude_3d::*;

let p: PointI2 = point!(); // origin point at (0, 0, 0)

let p = point!(5); // 1D point on the x-axis

let p = point!(5, 10); // 2D point in the x/y-plane

let p = point!(5, 10, 7); // 3D point

Structs

A Point in N-dimensional space.

Type Definitions

A 1D Point represented by integers.

A 2D Point represented by floating point numbers.

A 3D Point represented by floating point numbers.

A 1D Point represented by integers.

A 2D Point represented by integers.

A 3D Point represented by integers.