Enum mgf::Component
[−]
[src]
pub enum Component { Sphere(Sphere), Capsule(Capsule), }
A component is a generic volume that can either be a Sphere or Capsule at runtime. Anything that can collide with a Sphere and a Capsule can collide with a component.
Variants
Sphere(Sphere)
Capsule(Capsule)
Methods
impl Component
[src]
fn rotate(self, r: Quaternion<f32>) -> Self
[src]
Rotates the component abound the origin.
Trait Implementations
impl Copy for Component
[src]
impl Clone for Component
[src]
fn clone(&self) -> Component
[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 Debug for Component
[src]
impl From<Sphere> for Component
[src]
impl From<Capsule> for Component
[src]
impl Add<Vector3<f32>> for Component
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, v: Vector3<f32>) -> Self
[src]
Performs the +
operation.
impl Sub<Vector3<f32>> for Component
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, v: Vector3<f32>) -> Self
[src]
Performs the -
operation.
impl AddAssign<Vector3<f32>> for Component
[src]
fn add_assign(&mut self, v: Vector3<f32>)
[src]
Performs the +=
operation.
impl SubAssign<Vector3<f32>> for Component
[src]
fn sub_assign(&mut self, v: Vector3<f32>)
[src]
Performs the -=
operation.
impl Shape for Component
[src]
fn center(&self) -> Point3<f32>
[src]
Returns the center of mass of the geometry, assuming a regular density.
fn set_pos(&mut self, p: Point3<f32>)
[src]
Sets the center of the shape to p.