Byte Engine Docs
View on docs.rs

view

Generated Rust API reference for byte_engine.

byte_engine / rendering / view


Module view

Projection and view matrix construction for cameras and lights.

Quick Reference

ItemKindDescription
ViewstructThe View struct provides projection and orientation data shared by cameras, lights, render sinks, and shader setup.

Structs

View

struct View {
    // [REDACTED: Private Fields]
}

Defined in crates/byte-engine/src/rendering/view.rs:9-17

The View struct provides projection and orientation data shared by cameras, lights, render sinks, and shader setup.

Implementations

  • fn new_perspective(fov: Degrees, aspect_ratio: f32, near: f32, far: f32, position: Point, direction: UnitVector) -> Self

    Creates a perspective view for camera-style scene rendering.

  • fn new_perspective_with_up(fov: Degrees, aspect_ratio: f32, near: f32, far: f32, position: Point, direction: UnitVector, up: UnitVector) -> Self

    Creates a perspective view with an explicit up direction when a stable image orientation matters.

  • fn new_orthographic(left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32, position: Point, direction: UnitVector) -> Self

    Creates an orthographic view for light, editor, or flat scene rendering.

  • fn from_view(&self, view: Matrix) -> Self

    Creates a view that shares this projection but uses a caller-provided view matrix.

  • fn from_from_z_planes(&self, near: f32, far: f32) -> Self

    Creates a perspective view with this view's settings and new clipping planes.

  • fn projection(&self) -> Matrix

    Returns the projection matrix.

  • fn view(&self) -> Matrix

    Returns the view matrix.

  • fn projection_view(&self) -> Matrix

    Returns the projection matrix multiplied by the view matrix.

  • fn view_projection(&self) -> Matrix

    Returns the projection matrix multiplied by the view matrix.

  • fn x_fov(&self) -> Degrees

    Returns the horizontal field of view derived from the vertical field of view.

  • fn y_fov(&self) -> Degrees

    Returns the vertical field of view used by perspective projections.

  • fn near(&self) -> f32

    Returns the near clipping plane distance.

  • fn far(&self) -> f32

    Returns the far clipping plane distance.

  • fn fov(&self) -> [f32; 2]

    Returns the horizontal and vertical fields of view.

  • fn aspect_ratio(&self) -> f32

    Returns the width-to-height aspect ratio used by perspective projections.

  • fn get_frustum_corners(&self) -> [Point; 8]

    Returns the view-frustum corners as world-space points.

  • fn get_frustum_planes(&self) -> [Plane; 6]

    Returns the view-frustum planes in world space.

Trait Implementations

impl ArchivePointee for View
  • type ArchivedMetadata = ()
  • fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for View
impl Clone for View
  • fn clone(&self) -> View

    Related: View

impl Copy for View
impl Debug for View
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for View
  • fn into_any(self: Box<T>) -> Box<dyn Any>
  • fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
  • fn as_any(&self) -> &dyn Any
  • fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for View
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for View
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for View
impl LayoutRaw for View
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for View
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for View
  • fn eq(&self, other: &View) -> bool

    Related: View

impl Pointable for View
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for View
  • type Metadata = ()
impl Read for View
impl StructuralPartialEq for View
impl WithSubscriber for View

On this page