Struct ncollide3d::shape::HeightField[][src]

pub struct HeightField<N: RealField> { /* fields omitted */ }

An heightfield implicitly discretized with triangles.

Implementations

impl<N: RealField> HeightField<N>[src]

pub fn new(heights: DMatrix<N>, scale: Vector<N>) -> Self[src]

Initializes a new heightfield with the given heights and a scaling factor.

pub fn nrows(&self) -> usize[src]

The number of rows of this heightfield.

pub fn ncols(&self) -> usize[src]

The number of columns of this heightfield.

pub fn cell_at_point(&self, pt: &Point3<N>) -> Option<(usize, usize)>[src]

The pair of index of the cell containing the vertical projection of the given point.

pub fn x_at(&self, j: usize) -> N[src]

The smallest x coordinate of the j-th column of this heightfield.

pub fn z_at(&self, i: usize) -> N[src]

The smallest z coordinate of the start of the i-th row of this heightfield.

pub fn triangles<'a>(&'a self) -> impl Iterator<Item = Triangle<N>> + 'a[src]

An iterator through all the triangles of this heightfield.

pub fn triangles_at(
    &self,
    i: usize,
    j: usize
) -> (Option<Triangle<N>>, Option<Triangle<N>>)
[src]

The two triangles at the cell (i, j) of this heightfield.

Returns None fore triangles that have been removed because of their user-defined status flags (described by the HeightFieldCellStatus bitfield).

pub fn cell_status(&self, i: usize, j: usize) -> HeightFieldCellStatus[src]

The status of the (i, j)-th cell.

pub fn set_cell_status(
    &mut self,
    i: usize,
    j: usize,
    status: HeightFieldCellStatus
)
[src]

Set the status of the (i, j)-th cell.

pub fn cells_statuses(&self) -> &DMatrix<HeightFieldCellStatus>[src]

The statuses of all the cells of this heightfield.

pub fn cells_statuses_mut(&mut self) -> &mut DMatrix<HeightFieldCellStatus>[src]

The mutable statuses of all the cells of this heightfield.

pub fn heights(&self) -> &DMatrix<N>[src]

The heights of this heightfield.

pub fn scale(&self) -> &Vector<N>[src]

The scale factor applied to this heightfield.

pub fn cell_width(&self) -> N[src]

The width (extent along its local x axis) of each cell of this heightmap, including the scale factor.

pub fn cell_height(&self) -> N[src]

The height (extent along its local z axis) of each cell of this heightmap, including the scale factor.

pub fn unit_cell_width(&self) -> N[src]

The width (extent along its local x axis) of each cell of this heightmap, excluding the scale factor.

pub fn unit_cell_height(&self) -> N[src]

The height (extent along its local z axis) of each cell of this heightmap, excluding the scale factor.

pub fn aabb(&self) -> &AABB<N>[src]

The AABB of this heightmap.

pub fn convert_triangle_feature_id(
    &self,
    i: usize,
    j: usize,
    left: bool,
    fid: FeatureId
) -> FeatureId
[src]

Converts the FeatureID of the left or right triangle at the cell (i, j) into a FeatureId of the whole heightfield.

pub fn map_elements_in_local_aabb(
    &self,
    aabb: &AABB<N>,
    f: &mut impl FnMut(usize, &Triangle<N>, &dyn ContactPreprocessor<N>)
)
[src]

Applies the function f to all the triangles of this heightfield intersecting the given AABB.

Trait Implementations

impl<N: Clone + RealField> Clone for HeightField<N>[src]

impl<N: Debug + RealField> Debug for HeightField<N>[src]

impl<N: RealField> HasBoundingVolume<N, AABB<N>> for HeightField<N>[src]

impl<N: RealField> HasBoundingVolume<N, BoundingSphere<N>> for HeightField<N>[src]

impl<N: RealField> PointQuery<N> for HeightField<N>[src]

impl<N: RealField> PointQueryWithLocation<N> for HeightField<N>[src]

type Location = (usize, TrianglePointLocation<N>)

Additional shape-specific projection information Read more

impl<N: RealField> RayCast<N> for HeightField<N>[src]

impl<N: RealField> Shape<N> for HeightField<N>[src]

impl<N: RealField> ToTriMesh<N> for HeightField<N>[src]

type DiscretizationParameter = ()

Auto Trait Implementations

impl<N> RefUnwindSafe for HeightField<N> where
    N: RefUnwindSafe

impl<N> Send for HeightField<N>

impl<N> Sync for HeightField<N>

impl<N> Unpin for HeightField<N> where
    N: Unpin

impl<N> UnwindSafe for HeightField<N> where
    N: UnwindSafe

Blanket Implementations

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

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

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

impl<T> Downcast for T where
    T: Any
[src]

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

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

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

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

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<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]