1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Projection and view matrices, viewport and aspect ratio, visibility,
//! projecting camera rays into the scene, graphics options, etc.
use Size2D;
use Space;
// -------------------------------------------------------------------------------------------------
/// Defines a perspective view in/of the world.
///
/// A [`Camera`] has the following independently controllable properties.
///
/// * A [`ViewTransform`], which specifies the viewpoint (eye position) and
/// direction.
/// * A [`Viewport`], whose aspect ratio is used in the projection matrix.
/// * A [`GraphicsOptions`], whose `fov_y` is used in the projection matrix.
/// * A “measured exposure” (luminance scale factor) value which should be provided by examining
/// the world, and which is carried through to [the output](Camera::exposure).
///
/// From this information, it derives [view](Camera::view_matrix) and
/// [projection](Camera::projection_matrix) matrices.
///
/// It does not specify *what* [`Space`] is to be viewed; more broadly, it is
/// plain data structure that does some calculations, and knows nothing outside of that.
/// See [`StandardCameras`] for going further.
pub use Camera;
// As a workaround for <https://github.com/rust-lang/rust/issues/127445>,
// we list some items explicitly even though they should be redundant with
// the glob re-exports.
pub use ;
pub use *;
// -------------------------------------------------------------------------------------------------
/// Calculate area and convert to `usize`, which is a common operation for image data lengths.
// intended as a utility for our code, not public API