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

Trait Implementations

Derived Implementations

impl PartialEq for Sphere3f

fn eq(&self, __arg_0: &Sphere3f) -> bool

fn ne(&self, __arg_0: &Sphere3f) -> bool

impl Copy for Sphere3f

impl Clone for Sphere3f

fn clone(&self) -> Sphere3f

fn clone_from(&mut self, source: &Self)