pub(super) struct EntityExplosionExposure {
bounding_box: WorldAabb,
pub(super) collision_context: BlockCollisionContext,
x_step: f64,
y_step: f64,
z_step: f64,
x_offset: f64,
z_offset: f64,
}Fields§
§bounding_box: WorldAabb§collision_context: BlockCollisionContext§x_step: f64§y_step: f64§z_step: f64§x_offset: f64§z_offset: f64Implementations§
Source§impl EntityExplosionExposure
impl EntityExplosionExposure
pub(super) fn capture(entity: &dyn Entity) -> Self
const fn has_negative_step(self) -> bool
fn sample_position( &self, x_fraction: f64, y_fraction: f64, z_fraction: f64, ) -> DVec3
fn axis_sample_block_bounds( axis_min: f64, axis_max: f64, step: f64, offset: f64, center: f64, ) -> Option<(i32, i32)>
Sourcepub(super) fn stable_air_certificate_bounds(
self,
center: DVec3,
) -> Option<BlockRegionBounds>
pub(super) fn stable_air_certificate_bounds( self, center: DVec3, ) -> Option<BlockRegionBounds>
Builds a Cartesian envelope containing every block visited by all exposure rays.
Each axis uses Vanilla’s repeated-addition sample sequence and exact scalar DDA recurrence. This is linear in the three axis sample counts instead of their Cartesian product.
fn for_each_sample(self, visit: impl FnMut(DVec3)) -> usize
pub(super) fn calculate_with_visibility( self, is_visible: impl FnMut(DVec3) -> bool, ) -> f32
pub(super) fn calculate_cached_with( self, raycast: &mut ExplosionExposureRaycast<'_>, center: DVec3, ) -> f32
Trait Implementations§
Source§impl Clone for EntityExplosionExposure
impl Clone for EntityExplosionExposure
impl Copy for EntityExplosionExposure
Auto Trait Implementations§
impl Freeze for EntityExplosionExposure
impl RefUnwindSafe for EntityExplosionExposure
impl Send for EntityExplosionExposure
impl Sync for EntityExplosionExposure
impl Unpin for EntityExplosionExposure
impl UnsafeUnpin for EntityExplosionExposure
impl UnwindSafe for EntityExplosionExposure
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>