Struct oxygengine_physics_2d::prelude::HeightField [−][src]
pub struct HeightField<N> where
N: RealField, { /* fields omitted */ }
A 2D heightfield.
Implementations
impl<N> HeightField<N> where
N: RealField,
[src]
impl<N> HeightField<N> where
N: RealField,
[src]pub fn new(
heights: Matrix<N, Dynamic, U1, VecStorage<N, Dynamic, U1>>,
scale: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> HeightField<N>
[src]
heights: Matrix<N, Dynamic, U1, VecStorage<N, Dynamic, U1>>,
scale: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> HeightField<N>
Creates a new 2D heightfield with the given heights and scale factor.
pub fn num_cells(&self) -> usize
[src]
The number of cells of this heightfield.
pub fn heights(&self) -> &Matrix<N, Dynamic, U1, VecStorage<N, Dynamic, U1>>
[src]
The height at each cell endpoint.
pub fn scale(
&self
) -> &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
[src]
&self
) -> &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
The scale factor applied to this heightfield.
pub fn aabb(&self) -> &AABB<N>
[src]
The AABB of this heightfield.
pub fn cell_width(&self) -> N
[src]
The width of a single cell of this heightfield.
pub fn unit_cell_width(&self) -> N
[src]
The width of a single cell of this heightfield, without taking the scale factor into account.
pub fn start_x(&self) -> N
[src]
The left-most x-coordinate of this heightfield.
pub fn cell_at_point(&self, pt: &Point<N, U2>) -> Option<usize>
[src]
Index of the cell a point is on after vertical projection.
pub fn segments(&'a self) -> impl Iterator<Item = Segment<N>> + 'a
[src]
Iterator through all the segments of this heightfield.
pub fn segment_at(&self, i: usize) -> Option<Segment<N>>
[src]
The i-th segment of the heightfield if it has not been removed.
pub fn set_segment_removed(&mut self, i: usize, removed: bool)
[src]
Mark the i-th segment of this heightfield as removed or not.
pub fn is_segment_removed(&self, i: usize) -> bool
[src]
Checks if the i-th segment has been removed.
pub fn map_elements_in_local_aabb(
&self,
aabb: &AABB<N>,
f: &mut impl FnMut(usize, &Segment<N>, &dyn ContactPreprocessor<N>)
)
[src]
&self,
aabb: &AABB<N>,
f: &mut impl FnMut(usize, &Segment<N>, &dyn ContactPreprocessor<N>)
)
Applies f
to each segment of this heightfield that intersects the given aabb
.
Trait Implementations
impl<N> Clone for HeightField<N> where
N: Clone + RealField,
[src]
impl<N> Clone for HeightField<N> where
N: Clone + RealField,
[src]pub fn clone(&self) -> HeightField<N>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<N> Debug for HeightField<N> where
N: Debug + RealField,
[src]
impl<N> Debug for HeightField<N> where
N: Debug + RealField,
[src]impl<'de, N> Deserialize<'de> for HeightField<N> where
N: RealField + Deserialize<'de>,
[src]
impl<'de, N> Deserialize<'de> for HeightField<N> where
N: RealField + Deserialize<'de>,
[src]pub fn deserialize<__D>(
__deserializer: __D
) -> Result<HeightField<N>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<HeightField<N>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<N> HasBoundingVolume<N, AABB<N>> for HeightField<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for HeightField<N> where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, BoundingSphere<N>> for HeightField<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, BoundingSphere<N>> for HeightField<N> where
N: RealField,
[src]pub fn bounding_volume(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>
) -> BoundingSphere<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>
) -> BoundingSphere<N>
pub fn local_bounding_volume(&self) -> BoundingSphere<N>
[src]
impl<N> PointQuery<N> for HeightField<N> where
N: RealField,
[src]
impl<N> PointQuery<N> for HeightField<N> where
N: RealField,
[src]pub fn project_point(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
point: &Point<N, U2>,
bool
) -> PointProjection<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
point: &Point<N, U2>,
bool
) -> PointProjection<N>
pub fn project_point_with_feature(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
point: &Point<N, U2>
) -> (PointProjection<N>, FeatureId)
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
point: &Point<N, U2>
) -> (PointProjection<N>, FeatureId)
pub fn contains_point(
&self,
_m: &Isometry<N, U2, Unit<Complex<N>>>,
_point: &Point<N, U2>
) -> bool
[src]
&self,
_m: &Isometry<N, U2, Unit<Complex<N>>>,
_point: &Point<N, U2>
) -> bool
pub fn distance_to_point(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
pt: &Point<N, U2>,
solid: bool
) -> N
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
pt: &Point<N, U2>,
solid: bool
) -> N
impl<N> PointQueryWithLocation<N> for HeightField<N> where
N: RealField,
[src]
impl<N> PointQueryWithLocation<N> for HeightField<N> where
N: RealField,
[src]type Location = (usize, TrianglePointLocation<N>)
Additional shape-specific projection information Read more
pub fn project_point_with_location(
&self,
_m: &Isometry<N, U2, Unit<Complex<N>>>,
_point: &Point<N, U2>,
bool
) -> (PointProjection<N>, <HeightField<N> as PointQueryWithLocation<N>>::Location)
[src]
&self,
_m: &Isometry<N, U2, Unit<Complex<N>>>,
_point: &Point<N, U2>,
bool
) -> (PointProjection<N>, <HeightField<N> as PointQueryWithLocation<N>>::Location)
impl<N> RayCast<N> for HeightField<N> where
N: RealField,
[src]
impl<N> RayCast<N> for HeightField<N> where
N: RealField,
[src]pub fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
bool
) -> Option<RayIntersection<N>>
pub fn toi_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
pub fn intersects_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N
) -> bool
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N
) -> bool
impl<N> Serialize for HeightField<N> where
N: RealField + Serialize,
[src]
impl<N> Serialize for HeightField<N> where
N: RealField + Serialize,
[src]pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<N> Shape<N> for HeightField<N> where
N: RealField,
[src]
impl<N> Shape<N> for HeightField<N> where
N: RealField,
[src]pub fn aabb(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_aabb(&self) -> AABB<N>
[src]
pub fn bounding_sphere(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>
) -> BoundingSphere<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>
) -> BoundingSphere<N>
pub fn as_ray_cast(&self) -> Option<&dyn RayCast<N>>
[src]
pub fn as_point_query(&self) -> Option<&dyn PointQuery<N>>
[src]
pub fn tangent_cone_contains_dir(
&self,
_fid: FeatureId,
_m: &Isometry<N, U2, Unit<Complex<N>>>,
_deformations: Option<&[N]>,
_dir: &Unit<Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>>
) -> bool
[src]
&self,
_fid: FeatureId,
_m: &Isometry<N, U2, Unit<Complex<N>>>,
_deformations: Option<&[N]>,
_dir: &Unit<Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>>
) -> bool
pub fn subshape_containing_feature(&self, _id: FeatureId) -> usize
[src]
pub fn local_bounding_sphere(&self) -> BoundingSphere<N>
[src]
pub fn as_convex_polyhedron(&self) -> Option<&dyn ConvexPolyhedron<N>>
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap<N>>
[src]
pub fn as_composite_shape(&self) -> Option<&dyn CompositeShape<N>>
[src]
pub fn as_deformable_shape(&self) -> Option<&dyn DeformableShape<N>>
[src]
pub fn as_deformable_shape_mut(&mut self) -> Option<&mut dyn DeformableShape<N>>
[src]
pub fn is_convex_polyhedron(&self) -> bool
[src]
pub fn is_support_map(&self) -> bool
[src]
pub fn is_composite_shape(&self) -> bool
[src]
pub fn is_deformable_shape(&self) -> bool
[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for HeightField<N> where
N: RefUnwindSafe,
impl<N> RefUnwindSafe for HeightField<N> where
N: RefUnwindSafe,
impl<N> Send for HeightField<N>
impl<N> Send for HeightField<N>
impl<N> Sync for HeightField<N>
impl<N> Sync for HeightField<N>
impl<N> Unpin for HeightField<N> where
N: Unpin,
impl<N> Unpin for HeightField<N> where
N: Unpin,
impl<N> UnwindSafe for HeightField<N> where
N: UnwindSafe,
impl<N> UnwindSafe for HeightField<N> where
N: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any,
pub fn get_type_id(&self) -> TypeId
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Same<T> for T
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<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,