Struct dumbmath::sphere::Sphere3f
[−]
[src]
pub struct Sphere3f { pub center: Vec3f, pub radius: f32, }
Sphere represented by a center and radius
Fields
center | |
radius |
Methods
impl Sphere3f
fn new(center: Vec3f, radius: f32) -> Sphere3f
Create a Sphere3f from center point and radius
fn from_radius(radius: f32) -> Sphere3f
Create a Sphere3f centered at zero with given radius
fn radius_squared(&self) -> f32
Squared radius of the sphere