Module pix_engine::shape::sphere

source ·
Expand description

A shape type representing spheres used for drawing.

Examples

You can create a Sphere using Sphere::new:

let s = Sphere::new(10, 20, 100, 200);

…or by using the sphere! macro:

let s = sphere!(10, 20, 15, 200);

// using a point
let s = sphere!([10, 20, 15], 200);
let s = sphere!(point![10, 20, 15], 200);

Structs

  • A Sphere positioned at (x, y, z) with radius.