Struct rtow::camera::Camera [] [src]

pub struct Camera { /* fields omitted */ }

A camera represented as a single 3D point and a rectangular sensor. The sensor is identified by its lower left corner and two directional vectors (one horizontal and one vertical).

Methods

impl Camera
[src]

[src]

Creates a new camera centered in (0, 0, 0). The sensor is constructed based on the desired field of view and aspect ratio.

[src]

Creates a ray which runs from the camera center towards (and through) the screen. The values u and v provide the exact direction:

  • Use (0.0, 0.0) for obtaining a ray that passes through the lower left corner of the sensor.
  • Use (1.0, 1.0) for obtaining a ray that passes through the upper right corner of the sensor.
  • Use anything in between for obtaining an arbitrary ray.

Trait Implementations

impl Copy for Camera
[src]

impl Clone for Camera
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Camera

impl Sync for Camera