Byte Engine Docs
View on docs.rs

camera

Generated Rust API reference for byte_engine.

byte_engine / rendering / camera


Module camera

Camera state used to derive scene views.

Quick Reference

ItemKindDescription
CamerastructThe Camera struct provides scene-owned world-space view settings to render sinks and inspection tools.

Structs

Camera

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

Defined in crates/byte-engine/src/rendering/camera.rs:3-9

The Camera struct provides scene-owned world-space view settings to render sinks and inspection tools.

Implementations

  • fn new() -> Self

    Creates a camera with a world-origin position, default perspective settings, and neutral exposure.

  • fn vertical_fov(&self) -> Degrees

    Returns the camera's vertical field of view.

  • fn aspect_ratio(&self) -> f32

    Returns the camera's width-to-height aspect ratio.

  • fn aperture(&self) -> f32

    Returns the camera aperture.

  • fn focus_distance(&self) -> f32

    Returns the camera focus distance.

  • fn with_fov(self, fov: Degrees) -> Self

    Sets the vertical field of view used by perspective rendering.

  • fn set_fov(&mut self, fov: Degrees)

    Sets the vertical field of view used by perspective rendering.

  • fn exposure(&self) -> f32

    Returns the camera exposure in stops. See Self::set_exposure.

  • fn exposure_scale(&self) -> f32

    Returns the linear factor that the camera exposure applies to scene light, 2^exposure.

  • fn with_exposure(self, stops: f32) -> Self

    Sets the camera exposure in stops. See Self::set_exposure.

  • fn set_exposure(&mut self, stops: f32)

    Sets how much the camera brightens or darkens scene light before it is mapped to the display.

    Each stop doubles or halves the light: 0.0 shows scene values unchanged, -1.0 halves them, and 1.0

    doubles them. Scenes lit with real-world values need a matching photographic exposure: a camera at EV100 e

    uses -(e + log2(1.2)) stops, so a sunny day at EV100 15 is about -15.26.

    The PBR visibility pipeline, set up by

    crate::application::graphics::setup_pbr_visibility_shading_render_pipeline, and the atmosphere sky apply it

    as they write scene light. Storing light already exposed keeps real-world intensities within the half-float

    range of the scene color target. Scenes drawn with other pipelines ignore it.

Trait Implementations

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

    Related: Camera

impl Debug for Camera
  • fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Default for Camera
  • fn default() -> Self
impl Downcast for Camera
  • 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 DowncastSync for Camera
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Inspectable for Camera
  • fn as_string(&self) -> String
  • fn set(&mut self, key: &str, value: &str) -> Result<(), String>
impl Instrument for Camera
impl LayoutRaw for Camera
  • fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Camera
  • unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
  • fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for Camera
  • type Metadata = ()
impl Read for Camera
impl<R> ReadPrimitive for Camera
impl WithSubscriber for Camera

On this page