[−][src]Struct mgf::Sphere
A point and a distance.
Like AABBs, spheres are closed volumes.
Fields
c: Point3<f32>
The center point of the sphere.
r: f32
The radius of the sphere.
Methods
impl Sphere
[src]
Trait Implementations
impl Bound for Sphere
[src]
impl BoundedBy<AABB> for Sphere
[src]
impl BoundedBy<Sphere> for Triangle
[src]
impl BoundedBy<Sphere> for Rectangle
[src]
impl BoundedBy<Sphere> for AABB
[src]
Taking the bounding sphere of an AABB creates a sphere that contains all of the extreme points of the AABB. Thus, a bounding sphere for an AABB created from another bounding sphere will be larger in size than the original sphere.
impl BoundedBy<Sphere> for Capsule
[src]
impl BoundedBy<Sphere> for OBB
[src]
impl BoundedBy<Sphere> for Component
[src]
impl BoundedBy<Sphere> for Compound
[src]
impl Overlaps<Sphere> for AABB
[src]
impl Overlaps<AABB> for Sphere
[src]
impl Overlaps<Sphere> for Sphere
[src]
impl Contains<Point3<f32>> for Sphere
[src]
impl Contains<Sphere> for Sphere
[src]
An important consequence of Spheres being closed: two spheres with the same center and radius contain each other.
impl<P: Particle> Intersects<Sphere> for P
[src]
fn intersection(&self, s: &Sphere) -> Option<Intersection>
[src]
impl Contacts<Moving<Component>> for Sphere
[src]
fn contacts<F: FnMut(Contact)>(
&self,
rhs: &Moving<Component>,
callback: F
) -> bool
[src]
&self,
rhs: &Moving<Component>,
callback: F
) -> bool
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
Returns the last contact found, if one exists.
impl Contacts<Moving<Sphere>> for Sphere
[src]
fn contacts<F: FnMut(Contact)>(
&self,
sphere: &Moving<Sphere>,
callback: F
) -> bool
[src]
&self,
sphere: &Moving<Sphere>,
callback: F
) -> bool
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
Returns the last contact found, if one exists.
impl Contacts<Moving<Capsule>> for Sphere
[src]
fn contacts<F: FnMut(Contact)>(
&self,
rhs: &Moving<Capsule>,
callback: F
) -> bool
[src]
&self,
rhs: &Moving<Capsule>,
callback: F
) -> bool
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
Returns the last contact found, if one exists.
impl Shape for Sphere
[src]
fn center(&self) -> Point3<f32>
[src]
fn closest_point(&self, to: Point3<f32>) -> Point3<f32>
[src]
fn set_pos(&mut self, p: Point3<f32>)
[src]
Sets the center of the shape to p.
impl Volumetric for Sphere
[src]
fn rotate<R: Rotation3<f32>>(self, _: R) -> Sphere
[src]
Rotation to a bounding sphere does nothing.
fn rotate_about<R: Rotation3<f32>>(self, r: R, p: Point3<f32>) -> Self
[src]
Rotates the object around a point.
impl Convex<Point3<f32>> for Sphere
[src]
impl Inertia for Sphere
[src]
impl Clone for Sphere
[src]
fn clone(&self) -> Sphere
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Sphere
[src]
impl From<Sphere> for Component
[src]
impl Add<f32> for Sphere
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, s: f32) -> Self
[src]
impl Add<Vector3<f32>> for Sphere
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, v: Vector3<f32>) -> Self
[src]
impl Sub<f32> for Sphere
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, s: f32) -> Self
[src]
impl Sub<Vector3<f32>> for Sphere
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, v: Vector3<f32>) -> Self
[src]
impl Mul<f32> for Sphere
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, s: f32) -> Self
[src]
impl Div<f32> for Sphere
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, s: f32) -> Self
[src]
impl AddAssign<Vector3<f32>> for Sphere
[src]
fn add_assign(&mut self, v: Vector3<f32>)
[src]
impl SubAssign<Vector3<f32>> for Sphere
[src]
fn sub_assign(&mut self, v: Vector3<f32>)
[src]
impl Debug for Sphere
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,