pub struct StreamingCamera {
pub position: Vec3,
pub forward: Vec3,
pub up: Vec3,
pub right: Vec3,
pub fov_deg: f32,
pub near: f32,
pub far: f32,
pub aspect_ratio: f32,
pub frustum_planes: [Vec4; 6],
pub view_matrix: Mat4,
pub proj_matrix: Mat4,
pub view_proj_matrix: Mat4,
}Fields§
§position: Vec3§forward: Vec3§up: Vec3§right: Vec3§fov_deg: f32§near: f32§far: f32§aspect_ratio: f32§frustum_planes: [Vec4; 6]§view_matrix: Mat4§proj_matrix: Mat4§view_proj_matrix: Mat4Implementations§
Source§impl StreamingCamera
impl StreamingCamera
pub fn new( position: Vec3, target: Vec3, up: Vec3, fov_deg: f32, aspect: f32, near: f32, far: f32, ) -> Self
pub fn extract_frustum_planes(&mut self)
pub fn update_position(&mut self, new_pos: Vec3, new_target: Vec3)
pub fn project_sphere_to_screen( &self, center: Vec3, radius: f32, screen_height: f32, ) -> f32
pub fn compute_lod_screen_size( &self, bounds: &ChunkBounds, screen_height: f32, ) -> f32
pub fn distance_to_bounds(&self, bounds: &ChunkBounds) -> f32
Trait Implementations§
Source§impl Clone for StreamingCamera
impl Clone for StreamingCamera
Auto Trait Implementations§
impl Freeze for StreamingCamera
impl RefUnwindSafe for StreamingCamera
impl Send for StreamingCamera
impl Sync for StreamingCamera
impl Unpin for StreamingCamera
impl UnsafeUnpin for StreamingCamera
impl UnwindSafe for StreamingCamera
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.