mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
* start implementing fluid physics * Initial implementation of fluid pushing * different travel function in water * bubble columns * jumping in water * cleanup * change ultrawarm to be required * fix for clippy
18 lines
502 B
Rust
Executable file
18 lines
502 B
Rust
Executable file
use azalea_core::{aabb::AABB, position::Vec3};
|
|
|
|
#[derive(Debug, Default, Clone)]
|
|
pub struct EntityDimensions {
|
|
pub width: f32,
|
|
pub height: f32,
|
|
}
|
|
|
|
impl EntityDimensions {
|
|
pub fn make_bounding_box(&self, pos: &Vec3) -> AABB {
|
|
let radius = (self.width / 2.0) as f64;
|
|
let height = self.height as f64;
|
|
AABB {
|
|
min: Vec3::new(pos.x - radius, pos.y, pos.z - radius),
|
|
max: Vec3::new(pos.x + radius, pos.y + height, pos.z + radius),
|
|
}
|
|
}
|
|
}
|