Struct mgf::ConvexMesh
[−]
[src]
pub struct ConvexMesh { pub x: Vector3<f32>, pub sum: Vector3<f32>, pub verts: Vec<Point3<f32>>, }
A closed convex mesh. Represented by a point soup.
Fields
x: Vector3<f32>
sum: Vector3<f32>
verts: Vec<Point3<f32>>
Methods
impl ConvexMesh
[src]
pub fn new() -> Self
[src]
pub fn with_capacity(cap: usize) -> Self
[src]
pub fn push(&mut self, p: Point3<f32>)
[src]
Trait Implementations
impl Clone for ConvexMesh
[src]
fn clone(&self) -> ConvexMesh
[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 From<Vec<Point3<f32>>> for ConvexMesh
[src]
impl AddAssign<Vector3<f32>> for ConvexMesh
[src]
fn add_assign(&mut self, v: Vector3<f32>)
[src]
Performs the +=
operation.
impl SubAssign<Vector3<f32>> for ConvexMesh
[src]
fn sub_assign(&mut self, v: Vector3<f32>)
[src]
Performs the -=
operation.
impl Shape for ConvexMesh
[src]
fn center(&self) -> Point3<f32>
[src]
Returns the center of mass of the geometry, assuming a regular density.
fn closest_point(&self, _to: Point3<f32>) -> Point3<f32>
[src]
Returns the closest point on the shape to the given point.
fn set_pos(&mut self, p: Point3<f32>)
[src]
Sets the center of the shape to p.
impl Volumetric for ConvexMesh
[src]
fn rotate<R: Rotation3<f32>>(self, rot: R) -> ConvexMesh
[src]
Rotate the bound in place. This is useless for spheres.
fn rotate_about<R: Rotation3<f32>>(self, r: R, p: Point3<f32>) -> Self
[src]
Rotates the object around a point.