Module pix_engine::shape::point
source · [−]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 = Point::new([10, 20]);…or by using the point! macro:
use pix_engine::prelude::*;
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 pointStructs
A Point in N-dimensional space.
Type Definitions
A 1D Point represented by f32 or f64 depending on platform.
A 2D Point represented by f32 or f64 depending on platform.
A 3D Point represented by f32 or f64 depending on platform.
A 1D Point represented by i32.
A 2D Point represented by i32.
A 3D Point represented by i32.