Struct quicksilver::geom::Circle
[−]
[src]
pub struct Circle { pub x: f32, pub y: f32, pub radius: f32, }
A circle with a center and a radius
Fields
x: f32
y: f32
radius: f32
Methods
impl Circle
[src]
fn new(x: f32, y: f32, radius: f32) -> Circle
[src]
fn newi(x: i32, y: i32, radius: i32) -> Circle
[src]
fn newv(position: Vector, radius: f32) -> Circle
[src]
fn center(self) -> Vector
[src]
Get the center of a circle as a vector
fn contains(self, v: Vector) -> bool
[src]
Check to see if a circle contains a point
fn intersects(self, l: Line) -> bool
[src]
Check to see if a circle intersects a line
fn overlaps_rect(self, r: Rectangle) -> bool
[src]
Check if a circle overlaps a rectangle
fn overlaps_circ(self, c: Circle) -> bool
[src]
Check if two circles overlap
fn translate(self, v: Vector) -> Circle
[src]
Translate a circle by a given vector
Trait Implementations
impl Clone for Circle
[src]
fn clone(&self) -> Circle
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Circle
[src]
impl Default for Circle
[src]
impl Debug for Circle
[src]
impl PartialEq for Circle
[src]
fn eq(&self, other: &Circle) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.