Struct heron::rapier_plugin::rapier::geometry::Trimesh[]

pub struct Trimesh { /* fields omitted */ }

A triangle mesh.

Implementations

impl Trimesh

pub fn new(
    vertices: Vec<Point<f32, U3>, Global>,
    indices: Vec<Point<u32, U3>, Global>
) -> Trimesh

Creates a new triangle mesh from a vertex buffer and an index buffer.

pub fn aabb(&self, pos: &Isometry<f32, U3, Unit<Quaternion<f32>>>) -> AABB<f32>

Compute the axis-aligned bounding box of this triangle mesh.

pub fn num_triangles(&self) -> usize

The number of triangles forming this mesh.

pub fn triangles(&self) -> impl Iterator<Item = Triangle<f32>>

An iterator through all the triangles of this mesh.

pub fn triangle(&self, i: usize) -> Triangle<f32>

Get the i-th triangle of this mesh.

pub fn vertices(&self) -> &[Point<f32, U3>]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

The vertex buffer of this mesh.

pub fn indices(&self) -> &[Point<u32, U3>]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

The index buffer of this mesh.

pub fn flat_indices(&self) -> &[u32]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

A flat view of the index buffer of this mesh.

Trait Implementations

impl Clone for Trimesh

impl PointQuery<f32> for Trimesh

impl RayCast<f32> for Trimesh

impl Shape for Trimesh

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Resource for T where
    T: 'static + Send + Sync

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> TypeData for T where
    T: 'static + Send + Sync + Clone

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,