Scene

Struct Scene 

Source
pub struct Scene {
Show 16 fields pub start_time: f32, pub end_time: f32, pub options: Options, pub camera: Option<CameraEntity>, pub film: Option<Film>, pub integrator: Option<Integrator>, pub accelerator: Option<Accelerator>, pub sampler: Option<Sampler>, pub textures: Vec<Texture>, pub materials: Vec<Material>, pub lights: Vec<Light>, pub area_lights: Vec<AreaLight>, pub mediums: Vec<Medium>, pub shapes: Vec<ShapeEntity>, pub objects: Vec<Object>, pub instances: Vec<Instance>,
}

Fields§

§start_time: f32§end_time: f32§options: Options§camera: Option<CameraEntity>§film: Option<Film>§integrator: Option<Integrator>§accelerator: Option<Accelerator>§sampler: Option<Sampler>§textures: Vec<Texture>§materials: Vec<Material>§lights: Vec<Light>§area_lights: Vec<AreaLight>§mediums: Vec<Medium>§shapes: Vec<ShapeEntity>§objects: Vec<Object>§instances: Vec<Instance>

Implementations§

Source§

impl Scene

Source

pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Scene>

Load a scene from a file at path.

Source

pub fn load(data: &str, working_directory: Option<&Path>) -> Result<Scene>

Load a PBRT v4 scene from a string slice.

§Arguments
  • data is a string buffer with the file data.
  • working_directory is a file’s directory path which required for includes with relative paths to work.

Trait Implementations§

Source§

impl Default for Scene

Source§

fn default() -> Scene

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Scene

§

impl RefUnwindSafe for Scene

§

impl Send for Scene

§

impl Sync for Scene

§

impl Unpin for Scene

§

impl UnwindSafe for Scene

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.