Struct mgf::Mesh
[−]
[src]
pub struct Mesh {
pub disp: Vector3<f32>,
pub verts: Vec<Vertex>,
pub faces: Vec<(usize, usize, usize)>,
pub bvh: BVH<AABB, usize>,
}A triangle mesh is a set of triangles that forms some sort of mesh. There are no requirements on the convexivity of the mesh.
Fields
disp: Vector3<f32>
verts: Vec<Vertex>
faces: Vec<(usize, usize, usize)>
bvh: BVH<AABB, usize>
Methods
impl Mesh[src]
fn new() -> Self[src]
fn with_capacity(cap_verts: usize, cap_faces: usize) -> Self[src]
fn push_vert(&mut self, v: Vertex) -> usize[src]
fn push_face(&mut self, f: (usize, usize, usize)) -> usize[src]
Trait Implementations
impl AddAssign<Vector3<f32>> for Mesh[src]
fn add_assign(&mut self, v: Vector3<f32>)[src]
Performs the += operation.
impl SubAssign<Vector3<f32>> for Mesh[src]
fn sub_assign(&mut self, v: Vector3<f32>)[src]
Performs the -= operation.
impl Shape for Mesh[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.
impl<T> Collider<Contact, T> for Mesh where
T: Collider<Contact, Triangle> + Collider<Contact, Rect> + BoundedBy<AABB>, [src]
T: Collider<Contact, Triangle> + Collider<Contact, Rect> + BoundedBy<AABB>,
fn collide<F: FnMut(Contact)>(&self, rhs: &T, callback: F) -> bool[src]
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
fn check_collision(&self, other: &T) -> Option<CollisionType>[src]
Returns the first collision found if any exists.