diff --git a/.lock b/.lock new file mode 100644 index 00000000..e69de29b diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/clovers/aabb/index.html b/clovers/aabb/index.html new file mode 100644 index 00000000..812300b8 --- /dev/null +++ b/clovers/aabb/index.html @@ -0,0 +1,2 @@ +clovers::aabb - Rust

Module clovers::aabb

source ·
Expand description

Axis-aligned bounding box.

+

Structs

  • Axis-aligned bounding box Defined by two opposing corners, each of which are a Vec3.
\ No newline at end of file diff --git a/clovers/aabb/sidebar-items.js b/clovers/aabb/sidebar-items.js new file mode 100644 index 00000000..70b0e116 --- /dev/null +++ b/clovers/aabb/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AABB"]}; \ No newline at end of file diff --git a/clovers/aabb/struct.AABB.html b/clovers/aabb/struct.AABB.html new file mode 100644 index 00000000..f614eda8 --- /dev/null +++ b/clovers/aabb/struct.AABB.html @@ -0,0 +1,70 @@ +AABB in clovers::aabb - Rust

Struct clovers::aabb::AABB

source ·
pub struct AABB {
+    pub x: Interval,
+    pub y: Interval,
+    pub z: Interval,
+}
Expand description

Axis-aligned bounding box Defined by two opposing corners, each of which are a Vec3.

+

This is useful for creating bounding volume hierarchies, which is an optimization for reducing the time spent on calculating ray-object intersections.

+

Fields§

§x: Interval

The bounding interval on the X axis

+
§y: Interval

The bounding interval on the Y axis

+
§z: Interval

The bounding interval on the Z axis

+

Implementations§

source§

impl AABB

source

pub fn new( + interval_x: Interval, + interval_y: Interval, + interval_z: Interval +) -> AABB

Creates a new axis-aligned bounding box from three intervals

+
source

pub fn new_from_coords(a: Vec3, b: Vec3) -> AABB

Creates a new axis-aligned bounding box from two coordinates. Treats the two points a and b as extrema for the bounding box, so we don’t require a particular minimum/maximum coordinate order.

+
source

pub fn hit(&self, ray: &Ray, tmin: Float, tmax: Float) -> bool

Given a Ray, returns whether the ray hits the bounding box or not. Current default method, based on “An Optimized AABB Hit Method”

+
source

pub fn hit_old(&self, ray: &Ray, tmin: Float, tmax: Float) -> bool

👎Deprecated

Given a Ray, returns whether the ray hits the bounding box or not. Old method from a GitHub issue. Exists mostly for testing purposes.

+
source

pub fn hit_new(&self, ray: &Ray, tmin: Float, tmax: Float) -> bool

👎Deprecated

Given a Ray, returns whether the ray hits the bounding box or not. Newer method from a GitHub issue. Exists mostly for testing purposes.

+
source

pub fn surrounding_box(box0: &AABB, box1: &AABB) -> AABB

Given two axis-aligned bounding boxes, return a new AABB that contains both.

+
source

pub fn pad(&mut self)

Make sure we don’t have a zero-thickness AABB, padding if necessary.

+
source

pub fn axis(&self, n: usize) -> Interval

Returns the interval of the given axis.

+

Trait Implementations§

source§

impl Add<Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>> for AABB

§

type Output = AABB

The resulting type after applying the + operator.
source§

fn add(self, offset: Vec3) -> Self::Output

Performs the + operation. Read more
source§

impl Clone for AABB

source§

fn clone(&self) -> AABB

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AABB

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for AABB

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for AABB

source§

fn eq(&self, other: &AABB) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AABB

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for AABB

Auto Trait Implementations§

§

impl RefUnwindSafe for AABB

§

impl Send for AABB

§

impl Sync for AABB

§

impl Unpin for AABB

§

impl UnwindSafe for AABB

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

source§

impl<T> Scalar for Twhere + T: 'static + Clone + PartialEq + Debug,

\ No newline at end of file diff --git a/clovers/all.html b/clovers/all.html new file mode 100644 index 00000000..5946d77f --- /dev/null +++ b/clovers/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Structs

Enums

Traits

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/clovers/bvhnode/index.html b/clovers/bvhnode/index.html new file mode 100644 index 00000000..8541d960 --- /dev/null +++ b/clovers/bvhnode/index.html @@ -0,0 +1,2 @@ +clovers::bvhnode - Rust

Module clovers::bvhnode

source ·
Expand description

Bounding Volume Hierarchy Node.

+

Structs

  • Bounding Volume Hierarchy Node.
\ No newline at end of file diff --git a/clovers/bvhnode/sidebar-items.js b/clovers/bvhnode/sidebar-items.js new file mode 100644 index 00000000..9d29ed02 --- /dev/null +++ b/clovers/bvhnode/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["BVHNode"]}; \ No newline at end of file diff --git a/clovers/bvhnode/struct.BVHNode.html b/clovers/bvhnode/struct.BVHNode.html new file mode 100644 index 00000000..ced843cd --- /dev/null +++ b/clovers/bvhnode/struct.BVHNode.html @@ -0,0 +1,60 @@ +BVHNode in clovers::bvhnode - Rust

Struct clovers::bvhnode::BVHNode

source ·
pub struct BVHNode<'scene> {
+    pub left: Box<Hitable<'scene>>,
+    pub right: Box<Hitable<'scene>>,
+    pub bounding_box: AABB,
+}
Expand description

Bounding Volume Hierarchy Node.

+

A node in a tree structure defining a hierarchy of objects in a scene: a node knows its bounding box, and has two children which are also BVHNodes. This is used for accelerating the ray-object intersection calculation in the ray tracer. See Bounding Volume hierarchies

+

Fields§

§left: Box<Hitable<'scene>>

Left child of the BVHNode

+
§right: Box<Hitable<'scene>>

Right child of the BVHNode

+
§bounding_box: AABB

Bounding box containing both of the child nodes

+

Implementations§

source§

impl<'scene> BVHNode<'scene>

source

pub fn from_list( + hitables: Vec<Hitable<'_>>, + time_0: Float, + time_1: Float +) -> BVHNode<'_>

Create a new BVHNode tree from a given list of Objects

+
source

pub fn count(&self) -> usize

Returns the count of the nodes in the tree

+

Trait Implementations§

source§

impl<'scene> Clone for BVHNode<'scene>

source§

fn clone(&self) -> BVHNode<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for BVHNode<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<BVHNode<'scene>> for Hitable<'scene>

source§

fn from(v: BVHNode<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<BVHNode<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<BVHNode<'scene>, <Self as TryInto<BVHNode<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for BVHNode<'scene>

§

impl<'scene> Send for BVHNode<'scene>

§

impl<'scene> Sync for BVHNode<'scene>

§

impl<'scene> Unpin for BVHNode<'scene>

§

impl<'scene> UnwindSafe for BVHNode<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/camera/index.html b/clovers/camera/index.html new file mode 100644 index 00000000..2c81158a --- /dev/null +++ b/clovers/camera/index.html @@ -0,0 +1,2 @@ +clovers::camera - Rust

Module clovers::camera

source ·
Expand description

Camera. Used for creating Rays towards the scene, with directions defined by the camera properties.

+

Structs

  • The main Camera object used in the ray tracing.
  • Represents the fields that can be described in a Scene file. Some other fields the main Camera struct requires (such as aspect_ratio) are derived from other info (such as width, height)
\ No newline at end of file diff --git a/clovers/camera/sidebar-items.js b/clovers/camera/sidebar-items.js new file mode 100644 index 00000000..b07aa87f --- /dev/null +++ b/clovers/camera/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Camera","CameraInit"]}; \ No newline at end of file diff --git a/clovers/camera/struct.Camera.html b/clovers/camera/struct.Camera.html new file mode 100644 index 00000000..39fb1836 --- /dev/null +++ b/clovers/camera/struct.Camera.html @@ -0,0 +1,80 @@ +Camera in clovers::camera - Rust

Struct clovers::camera::Camera

source ·
pub struct Camera {
+    pub lower_left_corner: Vec3,
+    pub horizontal: Vec3,
+    pub vertical: Vec3,
+    pub origin: Vec3,
+    pub lens_radius: Float,
+    pub time_0: Float,
+    pub time_1: Float,
+    pub u: Vec3,
+    pub v: Vec3,
+    pub w: Vec3,
+}
Expand description

The main Camera object used in the ray tracing.

+

Fields§

§lower_left_corner: Vec3

Coordinate of the lower left corner of the camera.

+
§horizontal: Vec3

Defines the horizontal axis for the camera.

+
§vertical: Vec3

Defines the vertical axis for the camera.

+
§origin: Vec3

Defines the origin of the camera.

+
§lens_radius: Float

Defines the lens radius for the camera. TODO: understand and explain better

+
§time_0: Float

Defines the earliest starting time for the camera, used when generating Rays.

+
§time_1: Float

Defines the latest ending time for the camera, used when generating Rays.

+
§u: Vec3

U

+
§v: Vec3

V

+
§w: Vec3

W

+

Implementations§

source§

impl Camera

source

pub fn new( + look_from: Vec3, + look_at: Vec3, + up: Vec3, + vertical_fov: Float, + aspect_ratio: Float, + aperture: Float, + focus_distance: Float, + time_0: Float, + time_1: Float +) -> Self

Creates a new Camera with the given parameters.

+
source

pub fn get_ray(self, s: Float, t: Float, rng: &mut SmallRng) -> Ray

Generates a new Ray from the camera, at a random location of the aperture, at a random time interval between time_0, time_1 of the camera.

+

Trait Implementations§

source§

impl Clone for Camera

source§

fn clone(&self) -> Camera

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Camera

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Camera

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Camera

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Camera

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/camera/struct.CameraInit.html b/clovers/camera/struct.CameraInit.html new file mode 100644 index 00000000..512abc84 --- /dev/null +++ b/clovers/camera/struct.CameraInit.html @@ -0,0 +1,60 @@ +CameraInit in clovers::camera - Rust

Struct clovers::camera::CameraInit

source ·
pub struct CameraInit {
+    pub look_from: Vec3,
+    pub look_at: Vec3,
+    pub up: Vec3,
+    pub vertical_fov: Float,
+    pub aperture: Float,
+    pub focus_distance: Float,
+}
Expand description

Represents the fields that can be described in a Scene file. Some other fields the main Camera struct requires (such as aspect_ratio) are derived from other info (such as width, height)

+

Fields§

§look_from: Vec3

Describes where the camera is

+
§look_at: Vec3

Describes where the camera is looking at

+
§up: Vec3

Describes the subjective “up” direction for the camera to define the orientation

+
§vertical_fov: Float

Describes the vertical field of view for the camera

+
§aperture: Float

Describes the size of the aperture of the camera.

+
§focus_distance: Float

Describes the distance at which the camera has been focused to

+

Trait Implementations§

source§

impl Clone for CameraInit

source§

fn clone(&self) -> CameraInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CameraInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CameraInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for CameraInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/colorize/fn.colorize.html b/clovers/colorize/fn.colorize.html new file mode 100644 index 00000000..e1b2da97 --- /dev/null +++ b/clovers/colorize/fn.colorize.html @@ -0,0 +1,8 @@ +colorize in clovers::colorize - Rust

Function clovers::colorize::colorize

source ·
pub fn colorize(
+    ray: &Ray,
+    scene: &Scene<'_>,
+    depth: u32,
+    max_depth: u32,
+    rng: &mut SmallRng
+) -> Xyz<E>
Expand description

The main coloring function. Sends a Ray to the Scene, sees if it hits anything, and eventually returns a color. Taking into account the Material that is hit, the method recurses with various adjustments, with a new Ray started from the location that was hit.

+
\ No newline at end of file diff --git a/clovers/colorize/index.html b/clovers/colorize/index.html new file mode 100644 index 00000000..93507dae --- /dev/null +++ b/clovers/colorize/index.html @@ -0,0 +1,2 @@ +clovers::colorize - Rust

Module clovers::colorize

source ·
Expand description

An opinionated colorize method. Given a Ray and a Scene, evaluates the ray’s path and returns a color.

+

Functions

  • The main coloring function. Sends a Ray to the Scene, sees if it hits anything, and eventually returns a color. Taking into account the Material that is hit, the method recurses with various adjustments, with a new Ray started from the location that was hit.
\ No newline at end of file diff --git a/clovers/colorize/sidebar-items.js b/clovers/colorize/sidebar-items.js new file mode 100644 index 00000000..eb14109d --- /dev/null +++ b/clovers/colorize/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["colorize"]}; \ No newline at end of file diff --git a/clovers/constant.EPSILON_CONSTANT_MEDIUM.html b/clovers/constant.EPSILON_CONSTANT_MEDIUM.html new file mode 100644 index 00000000..9c3bdfdd --- /dev/null +++ b/clovers/constant.EPSILON_CONSTANT_MEDIUM.html @@ -0,0 +1,2 @@ +EPSILON_CONSTANT_MEDIUM in clovers - Rust
pub const EPSILON_CONSTANT_MEDIUM: Float = 0.000_1;
Expand description

Internal const: epsilon used in the hit calculation of a ConstantMedium.

+
\ No newline at end of file diff --git a/clovers/constant.EPSILON_RECT_THICKNESS.html b/clovers/constant.EPSILON_RECT_THICKNESS.html new file mode 100644 index 00000000..b9e5d0e4 --- /dev/null +++ b/clovers/constant.EPSILON_RECT_THICKNESS.html @@ -0,0 +1,2 @@ +EPSILON_RECT_THICKNESS in clovers - Rust
pub const EPSILON_RECT_THICKNESS: Float = 0.000_1;
Expand description

Internal const: epsilon used for having a finitely-sized thickness for the bounding box of an infinitely-thin rectangle. Shouldn’t be too small.

+
\ No newline at end of file diff --git a/clovers/constant.EPSILON_SHADOW_ACNE.html b/clovers/constant.EPSILON_SHADOW_ACNE.html new file mode 100644 index 00000000..fb5ae32e --- /dev/null +++ b/clovers/constant.EPSILON_SHADOW_ACNE.html @@ -0,0 +1,2 @@ +EPSILON_SHADOW_ACNE in clovers - Rust
pub const EPSILON_SHADOW_ACNE: Float = 0.001;
Expand description

Internal const: epsilon used for avoiding “shadow acne”. This is mostly used for the initial minimum distance for ray hits after reflecting or scattering from a surface.

+
\ No newline at end of file diff --git a/clovers/constant.PI.html b/clovers/constant.PI.html new file mode 100644 index 00000000..f4c94e54 --- /dev/null +++ b/clovers/constant.PI.html @@ -0,0 +1,2 @@ +PI in clovers - Rust

Constant clovers::PI

source ·
pub const PI: Float = core::f32::consts::PI; // 3.14159274f32
Expand description

Internal helper: re-exports the pi constant as our internal Float type. TODO: selectable at run time instead of build time?

+
\ No newline at end of file diff --git a/clovers/hitable/enum.Hitable.html b/clovers/hitable/enum.Hitable.html new file mode 100644 index 00000000..22b47263 --- /dev/null +++ b/clovers/hitable/enum.Hitable.html @@ -0,0 +1,80 @@ +Hitable in clovers::hitable - Rust

Enum clovers::hitable::Hitable

source ·
pub enum Hitable<'scene> {
+
Show 13 variants Boxy(Boxy<'scene>), + BVHNode(BVHNode<'scene>), + ConstantMedium(ConstantMedium<'scene>), + MovingSphere(MovingSphere<'scene>), + Quad(Quad<'scene>), + RotateY(RotateY<'scene>), + Sphere(Sphere<'scene>), + STL(STL<'scene>), + GLTF(GLTF<'scene>), + Translate(Translate<'scene>), + Triangle(Triangle<'scene>), + Empty(Empty), + GLTFTriangle(GLTFTriangle<'scene>), +
}
Expand description

An abstraction for things that can be hit by Rays.

+

Variants§

§

Boxy(Boxy<'scene>)

§

BVHNode(BVHNode<'scene>)

§

ConstantMedium(ConstantMedium<'scene>)

§

MovingSphere(MovingSphere<'scene>)

§

Quad(Quad<'scene>)

§

RotateY(RotateY<'scene>)

§

Sphere(Sphere<'scene>)

§

STL(STL<'scene>)

§

GLTF(GLTF<'scene>)

§

Translate(Translate<'scene>)

§

Triangle(Triangle<'scene>)

§

Empty(Empty)

§

GLTFTriangle(GLTFTriangle<'scene>)

Trait Implementations§

source§

impl<'scene> Clone for Hitable<'scene>

source§

fn clone(&self) -> Hitable<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for Hitable<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<BVHNode<'scene>> for Hitable<'scene>

source§

fn from(v: BVHNode<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<Boxy<'scene>> for Hitable<'scene>

source§

fn from(v: Boxy<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<ConstantMedium<'scene>> for Hitable<'scene>

source§

fn from(v: ConstantMedium<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<Empty> for Hitable<'scene>

source§

fn from(v: Empty) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<GLTF<'scene>> for Hitable<'scene>

source§

fn from(v: GLTF<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<GLTFTriangle<'scene>> for Hitable<'scene>

source§

fn from(v: GLTFTriangle<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<MovingSphere<'scene>> for Hitable<'scene>

source§

fn from(v: MovingSphere<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<Quad<'scene>> for Hitable<'scene>

source§

fn from(v: Quad<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<RotateY<'scene>> for Hitable<'scene>

source§

fn from(v: RotateY<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<STL<'scene>> for Hitable<'scene>

source§

fn from(v: STL<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<Sphere<'scene>> for Hitable<'scene>

source§

fn from(v: Sphere<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<Translate<'scene>> for Hitable<'scene>

source§

fn from(v: Translate<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<Triangle<'scene>> for Hitable<'scene>

source§

fn from(v: Triangle<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<BVHNode<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<BVHNode<'scene>, <Self as TryInto<BVHNode<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<Boxy<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<Boxy<'scene>, <Self as TryInto<Boxy<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<ConstantMedium<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<ConstantMedium<'scene>, <Self as TryInto<ConstantMedium<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<Empty> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into(self) -> Result<Empty, <Self as TryInto<Empty>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<GLTF<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<GLTF<'scene>, <Self as TryInto<GLTF<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<GLTFTriangle<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<GLTFTriangle<'scene>, <Self as TryInto<GLTFTriangle<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<MovingSphere<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<MovingSphere<'scene>, <Self as TryInto<MovingSphere<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<Quad<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<Quad<'scene>, <Self as TryInto<Quad<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<RotateY<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<RotateY<'scene>, <Self as TryInto<RotateY<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<STL<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into(self) -> Result<STL<'scene>, <Self as TryInto<STL<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<Sphere<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<Sphere<'scene>, <Self as TryInto<Sphere<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<Translate<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<Translate<'scene>, <Self as TryInto<Translate<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<Triangle<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<Triangle<'scene>, <Self as TryInto<Triangle<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for Hitable<'scene>

§

impl<'scene> Send for Hitable<'scene>

§

impl<'scene> Sync for Hitable<'scene>

§

impl<'scene> Unpin for Hitable<'scene>

§

impl<'scene> UnwindSafe for Hitable<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/hitable/fn.get_orientation.html b/clovers/hitable/fn.get_orientation.html new file mode 100644 index 00000000..360f7bc7 --- /dev/null +++ b/clovers/hitable/fn.get_orientation.html @@ -0,0 +1,2 @@ +get_orientation in clovers::hitable - Rust
pub fn get_orientation(ray: &Ray, outward_normal: Vec3) -> (bool, Vec3)
Expand description

Returns a tuple of (front_face, normal). Used in lieu of set_face_normal in the Ray Tracing for the Rest Of Your Life book.

+
\ No newline at end of file diff --git a/clovers/hitable/index.html b/clovers/hitable/index.html new file mode 100644 index 00000000..3351727d --- /dev/null +++ b/clovers/hitable/index.html @@ -0,0 +1,2 @@ +clovers::hitable - Rust

Module clovers::hitable

source ·
Expand description

An abstraction for things that can be hit by Rays.

+

Structs

  • Represents a ray-object intersection, with plenty of data about the intersection.

Enums

  • An abstraction for things that can be hit by Rays.

Functions

  • Returns a tuple of (front_face, normal). Used in lieu of set_face_normal in the Ray Tracing for the Rest Of Your Life book.
\ No newline at end of file diff --git a/clovers/hitable/sidebar-items.js b/clovers/hitable/sidebar-items.js new file mode 100644 index 00000000..24fed0d3 --- /dev/null +++ b/clovers/hitable/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Hitable"],"fn":["get_orientation"],"struct":["Empty","HitRecord"]}; \ No newline at end of file diff --git a/clovers/hitable/struct.Empty.html b/clovers/hitable/struct.Empty.html new file mode 100644 index 00000000..8c3b6a3c --- /dev/null +++ b/clovers/hitable/struct.Empty.html @@ -0,0 +1,43 @@ +Empty in clovers::hitable - Rust

Struct clovers::hitable::Empty

source ·
pub struct Empty {}

Trait Implementations§

source§

impl Clone for Empty

source§

fn clone(&self) -> Empty

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Empty

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<Empty> for Hitable<'scene>

source§

fn from(v: Empty) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<Empty> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into(self) -> Result<Empty, <Self as TryInto<Empty>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl RefUnwindSafe for Empty

§

impl Send for Empty

§

impl Sync for Empty

§

impl Unpin for Empty

§

impl UnwindSafe for Empty

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/hitable/struct.HitRecord.html b/clovers/hitable/struct.HitRecord.html new file mode 100644 index 00000000..ed678168 --- /dev/null +++ b/clovers/hitable/struct.HitRecord.html @@ -0,0 +1,59 @@ +HitRecord in clovers::hitable - Rust

Struct clovers::hitable::HitRecord

source ·
pub struct HitRecord<'a> {
+    pub distance: Float,
+    pub position: Vec3,
+    pub normal: Vec3,
+    pub u: Float,
+    pub v: Float,
+    pub material: &'a dyn MaterialTrait,
+    pub front_face: bool,
+}
Expand description

Represents a ray-object intersection, with plenty of data about the intersection.

+

Fields§

§distance: Float

Distance from the ray origin to the hitpoint

+
§position: Vec3

3D coordinate of the hitpoint

+
§normal: Vec3

Surface normal from the hitpoint

+
§u: Float

U surface coordinate of the hitpoint

+
§v: Float

V surface coordinate of the hitpoint

+
§material: &'a dyn MaterialTrait

Reference to the material at the hitpoint

+
§front_face: bool

Is the hitpoint at the front of the surface

+

Implementations§

source§

impl<'a> HitRecord<'a>

source

pub fn set_face_normal(&mut self, ray: &Ray, outward_normal: Vec3)

Helper function for getting normals pointing at the correct direction. TODO: consider removal?

+

Trait Implementations§

source§

impl<'a> Debug for HitRecord<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for HitRecord<'a>

§

impl<'a> !Send for HitRecord<'a>

§

impl<'a> !Sync for HitRecord<'a>

§

impl<'a> Unpin for HitRecord<'a>

§

impl<'a> !UnwindSafe for HitRecord<'a>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/index.html b/clovers/index.html new file mode 100644 index 00000000..48da62f4 --- /dev/null +++ b/clovers/index.html @@ -0,0 +1,43 @@ +clovers - Rust

Crate clovers

source ·
Expand description

clovers - ray tracing in rust!

+

Note: This library is experimental & heavily work in progress. Everything can change at a moment’s notice. It is probably not a good idea to use this library for anything other than experimentation for now!

+

This project uses GitHub for development and issue tracking. Link to the repository.

+

Guiding thoughts

+
    +
  • Keep it clean: prefer good abstractions, avoid deep integration
  • +
  • Platform agnostic: hopefully runnable by both CPU and GPU, on desktop and WebAssembly, etc
  • +
  • Prefer correctness: no “cheating” optimizations / approximations
  • +
  • Look for beautiful light <3
  • +
+

How it works

+

There are a few core stages of using clovers.

+

Creating and Loading a Scene

+

First, you will need a Scene. You can create a scene manually or utilize serde to deserialize from a file. Currently, the example binary uses a JSON format.

+ +

Rendering the Scene

+

clovers is not opinionated on how you want to render your scene. In a usual scenario, you probably want to have some form of a pixel buffer, with knowledge of the x and y coordinates of your buffer.

+
    +
  • Rendering is done by creating Rays and seeing what they hit
  • +
  • A Ray has an origin and a direction
  • +
  • Every Object has a hit() method that takes a Ray and returns an Option<HitRecord>
  • +
  • If you get None, use that information to colorize your pixel with a default color
  • +
  • If you get Some(HitRecord), use its details to colorize your pixel
  • +
  • You most likely also want to recurse: depending on the material, maybe scatter() and cast a new Ray?
  • +
+

You most likely want to repeat this process multiple times for each of your pixels: generating multiple samples per pixel results in a higher quality image.

+

The library provides an opinionated colorize() function that does the steps mentioned above. Using it is optional - feel free to implement your own methods that utilize the lower-level building blocks for more creative power!

+

Post processing

+

TODO: maybe add some post processing utilities?

+
    +
  • denoise support?
  • +
  • 3D & rendering aware effects?
  • +
  • etc
  • +
+

Using the result

+

At the end, use your pixel buffer - save to an image file, draw a frame in a GUI window, etc.

+

Modules

  • Axis-aligned bounding box.
  • Bounding Volume Hierarchy Node.
  • Camera. Used for creating Rays towards the scene, with directions defined by the camera properties.
  • An opinionated colorize method. Given a Ray and a Scene, evaluates the ray’s path and returns a color.
  • An abstraction for things that can be hit by Rays.
  • Interval helper adapted from the book
  • Materials enable different behaviors of light on objects.
  • Alternative render method to colorize.
  • Various literal objects and meta-object utilities for creating content in Scenes.
  • Orthonormal bases
  • Probability density functions
  • Various internal helper functions for getting specific kinds of random values.
  • The very core of the ray tracing rendering itself: the Ray
  • A collection of objects, camera, and other things necessary to describe the environment you wish to render.
  • Textures enable different surface textures for colorizing objects in various ways.
  • The fundamental building blocks of spectral rendering.

Structs

  • A pointer type that uniquely owns a heap allocation of type T.
  • Rendering options struct
  • A contiguous growable array type, written as Vec<T>, short for ‘vector’.

Constants

  • Internal const: epsilon used in the hit calculation of a ConstantMedium.
  • Internal const: epsilon used for having a finitely-sized thickness for the bounding box of an infinitely-thin rectangle. Shouldn’t be too small.
  • Internal const: epsilon used for avoiding “shadow acne”. This is mostly used for the initial minimum distance for ray hits after reflecting or scattering from a surface.
  • Internal helper: re-exports the pi constant as our internal Float type. TODO: selectable at run time instead of build time?

Type Aliases

  • Internal type alias: this allows the crate to easily switch between float precision without modifying a lot of files.
  • Internal type alias: a nalgebra Vector2 which is a vector with two dimensions, containing two of our internal Float types
  • Internal type alias: a nalgebra Vector3 which is a vector with three dimensions, containing three of our internal Float types
  • Internal type alias: a nalgebra Vector4 which is a vector with four dimensions, containing four of our internal Float types
\ No newline at end of file diff --git a/clovers/interval/index.html b/clovers/interval/index.html new file mode 100644 index 00000000..6a49a841 --- /dev/null +++ b/clovers/interval/index.html @@ -0,0 +1,2 @@ +clovers::interval - Rust

Module clovers::interval

source ·
Expand description

Interval helper adapted from the book

+

Structs

\ No newline at end of file diff --git a/clovers/interval/sidebar-items.js b/clovers/interval/sidebar-items.js new file mode 100644 index 00000000..96d8458b --- /dev/null +++ b/clovers/interval/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Interval"]}; \ No newline at end of file diff --git a/clovers/interval/struct.Interval.html b/clovers/interval/struct.Interval.html new file mode 100644 index 00000000..4fb96bd9 --- /dev/null +++ b/clovers/interval/struct.Interval.html @@ -0,0 +1,59 @@ +Interval in clovers::interval - Rust

Struct clovers::interval::Interval

source ·
pub struct Interval {
+    pub min: Float,
+    pub max: Float,
+}
Expand description

An interval structure.

+

Fields§

§min: Float

Smallest value of the interval. Must be kept in order

+
§max: Float

Largest value of the interval. Must be kept in order

+

Implementations§

source§

impl Interval

source

pub fn new(a: Float, b: Float) -> Self

Constructs a new interval

+
source

pub fn new_from_intervals(a: Interval, b: Interval) -> Self

Constructs a new interval from two intervals

+
source

pub fn expand(&self, delta: Float) -> Self

Returns an interval expanded with delta at both ends

+
source

pub fn size(self) -> Float

Returns the size of the interval

+

Trait Implementations§

source§

impl Add<f32> for Interval

§

type Output = Interval

The resulting type after applying the + operator.
source§

fn add(self, offset: Float) -> Self::Output

Performs the + operation. Read more
source§

impl Clone for Interval

source§

fn clone(&self) -> Interval

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Interval

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Interval

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Interval

source§

fn eq(&self, other: &Interval) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Interval

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Interval

source§

impl StructuralPartialEq for Interval

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

source§

impl<T> Scalar for Twhere + T: 'static + Clone + PartialEq + Debug,

\ No newline at end of file diff --git a/clovers/materials/cone_light/index.html b/clovers/materials/cone_light/index.html new file mode 100644 index 00000000..b59ea000 --- /dev/null +++ b/clovers/materials/cone_light/index.html @@ -0,0 +1,2 @@ +clovers::materials::cone_light - Rust
Expand description

A cone light material.

+

Structs

  • A cone light material. The material emits light if the incoming ray is within a certain amount of degrees from the surface normal.
\ No newline at end of file diff --git a/clovers/materials/cone_light/sidebar-items.js b/clovers/materials/cone_light/sidebar-items.js new file mode 100644 index 00000000..0594eee7 --- /dev/null +++ b/clovers/materials/cone_light/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ConeLight"]}; \ No newline at end of file diff --git a/clovers/materials/cone_light/struct.ConeLight.html b/clovers/materials/cone_light/struct.ConeLight.html new file mode 100644 index 00000000..f36d9ce8 --- /dev/null +++ b/clovers/materials/cone_light/struct.ConeLight.html @@ -0,0 +1,69 @@ +ConeLight in clovers::materials::cone_light - Rust
pub struct ConeLight { /* private fields */ }
Expand description

A cone light material. The material emits light if the incoming ray is within a certain amount of degrees from the surface normal.

+

Implementations§

source§

impl ConeLight

source

pub fn new(spread: Float, emit: Texture) -> Self

Creates a new ConeLight material with the given Texture.

+

Trait Implementations§

source§

impl Clone for ConeLight

source§

fn clone(&self) -> ConeLight

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ConeLight

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ConeLight

source§

fn default() -> Self

Creates a new ConeLight with white light at intensity 100.0 and a spread of 10 degrees.

+
source§

impl<'de> Deserialize<'de> for ConeLight

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<ConeLight> for Material

source§

fn from(v: ConeLight) -> Material

Converts to this type from the input type.
source§

impl MaterialTrait for ConeLight

source§

fn scatter( + &self, + _ray: &Ray, + _hit_record: &HitRecord<'_>, + _rng: &mut SmallRng +) -> Option<ScatterRecord<'_>>

Scatter method for the ConeLight material. Always returns None, as diffuse light does not scatter.

+
source§

fn scattering_pdf( + &self, + _hit_record: &HitRecord<'_>, + _scattered: &Ray, + _rng: &mut SmallRng +) -> Option<Float>

Scattering probability density function for the ConeLight material. Always returns 0, as diffuse light does not scatter.

+
source§

fn emit( + &self, + ray: &Ray, + hit_record: &HitRecord<'_>, + u: Float, + v: Float, + position: Vec3 +) -> LinSrgb

Emission function for ConeLight. If the given HitRecord has been hit on the front_face, emit a color based on the texture and surface coordinates. Otherwise, emit pure black.

+
source§

impl Serialize for ConeLight

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<ConeLight> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<ConeLight, <Self as TryInto<ConeLight>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/materials/dielectric/index.html b/clovers/materials/dielectric/index.html new file mode 100644 index 00000000..0cfa113a --- /dev/null +++ b/clovers/materials/dielectric/index.html @@ -0,0 +1,2 @@ +clovers::materials::dielectric - Rust
Expand description

A dielectric material. This resembles glass and other transparent and reflective materials.

+

Structs

  • A dielectric material. This resembles glass and other transparent and reflective materials.
\ No newline at end of file diff --git a/clovers/materials/dielectric/sidebar-items.js b/clovers/materials/dielectric/sidebar-items.js new file mode 100644 index 00000000..506c8a16 --- /dev/null +++ b/clovers/materials/dielectric/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Dielectric"]}; \ No newline at end of file diff --git a/clovers/materials/dielectric/struct.Dielectric.html b/clovers/materials/dielectric/struct.Dielectric.html new file mode 100644 index 00000000..04506cf6 --- /dev/null +++ b/clovers/materials/dielectric/struct.Dielectric.html @@ -0,0 +1,72 @@ +Dielectric in clovers::materials::dielectric - Rust
pub struct Dielectric {
+    pub refractive_index: Float,
+    pub color: Srgb,
+}
Expand description

A dielectric material. This resembles glass and other transparent and reflective materials.

+

Fields§

§refractive_index: Float

Refractive index of the material. Used for calculating the new direction of a ray when entering the material at an angle. Follows Snell’s law of refraction. Default value: 1.5, based on typical window glass.

+
§color: Srgb

Color of the material. Used for colorizing the rays. Default value: [(1.0, 1.0, 1.0)], producing a fully transparent, clear glass.

+

Implementations§

source§

impl Dielectric

source

pub fn new(refractive_index: Float, color: Srgb) -> Self

Creates a new Dielectric material with the given refractive index and color.

+

Trait Implementations§

source§

impl Clone for Dielectric

source§

fn clone(&self) -> Dielectric

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Dielectric

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Dielectric

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Dielectric

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Dielectric> for Material

source§

fn from(v: Dielectric) -> Material

Converts to this type from the input type.
source§

impl MaterialTrait for Dielectric

source§

fn scatter( + &self, + ray: &Ray, + hit_record: &HitRecord<'_>, + rng: &mut SmallRng +) -> Option<ScatterRecord<'_>>

Scatter method for the Dielectric material. Given a ray and a hit_record, evaluate a ScatterRecord based on possible reflection or refraction.

+
source§

fn scattering_pdf( + &self, + _hit_record: &HitRecord<'_>, + _scattered: &Ray, + _rng: &mut SmallRng +) -> Option<Float>

Scattering probability density function for Dielectric material. NOTE: not implemented!

+
source§

fn emit( + &self, + _ray: &Ray, + _hit_record: &HitRecord<'_>, + _u: Float, + _v: Float, + _position: Vec3 +) -> LinSrgb

Returns the emissivity of the material at the given position. Defaults to black as most materials don’t emit - override when needed.
source§

impl Serialize for Dielectric

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<Dielectric> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<Dielectric, <Self as TryInto<Dielectric>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/materials/diffuse_light/index.html b/clovers/materials/diffuse_light/index.html new file mode 100644 index 00000000..cd5e2066 --- /dev/null +++ b/clovers/materials/diffuse_light/index.html @@ -0,0 +1,2 @@ +clovers::materials::diffuse_light - Rust
Expand description

A diffuse light material.

+

Structs

  • A diffuse light material. On this material, rays never scatter - the material always emits a color based on its texture.
\ No newline at end of file diff --git a/clovers/materials/diffuse_light/sidebar-items.js b/clovers/materials/diffuse_light/sidebar-items.js new file mode 100644 index 00000000..9a1eea22 --- /dev/null +++ b/clovers/materials/diffuse_light/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["DiffuseLight"]}; \ No newline at end of file diff --git a/clovers/materials/diffuse_light/struct.DiffuseLight.html b/clovers/materials/diffuse_light/struct.DiffuseLight.html new file mode 100644 index 00000000..3746dcc9 --- /dev/null +++ b/clovers/materials/diffuse_light/struct.DiffuseLight.html @@ -0,0 +1,71 @@ +DiffuseLight in clovers::materials::diffuse_light - Rust
pub struct DiffuseLight { /* private fields */ }
Expand description

A diffuse light material. On this material, rays never scatter - the material always emits a color based on its texture.

+

Implementations§

source§

impl DiffuseLight

source

pub fn new(emission: Texture) -> Self

Creates a new DiffuseLight material with the given Texture.

+

Trait Implementations§

source§

impl Clone for DiffuseLight

source§

fn clone(&self) -> DiffuseLight

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffuseLight

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DiffuseLight

source§

fn default() -> Self

Creates a new DiffuseLight with white light at intensity 100.0

+
source§

impl<'de> Deserialize<'de> for DiffuseLight

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<DiffuseLight> for Material

source§

fn from(v: DiffuseLight) -> Material

Converts to this type from the input type.
source§

impl MaterialTrait for DiffuseLight

source§

fn scatter( + &self, + _ray: &Ray, + _hit_record: &HitRecord<'_>, + _rng: &mut SmallRng +) -> Option<ScatterRecord<'_>>

Scatter method for the DiffuseLight material. Always returns None, as diffuse light does not scatter.

+
source§

fn scattering_pdf( + &self, + _hit_record: &HitRecord<'_>, + _scattered: &Ray, + _rng: &mut SmallRng +) -> Option<Float>

Scattering probability density function for the DiffuseLight material. Always returns 0, as diffuse light does not scatter.

+
source§

fn emit( + &self, + _ray: &Ray, + hit_record: &HitRecord<'_>, + u: Float, + v: Float, + position: Vec3 +) -> LinSrgb

Emission function for DiffuseLight. If the given HitRecord has been hit on the front_face, emit a color based on the texture and surface coordinates. Otherwise, emit pure black.

+
source§

impl Serialize for DiffuseLight

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<DiffuseLight> for Material

§

type Error = &'static str

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

fn try_into( + self +) -> Result<DiffuseLight, <Self as TryInto<DiffuseLight>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/materials/dispersive/index.html b/clovers/materials/dispersive/index.html new file mode 100644 index 00000000..7f566dd0 --- /dev/null +++ b/clovers/materials/dispersive/index.html @@ -0,0 +1,3 @@ +clovers::materials::dispersive - Rust
Expand description

Dispersive material. +Based on Cauchy’s equation

+

Structs

\ No newline at end of file diff --git a/clovers/materials/dispersive/sidebar-items.js b/clovers/materials/dispersive/sidebar-items.js new file mode 100644 index 00000000..018d9878 --- /dev/null +++ b/clovers/materials/dispersive/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Dispersive"]}; \ No newline at end of file diff --git a/clovers/materials/dispersive/struct.Dispersive.html b/clovers/materials/dispersive/struct.Dispersive.html new file mode 100644 index 00000000..3ccde94d --- /dev/null +++ b/clovers/materials/dispersive/struct.Dispersive.html @@ -0,0 +1,71 @@ +Dispersive in clovers::materials::dispersive - Rust
pub struct Dispersive {
+    pub cauchy_a: Float,
+    pub cauchy_b: Float,
+}
Expand description

A dispersive glass material.

+

Fields§

§cauchy_a: Float

Cauchy coefficient A of the material

+
§cauchy_b: Float

Cauchy coefficient B of the material

+

Implementations§

source§

impl Dispersive

source

pub fn new(cauchy_a: Float, cauchy_b: Float) -> Self

Creates a new Dispersive material with the given Cauchy equation constants.

+
source

pub fn refractive_index(&self, wavelength: Wavelength) -> Float

Calculates the refractive index of the material for the given wavelength

+

Trait Implementations§

source§

impl Clone for Dispersive

source§

fn clone(&self) -> Dispersive

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Dispersive

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Dispersive

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Dispersive

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Dispersive> for Material

source§

fn from(v: Dispersive) -> Material

Converts to this type from the input type.
source§

impl MaterialTrait for Dispersive

source§

fn scatter( + &self, + ray: &Ray, + hit_record: &HitRecord<'_>, + rng: &mut SmallRng +) -> Option<ScatterRecord<'_>>

Given a ray and a hitrecord, return the possible ScatterRecord.
source§

fn scattering_pdf( + &self, + _hit_record: &HitRecord<'_>, + _scattered: &Ray, + _rng: &mut SmallRng +) -> Option<Float>

TODO: explain
source§

fn emit( + &self, + _ray: &Ray, + _hit_record: &HitRecord<'_>, + _u: Float, + _v: Float, + _position: Vec3 +) -> LinSrgb

Returns the emissivity of the material at the given position. Defaults to black as most materials don’t emit - override when needed.
source§

impl Serialize for Dispersive

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<Dispersive> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<Dispersive, <Self as TryInto<Dispersive>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/materials/enum.Material.html b/clovers/materials/enum.Material.html new file mode 100644 index 00000000..bb593dbe --- /dev/null +++ b/clovers/materials/enum.Material.html @@ -0,0 +1,84 @@ +Material in clovers::materials - Rust
pub enum Material {
+    Dielectric(Dielectric),
+    Dispersive(Dispersive),
+    Lambertian(Lambertian),
+    ConeLight(ConeLight),
+    DiffuseLight(DiffuseLight),
+    Metal(Metal),
+    Isotropic(Isotropic),
+}
Expand description

A material enum. TODO: for ideal clean abstraction, this should be a trait. However, that comes with some additional considerations, including e.g. performance.

+

Variants§

§

Dielectric(Dielectric)

Dielectric material

+
§

Dispersive(Dispersive)

Dispersive material

+
§

Lambertian(Lambertian)

Lambertian material

+
§

ConeLight(ConeLight)

ConeLight material

+
§

DiffuseLight(DiffuseLight)

DiffuseLight material

+
§

Metal(Metal)

Metal material

+
§

Isotropic(Isotropic)

Isotropic material

+

Trait Implementations§

source§

impl Clone for Material

source§

fn clone(&self) -> Material

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Material

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Material

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Material

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<ConeLight> for Material

source§

fn from(v: ConeLight) -> Material

Converts to this type from the input type.
source§

impl From<Dielectric> for Material

source§

fn from(v: Dielectric) -> Material

Converts to this type from the input type.
source§

impl From<DiffuseLight> for Material

source§

fn from(v: DiffuseLight) -> Material

Converts to this type from the input type.
source§

impl From<Dispersive> for Material

source§

fn from(v: Dispersive) -> Material

Converts to this type from the input type.
source§

impl From<Isotropic> for Material

source§

fn from(v: Isotropic) -> Material

Converts to this type from the input type.
source§

impl From<Lambertian> for Material

source§

fn from(v: Lambertian) -> Material

Converts to this type from the input type.
source§

impl From<Metal> for Material

source§

fn from(v: Metal) -> Material

Converts to this type from the input type.
source§

impl MaterialTrait for Material

source§

fn scatter( + &self, + __enum_dispatch_arg_0: &Ray, + __enum_dispatch_arg_1: &HitRecord<'_>, + __enum_dispatch_arg_2: &mut SmallRng +) -> Option<ScatterRecord<'_>>

Given a ray and a hitrecord, return the possible ScatterRecord.

+
source§

fn scattering_pdf( + &self, + __enum_dispatch_arg_0: &HitRecord<'_>, + __enum_dispatch_arg_1: &Ray, + __enum_dispatch_arg_2: &mut SmallRng +) -> Option<Float>

TODO: explain

+
source§

fn emit( + &self, + __enum_dispatch_arg_0: &Ray, + __enum_dispatch_arg_1: &HitRecord<'_>, + __enum_dispatch_arg_2: Float, + __enum_dispatch_arg_3: Float, + __enum_dispatch_arg_4: Vec3 +) -> LinSrgb

Returns the emissivity of the material at the given position. Defaults to black as most materials don’t emit - override when needed.

+
source§

impl Serialize for Material

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<ConeLight> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<ConeLight, <Self as TryInto<ConeLight>>::Error>

Performs the conversion.
source§

impl TryInto<Dielectric> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<Dielectric, <Self as TryInto<Dielectric>>::Error>

Performs the conversion.
source§

impl TryInto<DiffuseLight> for Material

§

type Error = &'static str

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

fn try_into( + self +) -> Result<DiffuseLight, <Self as TryInto<DiffuseLight>>::Error>

Performs the conversion.
source§

impl TryInto<Dispersive> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<Dispersive, <Self as TryInto<Dispersive>>::Error>

Performs the conversion.
source§

impl TryInto<Isotropic> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<Isotropic, <Self as TryInto<Isotropic>>::Error>

Performs the conversion.
source§

impl TryInto<Lambertian> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<Lambertian, <Self as TryInto<Lambertian>>::Error>

Performs the conversion.
source§

impl TryInto<Metal> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<Metal, <Self as TryInto<Metal>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/materials/enum.MaterialInit.html b/clovers/materials/enum.MaterialInit.html new file mode 100644 index 00000000..33418243 --- /dev/null +++ b/clovers/materials/enum.MaterialInit.html @@ -0,0 +1,52 @@ +MaterialInit in clovers::materials - Rust
pub enum MaterialInit {
+    Shared(String),
+    Owned(Material),
+}
Expand description

Initialization structure for a Material. Either contains a Material by itself, or a String name to be found in a shared material list.

+

Variants§

§

Shared(String)

Name of the shared material

+
§

Owned(Material)

Owned material structure

+

Trait Implementations§

source§

impl Clone for MaterialInit

source§

fn clone(&self) -> MaterialInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MaterialInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for MaterialInit

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for MaterialInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for MaterialInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/materials/enum.MaterialType.html b/clovers/materials/enum.MaterialType.html new file mode 100644 index 00000000..63abc932 --- /dev/null +++ b/clovers/materials/enum.MaterialType.html @@ -0,0 +1,49 @@ +MaterialType in clovers::materials - Rust
pub enum MaterialType {
+    Diffuse,
+    Specular,
+}
Expand description

Enum for the types of materials: Diffuse and Specular (i.e., matte and shiny)

+

Variants§

§

Diffuse

A matte material that does not reflect rays

+
§

Specular

A shiny material that reflects some rays

+

Trait Implementations§

source§

impl Clone for MaterialType

source§

fn clone(&self) -> MaterialType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MaterialType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/materials/gltf/index.html b/clovers/materials/gltf/index.html new file mode 100644 index 00000000..cf1ea633 --- /dev/null +++ b/clovers/materials/gltf/index.html @@ -0,0 +1,2 @@ +clovers::materials::gltf - Rust

Module clovers::materials::gltf

source ·
Expand description

Wrapper for GLTF materials.

+

Structs

\ No newline at end of file diff --git a/clovers/materials/gltf/sidebar-items.js b/clovers/materials/gltf/sidebar-items.js new file mode 100644 index 00000000..7e7527a1 --- /dev/null +++ b/clovers/materials/gltf/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["GLTFMaterial"]}; \ No newline at end of file diff --git a/clovers/materials/gltf/struct.GLTFMaterial.html b/clovers/materials/gltf/struct.GLTFMaterial.html new file mode 100644 index 00000000..7400d94e --- /dev/null +++ b/clovers/materials/gltf/struct.GLTFMaterial.html @@ -0,0 +1,68 @@ +GLTFMaterial in clovers::materials::gltf - Rust
pub struct GLTFMaterial<'scene> { /* private fields */ }
Expand description

GLTF Material wrapper type

+

Implementations§

source§

impl<'scene> GLTFMaterial<'scene>

source

pub fn new( + material: &'scene Material<'_>, + tex_coords: [[Float; 2]; 3], + normals: Option<[[Float; 3]; 3]>, + tangents: Option<[[Float; 4]; 3]>, + images: &'scene [Data] +) -> Self

Initialize a new GLTF material wrapper

+

Trait Implementations§

source§

impl<'scene> Clone for GLTFMaterial<'scene>

source§

fn clone(&self) -> GLTFMaterial<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for GLTFMaterial<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> Default for GLTFMaterial<'scene>

source§

fn default() -> Self

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

impl<'scene> MaterialTrait for GLTFMaterial<'scene>

source§

fn scatter( + &self, + ray: &Ray, + hit_record: &HitRecord<'_>, + rng: &mut SmallRng +) -> Option<ScatterRecord<'_>>

Given a ray and a hitrecord, return the possible ScatterRecord.
source§

fn scattering_pdf( + &self, + hit_record: &HitRecord<'_>, + scattered: &Ray, + _rng: &mut SmallRng +) -> Option<Float>

TODO: explain
source§

fn emit( + &self, + _ray: &Ray, + _hit_record: &HitRecord<'_>, + _u: Float, + _v: Float, + _position: Vec3 +) -> LinSrgb

Returns the emissivity of the material at the given position. Defaults to black as most materials don’t emit - override when needed.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for GLTFMaterial<'scene>

§

impl<'scene> Send for GLTFMaterial<'scene>

§

impl<'scene> Sync for GLTFMaterial<'scene>

§

impl<'scene> Unpin for GLTFMaterial<'scene>

§

impl<'scene> UnwindSafe for GLTFMaterial<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/materials/index.html b/clovers/materials/index.html new file mode 100644 index 00000000..97685899 --- /dev/null +++ b/clovers/materials/index.html @@ -0,0 +1,3 @@ +clovers::materials - Rust

Module clovers::materials

source ·
Expand description

Materials enable different behaviors of light on objects.

+

Re-exports

Modules

Structs

Enums

  • A material enum. TODO: for ideal clean abstraction, this should be a trait. However, that comes with some additional considerations, including e.g. performance.
  • Initialization structure for a Material. Either contains a Material by itself, or a String name to be found in a shared material list.
  • Enum for the types of materials: Diffuse and Specular (i.e., matte and shiny)

Traits

  • Trait for materials. Requires three function implementations: scatter, scattering_pdf, and emit.
\ No newline at end of file diff --git a/clovers/materials/isotropic/index.html b/clovers/materials/isotropic/index.html new file mode 100644 index 00000000..bc902aa7 --- /dev/null +++ b/clovers/materials/isotropic/index.html @@ -0,0 +1,2 @@ +clovers::materials::isotropic - Rust
Expand description

Isotropic material.

+

Structs

\ No newline at end of file diff --git a/clovers/materials/isotropic/sidebar-items.js b/clovers/materials/isotropic/sidebar-items.js new file mode 100644 index 00000000..a5cc0b6a --- /dev/null +++ b/clovers/materials/isotropic/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Isotropic"]}; \ No newline at end of file diff --git a/clovers/materials/isotropic/struct.Isotropic.html b/clovers/materials/isotropic/struct.Isotropic.html new file mode 100644 index 00000000..1c4aebb4 --- /dev/null +++ b/clovers/materials/isotropic/struct.Isotropic.html @@ -0,0 +1,67 @@ +Isotropic in clovers::materials::isotropic - Rust
pub struct Isotropic { /* private fields */ }
Expand description

Isotropic material. Used in ConstantMedium. TODO: understand this!

+

Implementations§

source§

impl Isotropic

source

pub fn new(emission: Texture) -> Self

Creates a new Isotropic material with an albedo of the given Texture.

+

Trait Implementations§

source§

impl Clone for Isotropic

source§

fn clone(&self) -> Isotropic

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Isotropic

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Isotropic

source§

fn default() -> Isotropic

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

impl<'de> Deserialize<'de> for Isotropic

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Isotropic> for Material

source§

fn from(v: Isotropic) -> Material

Converts to this type from the input type.
source§

impl MaterialTrait for Isotropic

source§

fn scatter( + &self, + _ray: &Ray, + hit_record: &HitRecord<'_>, + _rng: &mut SmallRng +) -> Option<ScatterRecord<'_>>

Returns a ScatterRecord based on the HitRecord coordinates and the given Texture, or None if the ray did not hit the material.

+
source§

fn scattering_pdf( + &self, + _hit_record: &HitRecord<'_>, + _scattered: &Ray, + _rng: &mut SmallRng +) -> Option<Float>

Returns the scattering probability density function for the Isotropic material

+
source§

fn emit( + &self, + _ray: &Ray, + _hit_record: &HitRecord<'_>, + _u: Float, + _v: Float, + _position: Vec3 +) -> LinSrgb

Returns the emissivity of the material at the given position. Defaults to black as most materials don’t emit - override when needed.
source§

impl Serialize for Isotropic

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<Isotropic> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<Isotropic, <Self as TryInto<Isotropic>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/materials/lambertian/index.html b/clovers/materials/lambertian/index.html new file mode 100644 index 00000000..b47e844c --- /dev/null +++ b/clovers/materials/lambertian/index.html @@ -0,0 +1,2 @@ +clovers::materials::lambertian - Rust
Expand description

Lambertian material. This is the default material with a smooth, matte surface.

+

Structs

  • Lambertian material. This is the default material with a smooth, matte surface.
\ No newline at end of file diff --git a/clovers/materials/lambertian/sidebar-items.js b/clovers/materials/lambertian/sidebar-items.js new file mode 100644 index 00000000..f5f6e142 --- /dev/null +++ b/clovers/materials/lambertian/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Lambertian"]}; \ No newline at end of file diff --git a/clovers/materials/lambertian/struct.Lambertian.html b/clovers/materials/lambertian/struct.Lambertian.html new file mode 100644 index 00000000..331d2d86 --- /dev/null +++ b/clovers/materials/lambertian/struct.Lambertian.html @@ -0,0 +1,67 @@ +Lambertian in clovers::materials::lambertian - Rust
pub struct Lambertian { /* private fields */ }
Expand description

Lambertian material. This is the default material with a smooth, matte surface.

+

Implementations§

source§

impl Lambertian

source

pub fn new(albedo: impl Into<Texture>) -> Self

Creates a new instance of the Lambertian material with an albedo of the given Texture.

+

Trait Implementations§

source§

impl Clone for Lambertian

source§

fn clone(&self) -> Lambertian

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Lambertian

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Lambertian

source§

fn default() -> Lambertian

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

impl<'de> Deserialize<'de> for Lambertian

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Lambertian> for Material

source§

fn from(v: Lambertian) -> Material

Converts to this type from the input type.
source§

impl MaterialTrait for Lambertian

source§

fn scatter( + &self, + _ray: &Ray, + hit_record: &HitRecord<'_>, + _rng: &mut SmallRng +) -> Option<ScatterRecord<'_>>

Returns None, if ray is absorbed. Otherwise, returns a ray, albedo of what was hit, and (?) a value used for probability density function based sampling

+
source§

fn scattering_pdf( + &self, + hit_record: &HitRecord<'_>, + scattered: &Ray, + _rng: &mut SmallRng +) -> Option<Float>

Returns the scattering probability density function for the Lambertian material. TODO: explain the math

+
source§

fn emit( + &self, + _ray: &Ray, + _hit_record: &HitRecord<'_>, + _u: Float, + _v: Float, + _position: Vec3 +) -> LinSrgb

Returns the emissivity of the material at the given position. Defaults to black as most materials don’t emit - override when needed.
source§

impl Serialize for Lambertian

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<Lambertian> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<Lambertian, <Self as TryInto<Lambertian>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/materials/metal/index.html b/clovers/materials/metal/index.html new file mode 100644 index 00000000..546efc2b --- /dev/null +++ b/clovers/materials/metal/index.html @@ -0,0 +1,2 @@ +clovers::materials::metal - Rust

Module clovers::materials::metal

source ·
Expand description

A metal material.

+

Structs

  • A metal material. The amount of reflection can be adjusted with the fuzz parameter.
\ No newline at end of file diff --git a/clovers/materials/metal/sidebar-items.js b/clovers/materials/metal/sidebar-items.js new file mode 100644 index 00000000..b3204dce --- /dev/null +++ b/clovers/materials/metal/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Metal"]}; \ No newline at end of file diff --git a/clovers/materials/metal/struct.Metal.html b/clovers/materials/metal/struct.Metal.html new file mode 100644 index 00000000..0d03943b --- /dev/null +++ b/clovers/materials/metal/struct.Metal.html @@ -0,0 +1,67 @@ +Metal in clovers::materials::metal - Rust

Struct clovers::materials::metal::Metal

source ·
pub struct Metal { /* private fields */ }
Expand description

A metal material. The amount of reflection can be adjusted with the fuzz parameter.

+

Implementations§

source§

impl Metal

source

pub fn new(albedo: Texture, fuzz: Float) -> Self

Creates a new Metal material with the albedo of the given Texture and a smoothness-roughness factor specified by fuzz parameter.

+

Trait Implementations§

source§

impl Clone for Metal

source§

fn clone(&self) -> Metal

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metal

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Metal

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Metal> for Material

source§

fn from(v: Metal) -> Material

Converts to this type from the input type.
source§

impl MaterialTrait for Metal

source§

fn scatter( + &self, + ray: &Ray, + hit_record: &HitRecord<'_>, + rng: &mut SmallRng +) -> Option<ScatterRecord<'_>>

Scatter function for the Metal material. Metal always reflects, and a specular ray is calculated with some randomness adjusted by the fuzz factor. This means the metal can be made more shiny or more matte. The returned ScatterRecord will have a probability density function of ZeroPDF and material type of MaterialType::Specular

+
source§

fn scattering_pdf( + &self, + _hit_record: &HitRecord<'_>, + _scattered: &Ray, + _rng: &mut SmallRng +) -> Option<Float>

Scattering probability density function for Metal. Always returns zero. TODO: why?

+
source§

fn emit( + &self, + _ray: &Ray, + _hit_record: &HitRecord<'_>, + _u: Float, + _v: Float, + _position: Vec3 +) -> LinSrgb

Returns the emissivity of the material at the given position. Defaults to black as most materials don’t emit - override when needed.
source§

impl Serialize for Metal

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<Metal> for Material

§

type Error = &'static str

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

fn try_into(self) -> Result<Metal, <Self as TryInto<Metal>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl RefUnwindSafe for Metal

§

impl Send for Metal

§

impl Sync for Metal

§

impl Unpin for Metal

§

impl UnwindSafe for Metal

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/materials/sidebar-items.js b/clovers/materials/sidebar-items.js new file mode 100644 index 00000000..befc146e --- /dev/null +++ b/clovers/materials/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Material","MaterialInit","MaterialType"],"mod":["cone_light","dielectric","diffuse_light","dispersive","gltf","isotropic","lambertian","metal"],"struct":["ScatterRecord","SharedMaterial"],"trait":["MaterialTrait"]}; \ No newline at end of file diff --git a/clovers/materials/struct.ScatterRecord.html b/clovers/materials/struct.ScatterRecord.html new file mode 100644 index 00000000..0d2fb8c6 --- /dev/null +++ b/clovers/materials/struct.ScatterRecord.html @@ -0,0 +1,53 @@ +ScatterRecord in clovers::materials - Rust
pub struct ScatterRecord<'ray> {
+    pub material_type: MaterialType,
+    pub specular_ray: Option<Ray>,
+    pub attenuation: LinSrgb,
+    pub pdf_ptr: PDF<'ray>,
+}
Expand description

A record of an scattering event of a Ray on a Material.

+

Fields§

§material_type: MaterialType

The material type that was scattered on

+
§specular_ray: Option<Ray>

Direction of a generated specular ray

+
§attenuation: LinSrgb

Current color to take into account when following the scattered ray for futher iterations

+
§pdf_ptr: PDF<'ray>

Probability density function to use with the ScatterRecord.

+

Trait Implementations§

source§

impl<'ray> Clone for ScatterRecord<'ray>

source§

fn clone(&self) -> ScatterRecord<'ray>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ray> Debug for ScatterRecord<'ray>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'ray> RefUnwindSafe for ScatterRecord<'ray>

§

impl<'ray> Send for ScatterRecord<'ray>

§

impl<'ray> Sync for ScatterRecord<'ray>

§

impl<'ray> Unpin for ScatterRecord<'ray>

§

impl<'ray> UnwindSafe for ScatterRecord<'ray>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/materials/struct.SharedMaterial.html b/clovers/materials/struct.SharedMaterial.html new file mode 100644 index 00000000..c0fb31b2 --- /dev/null +++ b/clovers/materials/struct.SharedMaterial.html @@ -0,0 +1,52 @@ +SharedMaterial in clovers::materials - Rust
pub struct SharedMaterial {
+    pub name: String,
+    pub material: Material,
+}
Expand description

A Material that can be referred to by name for reuse across multiple Objects

+

Fields§

§name: String

Name of the shared material

+
§material: Material

The shared material itself

+

Trait Implementations§

source§

impl Clone for SharedMaterial

source§

fn clone(&self) -> SharedMaterial

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SharedMaterial

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SharedMaterial

source§

fn default() -> SharedMaterial

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

impl<'de> Deserialize<'de> for SharedMaterial

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for SharedMaterial

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/materials/trait.MaterialTrait.html b/clovers/materials/trait.MaterialTrait.html new file mode 100644 index 00000000..2c5422c7 --- /dev/null +++ b/clovers/materials/trait.MaterialTrait.html @@ -0,0 +1,46 @@ +MaterialTrait in clovers::materials - Rust
pub trait MaterialTrait: Debug {
+    // Required methods
+    fn scatter(
+        &self,
+        ray: &Ray,
+        hit_record: &HitRecord<'_>,
+        rng: &mut SmallRng
+    ) -> Option<ScatterRecord<'_>>;
+    fn scattering_pdf(
+        &self,
+        hit_record: &HitRecord<'_>,
+        scattered: &Ray,
+        rng: &mut SmallRng
+    ) -> Option<Float>;
+
+    // Provided method
+    fn emit(
+        &self,
+        _ray: &Ray,
+        _hit_record: &HitRecord<'_>,
+        _u: Float,
+        _v: Float,
+        _position: Vec3
+    ) -> LinSrgb { ... }
+}
Expand description

Trait for materials. Requires three function implementations: scatter, scattering_pdf, and emit.

+

Required Methods§

source

fn scatter( + &self, + ray: &Ray, + hit_record: &HitRecord<'_>, + rng: &mut SmallRng +) -> Option<ScatterRecord<'_>>

Given a ray and a hitrecord, return the possible ScatterRecord.

+
source

fn scattering_pdf( + &self, + hit_record: &HitRecord<'_>, + scattered: &Ray, + rng: &mut SmallRng +) -> Option<Float>

TODO: explain

+

Provided Methods§

source

fn emit( + &self, + _ray: &Ray, + _hit_record: &HitRecord<'_>, + _u: Float, + _v: Float, + _position: Vec3 +) -> LinSrgb

Returns the emissivity of the material at the given position. Defaults to black as most materials don’t emit - override when needed.

+

Implementors§

\ No newline at end of file diff --git a/clovers/normals/fn.normal_map.html b/clovers/normals/fn.normal_map.html new file mode 100644 index 00000000..d16e9a94 --- /dev/null +++ b/clovers/normals/fn.normal_map.html @@ -0,0 +1,2 @@ +normal_map in clovers::normals - Rust

Function clovers::normals::normal_map

source ·
pub fn normal_map(ray: &Ray, scene: &Scene<'_>, rng: &mut SmallRng) -> LinSrgb
Expand description

Rendering function for getting a normal map in tangent space. Sends a Ray to the Scene, sees what it hits, gets the normal at that point, and returns a color based on the normal mapping colorization. Wikipedia: Normal mapping.

+
\ No newline at end of file diff --git a/clovers/normals/fn.normal_to_color.html b/clovers/normals/fn.normal_to_color.html new file mode 100644 index 00000000..986ab928 --- /dev/null +++ b/clovers/normals/fn.normal_to_color.html @@ -0,0 +1,2 @@ +normal_to_color in clovers::normals - Rust
pub fn normal_to_color(normal: Vec3) -> LinSrgb
Expand description

Given a surface normal, return a color based on normal mapping colorization.

+
\ No newline at end of file diff --git a/clovers/normals/index.html b/clovers/normals/index.html new file mode 100644 index 00000000..cde0bbca --- /dev/null +++ b/clovers/normals/index.html @@ -0,0 +1,2 @@ +clovers::normals - Rust

Module clovers::normals

source ·
Expand description

Alternative render method to colorize.

+

Functions

  • Rendering function for getting a normal map in tangent space. Sends a Ray to the Scene, sees what it hits, gets the normal at that point, and returns a color based on the normal mapping colorization. Wikipedia: Normal mapping.
  • Given a surface normal, return a color based on normal mapping colorization.
\ No newline at end of file diff --git a/clovers/normals/sidebar-items.js b/clovers/normals/sidebar-items.js new file mode 100644 index 00000000..340211c6 --- /dev/null +++ b/clovers/normals/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["normal_map","normal_to_color"]}; \ No newline at end of file diff --git a/clovers/objects/boxy/index.html b/clovers/objects/boxy/index.html new file mode 100644 index 00000000..a7fb533a --- /dev/null +++ b/clovers/objects/boxy/index.html @@ -0,0 +1,2 @@ +clovers::objects::boxy - Rust

Module clovers::objects::boxy

source ·
Expand description

A box or a cuboid object: a parallelepiped with six rectangular faces. Named Boxy to avoid clashing with Box.

+

Structs

  • A box or a cuboid object: a parallelepiped with six rectangular faces. Named Boxy to avoid clashing with Box.
  • BoxyInit structure describes the necessary data for constructing a Boxy. Used with serde when importing SceneFiles.
\ No newline at end of file diff --git a/clovers/objects/boxy/sidebar-items.js b/clovers/objects/boxy/sidebar-items.js new file mode 100644 index 00000000..b66d56ed --- /dev/null +++ b/clovers/objects/boxy/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Boxy","BoxyInit"]}; \ No newline at end of file diff --git a/clovers/objects/boxy/struct.Boxy.html b/clovers/objects/boxy/struct.Boxy.html new file mode 100644 index 00000000..5388b95a --- /dev/null +++ b/clovers/objects/boxy/struct.Boxy.html @@ -0,0 +1,53 @@ +Boxy in clovers::objects::boxy - Rust

Struct clovers::objects::boxy::Boxy

source ·
pub struct Boxy<'scene> {
+    pub material: &'scene Material,
+    pub aabb: AABB,
+    /* private fields */
+}
Expand description

A box or a cuboid object: a parallelepiped with six rectangular faces. Named Boxy to avoid clashing with Box.

+

Fields§

§material: &'scene Material

The material of the box

+
§aabb: AABB

Axis-aligned bounding box

+

Implementations§

source§

impl<'scene> Boxy<'scene>

source

pub fn new(corner_0: Vec3, corner_1: Vec3, material: &'scene Material) -> Self

Initializes a new instance of a box, given two opposing Vec3 corners corner_0 and corner_1, and a Material material.

+

Trait Implementations§

source§

impl<'scene> Clone for Boxy<'scene>

source§

fn clone(&self) -> Boxy<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for Boxy<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<Boxy<'scene>> for Hitable<'scene>

source§

fn from(v: Boxy<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<Boxy<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<Boxy<'scene>, <Self as TryInto<Boxy<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for Boxy<'scene>

§

impl<'scene> Send for Boxy<'scene>

§

impl<'scene> Sync for Boxy<'scene>

§

impl<'scene> Unpin for Boxy<'scene>

§

impl<'scene> UnwindSafe for Boxy<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/boxy/struct.BoxyInit.html b/clovers/objects/boxy/struct.BoxyInit.html new file mode 100644 index 00000000..7a80b6be --- /dev/null +++ b/clovers/objects/boxy/struct.BoxyInit.html @@ -0,0 +1,56 @@ +BoxyInit in clovers::objects::boxy - Rust

Struct clovers::objects::boxy::BoxyInit

source ·
pub struct BoxyInit {
+    pub priority: bool,
+    pub corner_0: Vec3,
+    pub corner_1: Vec3,
+    pub material: MaterialInit,
+}
Expand description

BoxyInit structure describes the necessary data for constructing a Boxy. Used with serde when importing SceneFiles.

+

Fields§

§priority: bool

Used for multiple importance sampling

+
§corner_0: Vec3

First corner for the box

+
§corner_1: Vec3

Second, opposing corner for the box

+
§material: MaterialInit

Material used for the box

+

Trait Implementations§

source§

impl Clone for BoxyInit

source§

fn clone(&self) -> BoxyInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BoxyInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for BoxyInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for BoxyInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/constant_medium/index.html b/clovers/objects/constant_medium/index.html new file mode 100644 index 00000000..738055b0 --- /dev/null +++ b/clovers/objects/constant_medium/index.html @@ -0,0 +1,2 @@ +clovers::objects::constant_medium - Rust
Expand description

ConstantMedium object. This should probably be a Material at some point, but this will do for now. This is essentially a fog with a known size, shape and density.

+

Structs

\ No newline at end of file diff --git a/clovers/objects/constant_medium/sidebar-items.js b/clovers/objects/constant_medium/sidebar-items.js new file mode 100644 index 00000000..0bb96e2b --- /dev/null +++ b/clovers/objects/constant_medium/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ConstantMedium","ConstantMediumInit"]}; \ No newline at end of file diff --git a/clovers/objects/constant_medium/struct.ConstantMedium.html b/clovers/objects/constant_medium/struct.ConstantMedium.html new file mode 100644 index 00000000..8c7492ed --- /dev/null +++ b/clovers/objects/constant_medium/struct.ConstantMedium.html @@ -0,0 +1,51 @@ +ConstantMedium in clovers::objects::constant_medium - Rust
pub struct ConstantMedium<'scene> { /* private fields */ }
Expand description

ConstantMedium object. This should probably be a Material at some point, but this will do for now. This is essentially a fog with a known size, shape and density.

+

Implementations§

source§

impl<'scene> ConstantMedium<'scene>

source

pub fn new( + boundary: Box<Hitable<'scene>>, + density: Float, + texture: Texture +) -> Self

Creates a new ConstantMedium with a known size, shape and density.

+

Trait Implementations§

source§

impl<'scene> Clone for ConstantMedium<'scene>

source§

fn clone(&self) -> ConstantMedium<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for ConstantMedium<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<ConstantMedium<'scene>> for Hitable<'scene>

source§

fn from(v: ConstantMedium<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<ConstantMedium<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<ConstantMedium<'scene>, <Self as TryInto<ConstantMedium<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for ConstantMedium<'scene>

§

impl<'scene> Send for ConstantMedium<'scene>

§

impl<'scene> Sync for ConstantMedium<'scene>

§

impl<'scene> Unpin for ConstantMedium<'scene>

§

impl<'scene> UnwindSafe for ConstantMedium<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/constant_medium/struct.ConstantMediumInit.html b/clovers/objects/constant_medium/struct.ConstantMediumInit.html new file mode 100644 index 00000000..0e1b7535 --- /dev/null +++ b/clovers/objects/constant_medium/struct.ConstantMediumInit.html @@ -0,0 +1,56 @@ +ConstantMediumInit in clovers::objects::constant_medium - Rust
pub struct ConstantMediumInit {
+    pub priority: bool,
+    pub boundary: Box<Object>,
+    pub density: Float,
+    pub texture: Texture,
+}
Expand description

ConstantMediumInit structure describes the necessary data for constructing a ConstantMedium. Used with serde when importing SceneFiles.

+

Fields§

§priority: bool

Used for multiple importance sampling

+
§boundary: Box<Object>

The boundary object for the constant medium. This determines the size and shape of the fog object.

+
§density: Float

Density of the fog. TODO: example good value range?

+
§texture: Texture

Texture used for the colorization of the fog.

+

Trait Implementations§

source§

impl Clone for ConstantMediumInit

source§

fn clone(&self) -> ConstantMediumInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ConstantMediumInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ConstantMediumInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ConstantMediumInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/enum.Object.html b/clovers/objects/enum.Object.html new file mode 100644 index 00000000..dcc7af7d --- /dev/null +++ b/clovers/objects/enum.Object.html @@ -0,0 +1,70 @@ +Object in clovers::objects - Rust

Enum clovers::objects::Object

source ·
pub enum Object {
+    Boxy(BoxyInit),
+    ConstantMedium(ConstantMediumInit),
+    MovingSphere(MovingSphereInit),
+    ObjectList(ObjectList),
+    Quad(QuadInit),
+    RotateY(RotateInit),
+    Sphere(SphereInit),
+    STL(STLInit),
+    GLTF(GLTFInit),
+    Translate(TranslateInit),
+    Triangle(TriangleInit),
+}
Expand description

An object enum. TODO: for ideal clean abstraction, this should be a trait. However, that comes with some additional considerations, including e.g. performance.

+

Variants§

§

Boxy(BoxyInit)

Boxy object initializer

+
§

ConstantMedium(ConstantMediumInit)

ConstantMedium object initializer

+
§

MovingSphere(MovingSphereInit)

MovingSphere object initializer

+
§

ObjectList(ObjectList)

ObjectList object initializer

+
§

Quad(QuadInit)

Quad object initializer

+
§

RotateY(RotateInit)

RotateY object initializer

+
§

Sphere(SphereInit)

Sphere object initializer

+
§

STL(STLInit)

STL object initializer

+
§

GLTF(GLTFInit)

GLTF object initializer

+
§

Translate(TranslateInit)

Translate object initializer

+
§

Triangle(TriangleInit)

Triangle object initializer

+

Trait Implementations§

source§

impl Clone for Object

source§

fn clone(&self) -> Object

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Object

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Object

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Object

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/fn.object_to_hitable.html b/clovers/objects/fn.object_to_hitable.html new file mode 100644 index 00000000..367ab7e2 --- /dev/null +++ b/clovers/objects/fn.object_to_hitable.html @@ -0,0 +1,5 @@ +object_to_hitable in clovers::objects - Rust
pub fn object_to_hitable(
+    obj: Object,
+    materials: &[SharedMaterial]
+) -> Hitable<'_>
Expand description

Initializes an Object into a Hitable.

+
\ No newline at end of file diff --git a/clovers/objects/gltf/index.html b/clovers/objects/gltf/index.html new file mode 100644 index 00000000..26ed4766 --- /dev/null +++ b/clovers/objects/gltf/index.html @@ -0,0 +1,2 @@ +clovers::objects::gltf - Rust

Module clovers::objects::gltf

source ·
Expand description

GLTF format support for the renderer

+

Structs

  • Internal GLTF object representation after initialization.
  • GLTF initialization structure
  • Internal GLTF object representation after initialization.
\ No newline at end of file diff --git a/clovers/objects/gltf/sidebar-items.js b/clovers/objects/gltf/sidebar-items.js new file mode 100644 index 00000000..08e5d557 --- /dev/null +++ b/clovers/objects/gltf/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["GLTF","GLTFInit","GLTFTriangle"]}; \ No newline at end of file diff --git a/clovers/objects/gltf/struct.GLTF.html b/clovers/objects/gltf/struct.GLTF.html new file mode 100644 index 00000000..848876eb --- /dev/null +++ b/clovers/objects/gltf/struct.GLTF.html @@ -0,0 +1,52 @@ +GLTF in clovers::objects::gltf - Rust

Struct clovers::objects::gltf::GLTF

source ·
pub struct GLTF<'scene> {
+    pub bvhnode: BVHNode<'scene>,
+    pub aabb: AABB,
+}
Expand description

Internal GLTF object representation after initialization.

+

Fields§

§bvhnode: BVHNode<'scene>

Bounding Volume Hierarchy tree for the object

+
§aabb: AABB

Axis-aligned bounding box of the object

+

Implementations§

source§

impl<'scene> GLTF<'scene>

source

pub fn new(gltf_init: GLTFInit, time_0: Float, time_1: Float) -> Self

Create a new STL object with the given initialization parameters.

+

Trait Implementations§

source§

impl<'scene> Clone for GLTF<'scene>

source§

fn clone(&self) -> GLTF<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for GLTF<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<GLTF<'scene>> for Hitable<'scene>

source§

fn from(v: GLTF<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<GLTF<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<GLTF<'scene>, <Self as TryInto<GLTF<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for GLTF<'scene>

§

impl<'scene> Send for GLTF<'scene>

§

impl<'scene> Sync for GLTF<'scene>

§

impl<'scene> Unpin for GLTF<'scene>

§

impl<'scene> UnwindSafe for GLTF<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/gltf/struct.GLTFInit.html b/clovers/objects/gltf/struct.GLTFInit.html new file mode 100644 index 00000000..08a25ba0 --- /dev/null +++ b/clovers/objects/gltf/struct.GLTFInit.html @@ -0,0 +1,52 @@ +GLTFInit in clovers::objects::gltf - Rust

Struct clovers::objects::gltf::GLTFInit

source ·
pub struct GLTFInit {
+    pub priority: bool,
+    pub path: String,
+}
Expand description

GLTF initialization structure

+

Fields§

§priority: bool

Used for multiple importance sampling

+
§path: String

Path of the .gltf file

+

Trait Implementations§

source§

impl Clone for GLTFInit

source§

fn clone(&self) -> GLTFInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GLTFInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GLTFInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'scene> From<GLTFInit> for Vec<Hitable<'scene>>

source§

fn from(gltf: GLTFInit) -> Self

Converts to this type from the input type.
source§

impl Serialize for GLTFInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/gltf/struct.GLTFTriangle.html b/clovers/objects/gltf/struct.GLTFTriangle.html new file mode 100644 index 00000000..6ea18806 --- /dev/null +++ b/clovers/objects/gltf/struct.GLTFTriangle.html @@ -0,0 +1,53 @@ +GLTFTriangle in clovers::objects::gltf - Rust
pub struct GLTFTriangle<'scene> {
+    pub aabb: AABB,
+    pub material: &'scene GLTFMaterial<'scene>,
+    /* private fields */
+}
Expand description

Internal GLTF object representation after initialization.

+

Fields§

§aabb: AABB

Axis-aligned bounding box of the object

+
§material: &'scene GLTFMaterial<'scene>

Material of the object

+

Implementations§

source§

impl<'scene> GLTFTriangle<'scene>

source

pub fn new(triangle: [Vec3; 3], material: &'scene GLTFMaterial<'scene>) -> Self

Initialize a new GLTF object

+

Trait Implementations§

source§

impl<'scene> Clone for GLTFTriangle<'scene>

source§

fn clone(&self) -> GLTFTriangle<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for GLTFTriangle<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<GLTFTriangle<'scene>> for Hitable<'scene>

source§

fn from(v: GLTFTriangle<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<GLTFTriangle<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<GLTFTriangle<'scene>, <Self as TryInto<GLTFTriangle<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for GLTFTriangle<'scene>

§

impl<'scene> Send for GLTFTriangle<'scene>

§

impl<'scene> Sync for GLTFTriangle<'scene>

§

impl<'scene> Unpin for GLTFTriangle<'scene>

§

impl<'scene> UnwindSafe for GLTFTriangle<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/index.html b/clovers/objects/index.html new file mode 100644 index 00000000..b4ea9f80 --- /dev/null +++ b/clovers/objects/index.html @@ -0,0 +1,2 @@ +clovers::objects - Rust

Module clovers::objects

source ·
Expand description

Various literal objects and meta-object utilities for creating content in Scenes.

+

Re-exports

Modules

  • A box or a cuboid object: a parallelepiped with six rectangular faces. Named Boxy to avoid clashing with Box.
  • ConstantMedium object. This should probably be a Material at some point, but this will do for now. This is essentially a fog with a known size, shape and density.
  • GLTF format support for the renderer
  • A moving sphere object.
  • A quadrilateral object.
  • Utility object for rotating another object.
  • A sphere object.
  • STL utilities
  • Utility object for translating i.e. moving another object.
  • A triangle object. Almost exact copy of Quad, with an adjusted hit_ab method.

Structs

  • A list of objects. Allows multiple objects to be used e.g. in a Rotate or Translate object as the target.

Enums

  • An object enum. TODO: for ideal clean abstraction, this should be a trait. However, that comes with some additional considerations, including e.g. performance.

Functions

\ No newline at end of file diff --git a/clovers/objects/moving_sphere/index.html b/clovers/objects/moving_sphere/index.html new file mode 100644 index 00000000..2861754d --- /dev/null +++ b/clovers/objects/moving_sphere/index.html @@ -0,0 +1,2 @@ +clovers::objects::moving_sphere - Rust
Expand description

A moving sphere object.

+

Structs

  • A moving sphere object. This is represented by one radius, two center points center_0 center_1, two times time_0 time_1, and a Material. Any Rays hitting the object will also have an internal time value, which will be used for determining the interpolated position of the sphere at that time. With lots of rays hitting every pixel but at randomized times, we get temporal multiplexing and an approximation of perceived motion blur.
  • SphereInit structure describes the necessary data for constructing a Sphere. Used with serde when importing SceneFiles.
\ No newline at end of file diff --git a/clovers/objects/moving_sphere/sidebar-items.js b/clovers/objects/moving_sphere/sidebar-items.js new file mode 100644 index 00000000..de0419f8 --- /dev/null +++ b/clovers/objects/moving_sphere/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["MovingSphere","MovingSphereInit"]}; \ No newline at end of file diff --git a/clovers/objects/moving_sphere/struct.MovingSphere.html b/clovers/objects/moving_sphere/struct.MovingSphere.html new file mode 100644 index 00000000..1ac7397f --- /dev/null +++ b/clovers/objects/moving_sphere/struct.MovingSphere.html @@ -0,0 +1,71 @@ +MovingSphere in clovers::objects::moving_sphere - Rust
pub struct MovingSphere<'scene> {
+    pub center_0: Vec3,
+    pub center_1: Vec3,
+    pub time_0: Float,
+    pub time_1: Float,
+    pub radius: Float,
+    pub material: &'scene Material,
+    pub aabb: AABB,
+}
Expand description

A moving sphere object. This is represented by one radius, two center points center_0 center_1, two times time_0 time_1, and a Material. Any Rays hitting the object will also have an internal time value, which will be used for determining the interpolated position of the sphere at that time. With lots of rays hitting every pixel but at randomized times, we get temporal multiplexing and an approximation of perceived motion blur.

+

Fields§

§center_0: Vec3

Center point of the sphere at time_0

+
§center_1: Vec3

Center point of the sphere at time_1

+
§time_0: Float

Time 0

+
§time_1: Float

Time 1

+
§radius: Float

Radius of the sphere

+
§material: &'scene Material

Material of the sphere

+
§aabb: AABB

Axis-aligned bounding box

+

Implementations§

source§

impl<'scene> MovingSphere<'scene>

source

pub fn new( + center_0: Vec3, + center_1: Vec3, + time_0: Float, + time_1: Float, + radius: Float, + material: &'scene Material +) -> Self

Creates a new MovingSphere object. See the struct documentation for more information: MovingSphere.

+
source

pub fn center(&self, time: Float) -> Vec3

Returns the interpolated center of the moving sphere at the given time.

+
source

pub fn get_uv(&self, hit_position: Vec3, time: Float) -> (Float, Float)

Returns the U,V surface coordinates of a hitpoint

+

Trait Implementations§

source§

impl<'scene> Clone for MovingSphere<'scene>

source§

fn clone(&self) -> MovingSphere<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for MovingSphere<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<MovingSphere<'scene>> for Hitable<'scene>

source§

fn from(v: MovingSphere<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<MovingSphere<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<MovingSphere<'scene>, <Self as TryInto<MovingSphere<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for MovingSphere<'scene>

§

impl<'scene> Send for MovingSphere<'scene>

§

impl<'scene> Sync for MovingSphere<'scene>

§

impl<'scene> Unpin for MovingSphere<'scene>

§

impl<'scene> UnwindSafe for MovingSphere<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/moving_sphere/struct.MovingSphereInit.html b/clovers/objects/moving_sphere/struct.MovingSphereInit.html new file mode 100644 index 00000000..b1bb9241 --- /dev/null +++ b/clovers/objects/moving_sphere/struct.MovingSphereInit.html @@ -0,0 +1,58 @@ +MovingSphereInit in clovers::objects::moving_sphere - Rust
pub struct MovingSphereInit {
+    pub priority: bool,
+    pub center_0: Vec3,
+    pub center_1: Vec3,
+    pub radius: Float,
+    pub material: MaterialInit,
+}
Expand description

SphereInit structure describes the necessary data for constructing a Sphere. Used with serde when importing SceneFiles.

+

Fields§

§priority: bool

Used for multiple importance sampling

+
§center_0: Vec3

Center point of the sphere at time_0

+
§center_1: Vec3

Center point of the sphere at time_1

+
§radius: Float

Radius of the sphere.

+
§material: MaterialInit

Material of the sphere.

+

Trait Implementations§

source§

impl Clone for MovingSphereInit

source§

fn clone(&self) -> MovingSphereInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MovingSphereInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for MovingSphereInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for MovingSphereInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/quad/index.html b/clovers/objects/quad/index.html new file mode 100644 index 00000000..39f8c8bd --- /dev/null +++ b/clovers/objects/quad/index.html @@ -0,0 +1,2 @@ +clovers::objects::quad - Rust

Module clovers::objects::quad

source ·
Expand description

A quadrilateral object.

+

Structs

  • Quadrilateral shape. This can be an arbitrary parallelogram, not just a rectangle.
  • Initialization structure for a Quad object.
\ No newline at end of file diff --git a/clovers/objects/quad/sidebar-items.js b/clovers/objects/quad/sidebar-items.js new file mode 100644 index 00000000..d0a86998 --- /dev/null +++ b/clovers/objects/quad/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Quad","QuadInit"]}; \ No newline at end of file diff --git a/clovers/objects/quad/struct.Quad.html b/clovers/objects/quad/struct.Quad.html new file mode 100644 index 00000000..686d401c --- /dev/null +++ b/clovers/objects/quad/struct.Quad.html @@ -0,0 +1,71 @@ +Quad in clovers::objects::quad - Rust

Struct clovers::objects::quad::Quad

source ·
pub struct Quad<'scene> {
+    pub q: Vec3,
+    pub u: Vec3,
+    pub v: Vec3,
+    pub material: &'scene Material,
+    pub area: Float,
+    pub normal: Vec3,
+    pub d: Float,
+    pub w: Vec3,
+    pub aabb: AABB,
+}
Expand description

Quadrilateral shape. This can be an arbitrary parallelogram, not just a rectangle.

+

Fields§

§q: Vec3

Corner point

+
§u: Vec3

Vector describing the u side

+
§v: Vec3

Vector describing the v side

+
§material: &'scene Material

Material of the surface

+
§area: Float

Area of the surface

+
§normal: Vec3

Normal vector of the surface

+
§d: Float

What is this? // TODO: understand, explain

+
§w: Vec3

What is this? // TODO: understand, explain

+
§aabb: AABB

Bounding box of the surface

+

Implementations§

source§

impl<'scene> Quad<'scene>

source

pub fn new( + q: Vec3, + u: Vec3, + v: Vec3, + material: &'scene Material +) -> Quad<'scene>

Creates a new quad

+

Trait Implementations§

source§

impl<'scene> Clone for Quad<'scene>

source§

fn clone(&self) -> Quad<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for Quad<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<Quad<'scene>> for Hitable<'scene>

source§

fn from(v: Quad<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<Quad<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<Quad<'scene>, <Self as TryInto<Quad<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for Quad<'scene>

§

impl<'scene> Send for Quad<'scene>

§

impl<'scene> Sync for Quad<'scene>

§

impl<'scene> Unpin for Quad<'scene>

§

impl<'scene> UnwindSafe for Quad<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/quad/struct.QuadInit.html b/clovers/objects/quad/struct.QuadInit.html new file mode 100644 index 00000000..ed1496de --- /dev/null +++ b/clovers/objects/quad/struct.QuadInit.html @@ -0,0 +1,58 @@ +QuadInit in clovers::objects::quad - Rust

Struct clovers::objects::quad::QuadInit

source ·
pub struct QuadInit {
+    pub priority: bool,
+    pub q: Vec3,
+    pub u: Vec3,
+    pub v: Vec3,
+    pub material: MaterialInit,
+}
Expand description

Initialization structure for a Quad object.

+

Fields§

§priority: bool

Used for multiple importance sampling

+
§q: Vec3

Corner point

+
§u: Vec3

Vector describing the u side

+
§v: Vec3

Vector describing the v side

+
§material: MaterialInit

Material of the surface

+

Trait Implementations§

source§

impl Clone for QuadInit

source§

fn clone(&self) -> QuadInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for QuadInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for QuadInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for QuadInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/rotate/index.html b/clovers/objects/rotate/index.html new file mode 100644 index 00000000..9e83c4ad --- /dev/null +++ b/clovers/objects/rotate/index.html @@ -0,0 +1,2 @@ +clovers::objects::rotate - Rust

Module clovers::objects::rotate

source ·
Expand description

Utility object for rotating another object.

+

Structs

  • RotateInit structure describes the necessary data for constructing a RotateY. Used with serde when importing SceneFiles.
  • RotateY object. It wraps the given Object and has adjusted hit() and bounding_box() methods based on the angle given.
\ No newline at end of file diff --git a/clovers/objects/rotate/sidebar-items.js b/clovers/objects/rotate/sidebar-items.js new file mode 100644 index 00000000..13497928 --- /dev/null +++ b/clovers/objects/rotate/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["RotateInit","RotateY"]}; \ No newline at end of file diff --git a/clovers/objects/rotate/struct.RotateInit.html b/clovers/objects/rotate/struct.RotateInit.html new file mode 100644 index 00000000..d714e6b9 --- /dev/null +++ b/clovers/objects/rotate/struct.RotateInit.html @@ -0,0 +1,54 @@ +RotateInit in clovers::objects::rotate - Rust
pub struct RotateInit {
+    pub priority: bool,
+    pub object: Box<Object>,
+    pub angle: Float,
+}
Expand description

RotateInit structure describes the necessary data for constructing a RotateY. Used with serde when importing SceneFiles.

+

Fields§

§priority: bool

Used for multiple importance sampling

+
§object: Box<Object>

The encased Object to rotate

+
§angle: Float

Angle to rotate the object, in degrees

+

Trait Implementations§

source§

impl Clone for RotateInit

source§

fn clone(&self) -> RotateInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RotateInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RotateInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for RotateInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/rotate/struct.RotateY.html b/clovers/objects/rotate/struct.RotateY.html new file mode 100644 index 00000000..374cfa1e --- /dev/null +++ b/clovers/objects/rotate/struct.RotateY.html @@ -0,0 +1,47 @@ +RotateY in clovers::objects::rotate - Rust

Struct clovers::objects::rotate::RotateY

source ·
pub struct RotateY<'scene> { /* private fields */ }
Expand description

RotateY object. It wraps the given Object and has adjusted hit() and bounding_box() methods based on the angle given.

+

Implementations§

source§

impl<'scene> RotateY<'scene>

source

pub fn new(object: Box<Hitable<'scene>>, angle: Float) -> Self

Creates a new RotateY object. It wraps the given Object and has adjusted hit() and bounding_box() methods based on the angle given.

+

Trait Implementations§

source§

impl<'scene> Clone for RotateY<'scene>

source§

fn clone(&self) -> RotateY<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for RotateY<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<RotateY<'scene>> for Hitable<'scene>

source§

fn from(v: RotateY<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<RotateY<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<RotateY<'scene>, <Self as TryInto<RotateY<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for RotateY<'scene>

§

impl<'scene> Send for RotateY<'scene>

§

impl<'scene> Sync for RotateY<'scene>

§

impl<'scene> Unpin for RotateY<'scene>

§

impl<'scene> UnwindSafe for RotateY<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/sidebar-items.js b/clovers/objects/sidebar-items.js new file mode 100644 index 00000000..4fd4fe7a --- /dev/null +++ b/clovers/objects/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Object"],"fn":["object_to_hitable"],"mod":["boxy","constant_medium","gltf","moving_sphere","quad","rotate","sphere","stl","translate","triangle"],"struct":["ObjectList"]}; \ No newline at end of file diff --git a/clovers/objects/sphere/index.html b/clovers/objects/sphere/index.html new file mode 100644 index 00000000..a8e3aa2e --- /dev/null +++ b/clovers/objects/sphere/index.html @@ -0,0 +1,2 @@ +clovers::objects::sphere - Rust

Module clovers::objects::sphere

source ·
Expand description

A sphere object.

+

Structs

\ No newline at end of file diff --git a/clovers/objects/sphere/sidebar-items.js b/clovers/objects/sphere/sidebar-items.js new file mode 100644 index 00000000..6a39fdf5 --- /dev/null +++ b/clovers/objects/sphere/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Sphere","SphereInit"]}; \ No newline at end of file diff --git a/clovers/objects/sphere/struct.Sphere.html b/clovers/objects/sphere/struct.Sphere.html new file mode 100644 index 00000000..79625ef1 --- /dev/null +++ b/clovers/objects/sphere/struct.Sphere.html @@ -0,0 +1,48 @@ +Sphere in clovers::objects::sphere - Rust

Struct clovers::objects::sphere::Sphere

source ·
pub struct Sphere<'scene> { /* private fields */ }
Expand description

A sphere object.

+

Implementations§

source§

impl<'scene> Sphere<'scene>

source

pub fn new(center: Vec3, radius: Float, material: &'scene Material) -> Self

Creates a new Sphere object with the given center, radius and material.

+
source

pub fn get_uv(&self, hit_position: Vec3, _time: Float) -> (Float, Float)

Returns the U,V surface coordinates of a hitpoint

+

Trait Implementations§

source§

impl<'scene> Clone for Sphere<'scene>

source§

fn clone(&self) -> Sphere<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for Sphere<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<Sphere<'scene>> for Hitable<'scene>

source§

fn from(v: Sphere<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<Sphere<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<Sphere<'scene>, <Self as TryInto<Sphere<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for Sphere<'scene>

§

impl<'scene> Send for Sphere<'scene>

§

impl<'scene> Sync for Sphere<'scene>

§

impl<'scene> Unpin for Sphere<'scene>

§

impl<'scene> UnwindSafe for Sphere<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/sphere/struct.SphereInit.html b/clovers/objects/sphere/struct.SphereInit.html new file mode 100644 index 00000000..e44033a5 --- /dev/null +++ b/clovers/objects/sphere/struct.SphereInit.html @@ -0,0 +1,56 @@ +SphereInit in clovers::objects::sphere - Rust
pub struct SphereInit {
+    pub priority: bool,
+    pub center: Vec3,
+    pub radius: Float,
+    pub material: MaterialInit,
+}
Expand description

SphereInit structure describes the necessary data for constructing a Sphere. Used with serde when importing SceneFiles.

+

Fields§

§priority: bool

Used for multiple importance sampling

+
§center: Vec3

Center of the sphere.

+
§radius: Float

Radius of the sphere.

+
§material: MaterialInit

Material of the sphere.

+

Trait Implementations§

source§

impl Clone for SphereInit

source§

fn clone(&self) -> SphereInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SphereInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SphereInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for SphereInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/stl/fn.initialize_stl.html b/clovers/objects/stl/fn.initialize_stl.html new file mode 100644 index 00000000..a4f8d411 --- /dev/null +++ b/clovers/objects/stl/fn.initialize_stl.html @@ -0,0 +1,5 @@ +initialize_stl in clovers::objects::stl - Rust
pub fn initialize_stl<'scene>(
+    stl_init: STLInit,
+    materials: &'scene [SharedMaterial]
+) -> STL<'scene>
Expand description

Initializes an STL

+
\ No newline at end of file diff --git a/clovers/objects/stl/index.html b/clovers/objects/stl/index.html new file mode 100644 index 00000000..c2996f84 --- /dev/null +++ b/clovers/objects/stl/index.html @@ -0,0 +1,2 @@ +clovers::objects::stl - Rust

Module clovers::objects::stl

source ·
Expand description

STL utilities

+

Structs

  • Internal STL object representation after initialization. Contains the material for all triangles in it to avoid having n copies.
  • STL structure. This gets converted into an internal representation using Triangles

Functions

\ No newline at end of file diff --git a/clovers/objects/stl/sidebar-items.js b/clovers/objects/stl/sidebar-items.js new file mode 100644 index 00000000..c789f5f0 --- /dev/null +++ b/clovers/objects/stl/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["initialize_stl"],"struct":["STL","STLInit"]}; \ No newline at end of file diff --git a/clovers/objects/stl/struct.STL.html b/clovers/objects/stl/struct.STL.html new file mode 100644 index 00000000..3175de10 --- /dev/null +++ b/clovers/objects/stl/struct.STL.html @@ -0,0 +1,51 @@ +STL in clovers::objects::stl - Rust

Struct clovers::objects::stl::STL

source ·
pub struct STL<'scene> {
+    pub bvhnode: BVHNode<'scene>,
+    pub material: &'scene Material,
+    pub aabb: AABB,
+}
Expand description

Internal STL object representation after initialization. Contains the material for all triangles in it to avoid having n copies.

+

Fields§

§bvhnode: BVHNode<'scene>

Bounding Volume Hierarchy tree for the object

+
§material: &'scene Material

Material for the object

+
§aabb: AABB

Axis-aligned bounding box of the object

+

Trait Implementations§

source§

impl<'scene> Clone for STL<'scene>

source§

fn clone(&self) -> STL<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for STL<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<STL<'scene>> for Hitable<'scene>

source§

fn from(v: STL<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<STL<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into(self) -> Result<STL<'scene>, <Self as TryInto<STL<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for STL<'scene>

§

impl<'scene> Send for STL<'scene>

§

impl<'scene> Sync for STL<'scene>

§

impl<'scene> Unpin for STL<'scene>

§

impl<'scene> UnwindSafe for STL<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/stl/struct.STLInit.html b/clovers/objects/stl/struct.STLInit.html new file mode 100644 index 00000000..7486903c --- /dev/null +++ b/clovers/objects/stl/struct.STLInit.html @@ -0,0 +1,60 @@ +STLInit in clovers::objects::stl - Rust

Struct clovers::objects::stl::STLInit

source ·
pub struct STLInit {
+    pub priority: bool,
+    pub path: String,
+    pub material: MaterialInit,
+    pub scale: Float,
+    pub center: Vec3,
+    pub rotation: Vec3,
+}
Expand description

STL structure. This gets converted into an internal representation using Triangles

+

Fields§

§priority: bool

Used for multiple importance sampling

+
§path: String

Path of the .stl file

+
§material: MaterialInit

Material to use for the .stl object

+
§scale: Float

Scaling factor for the object

+
§center: Vec3

Location of the object in the rendered scene

+
§rotation: Vec3

Rotation of the object. Described as three angles, roll, pitch, yaw, applied in that order.

+

Trait Implementations§

source§

impl Clone for STLInit

source§

fn clone(&self) -> STLInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for STLInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for STLInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for STLInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/struct.ObjectList.html b/clovers/objects/struct.ObjectList.html new file mode 100644 index 00000000..cd28afe3 --- /dev/null +++ b/clovers/objects/struct.ObjectList.html @@ -0,0 +1,52 @@ +ObjectList in clovers::objects - Rust

Struct clovers::objects::ObjectList

source ·
pub struct ObjectList {
+    pub priority: bool,
+    pub objects: Vec<Object>,
+}
Expand description

A list of objects. Allows multiple objects to be used e.g. in a Rotate or Translate object as the target.

+

Fields§

§priority: bool

Priority

+
§objects: Vec<Object>

The encased Object list

+

Trait Implementations§

source§

impl Clone for ObjectList

source§

fn clone(&self) -> ObjectList

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ObjectList

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ObjectList

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ObjectList

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/translate/index.html b/clovers/objects/translate/index.html new file mode 100644 index 00000000..454d23bc --- /dev/null +++ b/clovers/objects/translate/index.html @@ -0,0 +1,2 @@ +clovers::objects::translate - Rust

Module clovers::objects::translate

source ·
Expand description

Utility object for translating i.e. moving another object.

+

Structs

  • Translate object. It wraps the given Object and has adjusted hit() and bounding_box() methods based on the offset given.
  • TranslateInit structure describes the necessary data for constructing a Translate object. Used with serde when importing SceneFiles.
\ No newline at end of file diff --git a/clovers/objects/translate/sidebar-items.js b/clovers/objects/translate/sidebar-items.js new file mode 100644 index 00000000..95b97d6f --- /dev/null +++ b/clovers/objects/translate/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Translate","TranslateInit"]}; \ No newline at end of file diff --git a/clovers/objects/translate/struct.Translate.html b/clovers/objects/translate/struct.Translate.html new file mode 100644 index 00000000..169c919d --- /dev/null +++ b/clovers/objects/translate/struct.Translate.html @@ -0,0 +1,47 @@ +Translate in clovers::objects::translate - Rust
pub struct Translate<'scene> { /* private fields */ }
Expand description

Translate object. It wraps the given Object and has adjusted hit() and bounding_box() methods based on the offset given.

+

Implementations§

source§

impl<'scene> Translate<'scene>

source

pub fn new(object: Box<Hitable<'scene>>, offset: Vec3) -> Self

Creates a new Translate object. It wraps the given Object and has adjusted hit() and bounding_box() methods based on the offset given.

+

Trait Implementations§

source§

impl<'scene> Clone for Translate<'scene>

source§

fn clone(&self) -> Translate<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for Translate<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<Translate<'scene>> for Hitable<'scene>

source§

fn from(v: Translate<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<Translate<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<Translate<'scene>, <Self as TryInto<Translate<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for Translate<'scene>

§

impl<'scene> Send for Translate<'scene>

§

impl<'scene> Sync for Translate<'scene>

§

impl<'scene> Unpin for Translate<'scene>

§

impl<'scene> UnwindSafe for Translate<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/translate/struct.TranslateInit.html b/clovers/objects/translate/struct.TranslateInit.html new file mode 100644 index 00000000..03e3e23d --- /dev/null +++ b/clovers/objects/translate/struct.TranslateInit.html @@ -0,0 +1,54 @@ +TranslateInit in clovers::objects::translate - Rust
pub struct TranslateInit {
+    pub priority: bool,
+    pub object: Box<Object>,
+    pub offset: Vec3,
+}
Expand description

TranslateInit structure describes the necessary data for constructing a Translate object. Used with serde when importing SceneFiles.

+

Fields§

§priority: bool

Used for multiple importance sampling

+
§object: Box<Object>

The encased Object to translate i.e. move

+
§offset: Vec3

The vector describing the movement of the object

+

Trait Implementations§

source§

impl Clone for TranslateInit

source§

fn clone(&self) -> TranslateInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TranslateInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TranslateInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for TranslateInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/objects/triangle/index.html b/clovers/objects/triangle/index.html new file mode 100644 index 00000000..237e8aef --- /dev/null +++ b/clovers/objects/triangle/index.html @@ -0,0 +1,2 @@ +clovers::objects::triangle - Rust

Module clovers::objects::triangle

source ·
Expand description

A triangle object. Almost exact copy of Quad, with an adjusted hit_ab method.

+

Structs

  • Triangle shape. Heavily based on Quad and may contain inaccuracies
  • Initialization structure for a triangle primitive
\ No newline at end of file diff --git a/clovers/objects/triangle/sidebar-items.js b/clovers/objects/triangle/sidebar-items.js new file mode 100644 index 00000000..b73274ae --- /dev/null +++ b/clovers/objects/triangle/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Triangle","TriangleInit"]}; \ No newline at end of file diff --git a/clovers/objects/triangle/struct.Triangle.html b/clovers/objects/triangle/struct.Triangle.html new file mode 100644 index 00000000..f601b958 --- /dev/null +++ b/clovers/objects/triangle/struct.Triangle.html @@ -0,0 +1,77 @@ +Triangle in clovers::objects::triangle - Rust
pub struct Triangle<'scene> {
+    pub q: Vec3,
+    pub u: Vec3,
+    pub v: Vec3,
+    pub material: &'scene Material,
+    pub area: Float,
+    pub normal: Vec3,
+    pub d: Float,
+    pub w: Vec3,
+    pub aabb: AABB,
+}
Expand description

Triangle shape. Heavily based on Quad and may contain inaccuracies

+

Fields§

§q: Vec3

Corner point

+
§u: Vec3

Vector describing the u side

+
§v: Vec3

Vector describing the v side

+
§material: &'scene Material

Material of the surface

+
§area: Float

Area of the surface

+
§normal: Vec3

Normal vector of the surface

+
§d: Float

What is this? // TODO: understand, explain

+
§w: Vec3

What is this? // TODO: understand, explain

+
§aabb: AABB

Bounding box of the surface

+

Implementations§

source§

impl<'scene> Triangle<'scene>

source

pub fn new( + q: Vec3, + u: Vec3, + v: Vec3, + material: &'scene Material +) -> Triangle<'scene>

Creates a new triangle from a coordinate point and two side vectors relative to the point

+
source

pub fn from_coordinates( + a: Vec3, + b: Vec3, + c: Vec3, + material: &'scene Material +) -> Triangle<'scene>

Creates a new triangle from three Cartesian space coordinates

+

Trait Implementations§

source§

impl<'scene> Clone for Triangle<'scene>

source§

fn clone(&self) -> Triangle<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for Triangle<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<Triangle<'scene>> for Hitable<'scene>

source§

fn from(v: Triangle<'scene>) -> Hitable<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<Triangle<'scene>> for Hitable<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<Triangle<'scene>, <Self as TryInto<Triangle<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for Triangle<'scene>

§

impl<'scene> Send for Triangle<'scene>

§

impl<'scene> Sync for Triangle<'scene>

§

impl<'scene> Unpin for Triangle<'scene>

§

impl<'scene> UnwindSafe for Triangle<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/objects/triangle/struct.TriangleInit.html b/clovers/objects/triangle/struct.TriangleInit.html new file mode 100644 index 00000000..e04c120d --- /dev/null +++ b/clovers/objects/triangle/struct.TriangleInit.html @@ -0,0 +1,58 @@ +TriangleInit in clovers::objects::triangle - Rust
pub struct TriangleInit {
+    pub priority: bool,
+    pub q: Vec3,
+    pub u: Vec3,
+    pub v: Vec3,
+    pub material: MaterialInit,
+}
Expand description

Initialization structure for a triangle primitive

+

Fields§

§priority: bool

Used for multiple importance sampling

+
§q: Vec3

Corner point

+
§u: Vec3

Vector describing the u side

+
§v: Vec3

Vector describing the v side

+
§material: MaterialInit

Material of the surface

+

Trait Implementations§

source§

impl Clone for TriangleInit

source§

fn clone(&self) -> TriangleInit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TriangleInit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TriangleInit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for TriangleInit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/onb/index.html b/clovers/onb/index.html new file mode 100644 index 00000000..5b260934 --- /dev/null +++ b/clovers/onb/index.html @@ -0,0 +1,2 @@ +clovers::onb - Rust

Module clovers::onb

source ·
Expand description

Orthonormal bases

+

Structs

  • An orthonormal basis structure.
\ No newline at end of file diff --git a/clovers/onb/sidebar-items.js b/clovers/onb/sidebar-items.js new file mode 100644 index 00000000..9aa06216 --- /dev/null +++ b/clovers/onb/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ONB"]}; \ No newline at end of file diff --git a/clovers/onb/struct.ONB.html b/clovers/onb/struct.ONB.html new file mode 100644 index 00000000..896c0d2e --- /dev/null +++ b/clovers/onb/struct.ONB.html @@ -0,0 +1,53 @@ +ONB in clovers::onb - Rust

Struct clovers::onb::ONB

source ·
pub struct ONB {
+    pub u: Vec3,
+    pub v: Vec3,
+    pub w: Vec3,
+}
Expand description

An orthonormal basis structure.

+

Fields§

§u: Vec3

U

+
§v: Vec3

V

+
§w: Vec3

W

+

Implementations§

source§

impl ONB

source

pub fn build_from_w(normal: Vec3) -> ONB

Builds a new ONB structure given a normal vector.

+
source

pub fn local(&self, vec: Vec3) -> Vec3

Returns the ONB-projected version of the provided vector?

+

Trait Implementations§

source§

impl Clone for ONB

source§

fn clone(&self) -> ONB

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ONB

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for ONB

§

impl Send for ONB

§

impl Sync for ONB

§

impl Unpin for ONB

§

impl UnwindSafe for ONB

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/pdf/enum.PDF.html b/clovers/pdf/enum.PDF.html new file mode 100644 index 00000000..802641a2 --- /dev/null +++ b/clovers/pdf/enum.PDF.html @@ -0,0 +1,53 @@ +PDF in clovers::pdf - Rust

Enum clovers::pdf::PDF

source ·
pub enum PDF<'scene> {
+    CosinePDF(CosinePDF),
+    SpherePDF(SpherePDF),
+    HitablePDF(HitablePDF<'scene>),
+    MixturePDF(MixturePDF<'scene>),
+    ZeroPDF(ZeroPDF),
+}

Variants§

§

CosinePDF(CosinePDF)

§

SpherePDF(SpherePDF)

§

HitablePDF(HitablePDF<'scene>)

§

MixturePDF(MixturePDF<'scene>)

§

ZeroPDF(ZeroPDF)

Trait Implementations§

source§

impl<'scene> Clone for PDF<'scene>

source§

fn clone(&self) -> PDF<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for PDF<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<CosinePDF> for PDF<'scene>

source§

fn from(v: CosinePDF) -> PDF<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<HitablePDF<'scene>> for PDF<'scene>

source§

fn from(v: HitablePDF<'scene>) -> PDF<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<MixturePDF<'scene>> for PDF<'scene>

source§

fn from(v: MixturePDF<'scene>) -> PDF<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<SpherePDF> for PDF<'scene>

source§

fn from(v: SpherePDF) -> PDF<'scene>

Converts to this type from the input type.
source§

impl<'scene> From<ZeroPDF> for PDF<'scene>

source§

fn from(v: ZeroPDF) -> PDF<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<CosinePDF> for PDF<'scene>

§

type Error = &'static str

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

fn try_into(self) -> Result<CosinePDF, <Self as TryInto<CosinePDF>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<HitablePDF<'scene>> for PDF<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<HitablePDF<'scene>, <Self as TryInto<HitablePDF<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<MixturePDF<'scene>> for PDF<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<MixturePDF<'scene>, <Self as TryInto<MixturePDF<'scene>>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<SpherePDF> for PDF<'scene>

§

type Error = &'static str

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

fn try_into(self) -> Result<SpherePDF, <Self as TryInto<SpherePDF>>::Error>

Performs the conversion.
source§

impl<'scene> TryInto<ZeroPDF> for PDF<'scene>

§

type Error = &'static str

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

fn try_into(self) -> Result<ZeroPDF, <Self as TryInto<ZeroPDF>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for PDF<'scene>

§

impl<'scene> Send for PDF<'scene>

§

impl<'scene> Sync for PDF<'scene>

§

impl<'scene> Unpin for PDF<'scene>

§

impl<'scene> UnwindSafe for PDF<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/pdf/index.html b/clovers/pdf/index.html new file mode 100644 index 00000000..2b34de64 --- /dev/null +++ b/clovers/pdf/index.html @@ -0,0 +1,2 @@ +clovers::pdf - Rust

Module clovers::pdf

source ·
Expand description

Probability density functions

+

Structs

Enums

\ No newline at end of file diff --git a/clovers/pdf/sidebar-items.js b/clovers/pdf/sidebar-items.js new file mode 100644 index 00000000..0766fd7c --- /dev/null +++ b/clovers/pdf/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["PDF"],"struct":["CosinePDF","HitablePDF","MixturePDF","SpherePDF","ZeroPDF"]}; \ No newline at end of file diff --git a/clovers/pdf/struct.CosinePDF.html b/clovers/pdf/struct.CosinePDF.html new file mode 100644 index 00000000..8cd8a714 --- /dev/null +++ b/clovers/pdf/struct.CosinePDF.html @@ -0,0 +1,43 @@ +CosinePDF in clovers::pdf - Rust

Struct clovers::pdf::CosinePDF

source ·
pub struct CosinePDF { /* private fields */ }

Implementations§

source§

impl CosinePDF

source

pub fn new(w: Vec3) -> Self

Trait Implementations§

source§

impl Clone for CosinePDF

source§

fn clone(&self) -> CosinePDF

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CosinePDF

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<CosinePDF> for PDF<'scene>

source§

fn from(v: CosinePDF) -> PDF<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<CosinePDF> for PDF<'scene>

§

type Error = &'static str

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

fn try_into(self) -> Result<CosinePDF, <Self as TryInto<CosinePDF>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/pdf/struct.HitablePDF.html b/clovers/pdf/struct.HitablePDF.html new file mode 100644 index 00000000..6762e495 --- /dev/null +++ b/clovers/pdf/struct.HitablePDF.html @@ -0,0 +1,45 @@ +HitablePDF in clovers::pdf - Rust

Struct clovers::pdf::HitablePDF

source ·
pub struct HitablePDF<'scene> { /* private fields */ }

Implementations§

source§

impl<'scene> HitablePDF<'scene>

source

pub fn new(hitable: &'scene Hitable<'_>, origin: Vec3) -> Self

Trait Implementations§

source§

impl<'scene> Clone for HitablePDF<'scene>

source§

fn clone(&self) -> HitablePDF<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for HitablePDF<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<HitablePDF<'scene>> for PDF<'scene>

source§

fn from(v: HitablePDF<'scene>) -> PDF<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<HitablePDF<'scene>> for PDF<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<HitablePDF<'scene>, <Self as TryInto<HitablePDF<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for HitablePDF<'scene>

§

impl<'scene> Send for HitablePDF<'scene>

§

impl<'scene> Sync for HitablePDF<'scene>

§

impl<'scene> Unpin for HitablePDF<'scene>

§

impl<'scene> UnwindSafe for HitablePDF<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/pdf/struct.MixturePDF.html b/clovers/pdf/struct.MixturePDF.html new file mode 100644 index 00000000..96a8a2c6 --- /dev/null +++ b/clovers/pdf/struct.MixturePDF.html @@ -0,0 +1,45 @@ +MixturePDF in clovers::pdf - Rust

Struct clovers::pdf::MixturePDF

source ·
pub struct MixturePDF<'scene> { /* private fields */ }

Implementations§

source§

impl<'scene> MixturePDF<'scene>

source

pub fn new(pdf1: PDF<'scene>, pdf2: PDF<'scene>) -> Self

Trait Implementations§

source§

impl<'scene> Clone for MixturePDF<'scene>

source§

fn clone(&self) -> MixturePDF<'scene>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'scene> Debug for MixturePDF<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'scene> From<MixturePDF<'scene>> for PDF<'scene>

source§

fn from(v: MixturePDF<'scene>) -> PDF<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<MixturePDF<'scene>> for PDF<'scene>

§

type Error = &'static str

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

fn try_into( + self +) -> Result<MixturePDF<'scene>, <Self as TryInto<MixturePDF<'scene>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for MixturePDF<'scene>

§

impl<'scene> Send for MixturePDF<'scene>

§

impl<'scene> Sync for MixturePDF<'scene>

§

impl<'scene> Unpin for MixturePDF<'scene>

§

impl<'scene> UnwindSafe for MixturePDF<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/pdf/struct.SpherePDF.html b/clovers/pdf/struct.SpherePDF.html new file mode 100644 index 00000000..c95de709 --- /dev/null +++ b/clovers/pdf/struct.SpherePDF.html @@ -0,0 +1,43 @@ +SpherePDF in clovers::pdf - Rust

Struct clovers::pdf::SpherePDF

source ·
pub struct SpherePDF {}

Implementations§

source§

impl SpherePDF

source

pub fn new() -> Self

Trait Implementations§

source§

impl Clone for SpherePDF

source§

fn clone(&self) -> SpherePDF

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SpherePDF

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SpherePDF

source§

fn default() -> SpherePDF

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

impl<'scene> From<SpherePDF> for PDF<'scene>

source§

fn from(v: SpherePDF) -> PDF<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<SpherePDF> for PDF<'scene>

§

type Error = &'static str

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

fn try_into(self) -> Result<SpherePDF, <Self as TryInto<SpherePDF>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/pdf/struct.ZeroPDF.html b/clovers/pdf/struct.ZeroPDF.html new file mode 100644 index 00000000..276a9b74 --- /dev/null +++ b/clovers/pdf/struct.ZeroPDF.html @@ -0,0 +1,43 @@ +ZeroPDF in clovers::pdf - Rust

Struct clovers::pdf::ZeroPDF

source ·
pub struct ZeroPDF {}

Implementations§

source§

impl ZeroPDF

source

pub fn new() -> Self

Trait Implementations§

source§

impl Clone for ZeroPDF

source§

fn clone(&self) -> ZeroPDF

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ZeroPDF

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ZeroPDF

source§

fn default() -> Self

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

impl<'scene> From<ZeroPDF> for PDF<'scene>

source§

fn from(v: ZeroPDF) -> PDF<'scene>

Converts to this type from the input type.
source§

impl<'scene> TryInto<ZeroPDF> for PDF<'scene>

§

type Error = &'static str

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

fn try_into(self) -> Result<ZeroPDF, <Self as TryInto<ZeroPDF>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/random/fn.random_cosine_direction.html b/clovers/random/fn.random_cosine_direction.html new file mode 100644 index 00000000..86109cfd --- /dev/null +++ b/clovers/random/fn.random_cosine_direction.html @@ -0,0 +1,2 @@ +random_cosine_direction in clovers::random - Rust
pub fn random_cosine_direction(rng: &mut SmallRng) -> Vec3
Expand description

Internal helper.

+
\ No newline at end of file diff --git a/clovers/random/fn.random_in_unit_disk.html b/clovers/random/fn.random_in_unit_disk.html new file mode 100644 index 00000000..b691b1fc --- /dev/null +++ b/clovers/random/fn.random_in_unit_disk.html @@ -0,0 +1,2 @@ +random_in_unit_disk in clovers::random - Rust
pub fn random_in_unit_disk(rng: &mut SmallRng) -> Vec3
Expand description

Internal helper.

+
\ No newline at end of file diff --git a/clovers/random/fn.random_on_hemisphere.html b/clovers/random/fn.random_on_hemisphere.html new file mode 100644 index 00000000..2aeb27f4 --- /dev/null +++ b/clovers/random/fn.random_on_hemisphere.html @@ -0,0 +1,2 @@ +random_on_hemisphere in clovers::random - Rust
pub fn random_on_hemisphere(normal: Vec3, rng: &mut SmallRng) -> Vec3
Expand description

Internal helper.

+
\ No newline at end of file diff --git a/clovers/random/fn.random_unit_vector.html b/clovers/random/fn.random_unit_vector.html new file mode 100644 index 00000000..79d501fd --- /dev/null +++ b/clovers/random/fn.random_unit_vector.html @@ -0,0 +1,2 @@ +random_unit_vector in clovers::random - Rust
pub fn random_unit_vector(rng: &mut SmallRng) -> Vec3
Expand description

Internal helper.

+
\ No newline at end of file diff --git a/clovers/random/index.html b/clovers/random/index.html new file mode 100644 index 00000000..04ba663e --- /dev/null +++ b/clovers/random/index.html @@ -0,0 +1,2 @@ +clovers::random - Rust

Module clovers::random

source ·
Expand description

Various internal helper functions for getting specific kinds of random values.

+

Functions

\ No newline at end of file diff --git a/clovers/random/sidebar-items.js b/clovers/random/sidebar-items.js new file mode 100644 index 00000000..4199eed4 --- /dev/null +++ b/clovers/random/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["random_cosine_direction","random_in_unit_disk","random_on_hemisphere","random_unit_vector"]}; \ No newline at end of file diff --git a/clovers/ray/index.html b/clovers/ray/index.html new file mode 100644 index 00000000..aced3571 --- /dev/null +++ b/clovers/ray/index.html @@ -0,0 +1,2 @@ +clovers::ray - Rust

Module clovers::ray

source ·
Expand description

The very core of the ray tracing rendering itself: the Ray

+

Structs

  • A Ray has an origin and a direction, as well as an instant in time it exists in. Motion blur is achieved by creating multiple rays with slightly different times.
\ No newline at end of file diff --git a/clovers/ray/sidebar-items.js b/clovers/ray/sidebar-items.js new file mode 100644 index 00000000..ead47fd6 --- /dev/null +++ b/clovers/ray/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Ray"]}; \ No newline at end of file diff --git a/clovers/ray/struct.Ray.html b/clovers/ray/struct.Ray.html new file mode 100644 index 00000000..1f916d40 --- /dev/null +++ b/clovers/ray/struct.Ray.html @@ -0,0 +1,57 @@ +Ray in clovers::ray - Rust

Struct clovers::ray::Ray

source ·
pub struct Ray {
+    pub origin: Vec3,
+    pub direction: Vec3,
+    pub time: Float,
+    pub wavelength: Wavelength,
+}
Expand description

A Ray has an origin and a direction, as well as an instant in time it exists in. Motion blur is achieved by creating multiple rays with slightly different times.

+

Fields§

§origin: Vec3

The origin of the ray.

+
§direction: Vec3

The direction of the ray.

+
§time: Float

The time instant at which the ray exists.

+
§wavelength: Wavelength

Wavelength of the ray

+

Implementations§

source§

impl Ray

source

pub fn evaluate(&self, parameter: Float) -> Vec3

Evaluates the position (coordinate) at which the ray is at the given parameter, considering the origin and direction. Considering a default unit speed of 1 per unit time, this function can be given either a time or a distance.

+

Trait Implementations§

source§

impl Clone for Ray

source§

fn clone(&self) -> Ray

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Ray

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for Ray

source§

fn eq(&self, other: &Ray) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Ray

Auto Trait Implementations§

§

impl RefUnwindSafe for Ray

§

impl Send for Ray

§

impl Sync for Ray

§

impl Unpin for Ray

§

impl UnwindSafe for Ray

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> Scalar for Twhere + T: 'static + Clone + PartialEq + Debug,

\ No newline at end of file diff --git a/clovers/scenes/fn.initialize.html b/clovers/scenes/fn.initialize.html new file mode 100644 index 00000000..993cbb62 --- /dev/null +++ b/clovers/scenes/fn.initialize.html @@ -0,0 +1,6 @@ +initialize in clovers::scenes - Rust

Function clovers::scenes::initialize

source ·
pub fn initialize<'scene>(
+    scene_file: SceneFile,
+    width: u32,
+    height: u32
+) -> Scene<'scene>
Expand description

Initializes a new Scene instance by parsing the contents of a SceneFile structure and then using those details to construct the Scene.

+
\ No newline at end of file diff --git a/clovers/scenes/index.html b/clovers/scenes/index.html new file mode 100644 index 00000000..4c5e12fb --- /dev/null +++ b/clovers/scenes/index.html @@ -0,0 +1,2 @@ +clovers::scenes - Rust

Module clovers::scenes

source ·
Expand description

A collection of objects, camera, and other things necessary to describe the environment you wish to render.

+

Structs

  • A representation of the scene that is being rendered.
  • A serialized representation of a Scene.

Functions

\ No newline at end of file diff --git a/clovers/scenes/sidebar-items.js b/clovers/scenes/sidebar-items.js new file mode 100644 index 00000000..219193e9 --- /dev/null +++ b/clovers/scenes/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["initialize"],"struct":["Scene","SceneFile"]}; \ No newline at end of file diff --git a/clovers/scenes/struct.Scene.html b/clovers/scenes/struct.Scene.html new file mode 100644 index 00000000..fbf5c95c --- /dev/null +++ b/clovers/scenes/struct.Scene.html @@ -0,0 +1,60 @@ +Scene in clovers::scenes - Rust

Struct clovers::scenes::Scene

source ·
pub struct Scene<'scene> {
+    pub hitables: BVHNode<'scene>,
+    pub camera: Camera,
+    pub background_color: Srgb,
+    pub priority_hitables: Hitable<'scene>,
+}
Expand description

A representation of the scene that is being rendered.

+

Fields§

§hitables: BVHNode<'scene>

Bounding-volume hierarchy of Hitable objects in the scene. This could, as currently written, be any Hitable - in practice, we place the root of the BVHNode tree here.

+
§camera: Camera

The camera object used for rendering the scene.

+
§background_color: Srgb

The background color to use when the rays do not hit anything in the scene.

+
§priority_hitables: Hitable<'scene>

A BVHNode tree of prioritized objects - e.g. glass items or lights - that affect the biased sampling of the scene. Wrapped into a Hitable for convenience reasons (see various PDF functions).

+

Implementations§

source§

impl<'scene> Scene<'scene>

source

pub fn new( + time_0: Float, + time_1: Float, + camera: Camera, + hitables: Vec<Hitable<'scene>>, + priority_hitables: Vec<Hitable<'scene>>, + background_color: Srgb +) -> Scene<'scene>

Creates a new Scene with the given parameters.

+

Trait Implementations§

source§

impl<'scene> Debug for Scene<'scene>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'scene> RefUnwindSafe for Scene<'scene>

§

impl<'scene> Send for Scene<'scene>

§

impl<'scene> Sync for Scene<'scene>

§

impl<'scene> Unpin for Scene<'scene>

§

impl<'scene> UnwindSafe for Scene<'scene>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/scenes/struct.SceneFile.html b/clovers/scenes/struct.SceneFile.html new file mode 100644 index 00000000..4de99083 --- /dev/null +++ b/clovers/scenes/struct.SceneFile.html @@ -0,0 +1,47 @@ +SceneFile in clovers::scenes - Rust

Struct clovers::scenes::SceneFile

source ·
pub struct SceneFile { /* private fields */ }
Expand description

A serialized representation of a Scene.

+

Trait Implementations§

source§

impl Clone for SceneFile

source§

fn clone(&self) -> SceneFile

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SceneFile

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SceneFile

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for SceneFile

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/sidebar-items.js b/clovers/sidebar-items.js new file mode 100644 index 00000000..82e69ec9 --- /dev/null +++ b/clovers/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["EPSILON_CONSTANT_MEDIUM","EPSILON_RECT_THICKNESS","EPSILON_SHADOW_ACNE","PI"],"mod":["aabb","bvhnode","camera","colorize","hitable","interval","materials","normals","objects","onb","pdf","random","ray","scenes","spectrum","textures","wavelength"],"struct":["Box","RenderOpts","Vec"],"type":["Float","Vec2","Vec3","Vec4"]}; \ No newline at end of file diff --git a/clovers/spectrum/fn.spectrum_xyz_to_p.html b/clovers/spectrum/fn.spectrum_xyz_to_p.html new file mode 100644 index 00000000..5bd4749e --- /dev/null +++ b/clovers/spectrum/fn.spectrum_xyz_to_p.html @@ -0,0 +1,2 @@ +spectrum_xyz_to_p in clovers::spectrum - Rust
pub fn spectrum_xyz_to_p(lambda: Wavelength, xyz: Xyz<E>) -> Float
Expand description

Evaluate the spectrum at the given wavelength for the given XYZ color

+
\ No newline at end of file diff --git a/clovers/spectrum/index.html b/clovers/spectrum/index.html new file mode 100644 index 00000000..676097f6 --- /dev/null +++ b/clovers/spectrum/index.html @@ -0,0 +1,2 @@ +clovers::spectrum - Rust

Module clovers::spectrum

source ·
Expand description

Modules

Functions

  • Evaluate the spectrum at the given wavelength for the given XYZ color
\ No newline at end of file diff --git a/clovers/spectrum/sidebar-items.js b/clovers/spectrum/sidebar-items.js new file mode 100644 index 00000000..ee346cad --- /dev/null +++ b/clovers/spectrum/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["spectrum_xyz_to_p"],"mod":["spectra_xyz_5nm_380_780_097","spectrum_grid"]}; \ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.cmf_wavelength.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.cmf_wavelength.html new file mode 100644 index 00000000..f37ba67c --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.cmf_wavelength.html @@ -0,0 +1 @@ +cmf_wavelength in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const cmf_wavelength: [f64; 81];
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.equal_energy_reflectance.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.equal_energy_reflectance.html new file mode 100644 index 00000000..507171e8 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.equal_energy_reflectance.html @@ -0,0 +1 @@ +equal_energy_reflectance in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const equal_energy_reflectance: f64 = 0.009358239977091027;
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_bin_size.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_bin_size.html new file mode 100644 index 00000000..43471da2 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_bin_size.html @@ -0,0 +1 @@ +spectrum_bin_size in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_bin_size: f64 = 5.0;
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_data_points.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_data_points.html new file mode 100644 index 00000000..8920e3a1 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_data_points.html @@ -0,0 +1 @@ +spectrum_data_points in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_data_points: [spectrum_data_point_t; 186];
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid.html new file mode 100644 index 00000000..3d9a71a1 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid.html @@ -0,0 +1 @@ +spectrum_grid in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_grid: [spectrum_grid_cell_t; 168];
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_height.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_height.html new file mode 100644 index 00000000..37f58f44 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_height.html @@ -0,0 +1 @@ +spectrum_grid_height in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_grid_height: usize = 14;
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_height_f.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_height_f.html new file mode 100644 index 00000000..b82bbfd9 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_height_f.html @@ -0,0 +1 @@ +spectrum_grid_height_f in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_grid_height_f: f64 = 14.0;
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_width.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_width.html new file mode 100644 index 00000000..244992ec --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_width.html @@ -0,0 +1 @@ +spectrum_grid_width in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_grid_width: usize = 12;
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_width_f.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_width_f.html new file mode 100644 index 00000000..14efc496 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_grid_width_f.html @@ -0,0 +1 @@ +spectrum_grid_width_f in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_grid_width_f: f64 = 12.0;
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_num_samples.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_num_samples.html new file mode 100644 index 00000000..aee2e2bb --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_num_samples.html @@ -0,0 +1 @@ +spectrum_num_samples in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_num_samples: usize = 81;
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_num_samples_f.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_num_samples_f.html new file mode 100644 index 00000000..40235470 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_num_samples_f.html @@ -0,0 +1 @@ +spectrum_num_samples_f in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_num_samples_f: f64 = 81.0;
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_sample_max.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_sample_max.html new file mode 100644 index 00000000..9e9c27e0 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_sample_max.html @@ -0,0 +1 @@ +spectrum_sample_max in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_sample_max: f64 = 780.0;
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_sample_min.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_sample_min.html new file mode 100644 index 00000000..a0dcc35b --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/constant.spectrum_sample_min.html @@ -0,0 +1 @@ +spectrum_sample_min in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub const spectrum_sample_min: f64 = 380.0;
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_apply_3x2.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_apply_3x2.html new file mode 100644 index 00000000..2489b85d --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_apply_3x2.html @@ -0,0 +1 @@ +spectrum_apply_3x2 in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub fn spectrum_apply_3x2(matrix: [f64; 6], src: [f64; 2], tgt: &mut [f64; 2])
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_uv_to_xy.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_uv_to_xy.html new file mode 100644 index 00000000..2aa44db9 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_uv_to_xy.html @@ -0,0 +1 @@ +spectrum_uv_to_xy in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub fn spectrum_uv_to_xy(uv: [f64; 2], xy: &mut [f64; 2])
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_xy_to_uv.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_xy_to_uv.html new file mode 100644 index 00000000..66ec2e45 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_xy_to_uv.html @@ -0,0 +1 @@ +spectrum_xy_to_uv in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub fn spectrum_xy_to_uv(xy: [f64; 2], uv: &mut [f64; 2])
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_xy_to_xystar.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_xy_to_xystar.html new file mode 100644 index 00000000..17a44504 --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_xy_to_xystar.html @@ -0,0 +1 @@ +spectrum_xy_to_xystar in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub fn spectrum_xy_to_xystar(xy: [f64; 2], xystar: &mut [f64; 2])
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_xystar_to_xy.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_xystar_to_xy.html new file mode 100644 index 00000000..e3633afc --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.spectrum_xystar_to_xy.html @@ -0,0 +1 @@ +spectrum_xystar_to_xy in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub fn spectrum_xystar_to_xy(xystar: [f64; 2], xy: &mut [f64; 2])
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.xyz_from_spectrum.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.xyz_from_spectrum.html new file mode 100644 index 00000000..1be88f1b --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/fn.xyz_from_spectrum.html @@ -0,0 +1 @@ +xyz_from_spectrum in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub fn xyz_from_spectrum(spectrum: &[f64; 81], xyz: &mut [f64; 3])
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/index.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/index.html new file mode 100644 index 00000000..ecf3c86a --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/index.html @@ -0,0 +1,2 @@ +clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
Expand description

Hand-converted from spectra_xyz_5nm_380_780_0.97.h in the supplemental material from Physically Meaningful Rendering using Tristimulus Colours

+

Structs

Constants

Functions

\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/sidebar-items.js b/clovers/spectrum/spectra_xyz_5nm_380_780_097/sidebar-items.js new file mode 100644 index 00000000..b74d389b --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["cmf_wavelength","equal_energy_reflectance","spectrum_bin_size","spectrum_data_points","spectrum_grid","spectrum_grid_height","spectrum_grid_height_f","spectrum_grid_width","spectrum_grid_width_f","spectrum_num_samples","spectrum_num_samples_f","spectrum_sample_max","spectrum_sample_min"],"fn":["spectrum_apply_3x2","spectrum_uv_to_xy","spectrum_xy_to_uv","spectrum_xy_to_xystar","spectrum_xystar_to_xy","xyz_from_spectrum"],"struct":["spectrum_data_point_t","spectrum_grid_cell_t"]}; \ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/struct.spectrum_data_point_t.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/struct.spectrum_data_point_t.html new file mode 100644 index 00000000..97080b1d --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/struct.spectrum_data_point_t.html @@ -0,0 +1,46 @@ +spectrum_data_point_t in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub struct spectrum_data_point_t {
+    pub xystar: [f64; 2],
+    pub uv: [f64; 2],
+    pub spectrum: [f64; 81],
+}

Fields§

§xystar: [f64; 2]§uv: [f64; 2]§spectrum: [f64; 81]

Trait Implementations§

source§

impl Debug for spectrum_data_point_t

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/spectrum/spectra_xyz_5nm_380_780_097/struct.spectrum_grid_cell_t.html b/clovers/spectrum/spectra_xyz_5nm_380_780_097/struct.spectrum_grid_cell_t.html new file mode 100644 index 00000000..d430c2be --- /dev/null +++ b/clovers/spectrum/spectra_xyz_5nm_380_780_097/struct.spectrum_grid_cell_t.html @@ -0,0 +1,46 @@ +spectrum_grid_cell_t in clovers::spectrum::spectra_xyz_5nm_380_780_097 - Rust
pub struct spectrum_grid_cell_t {
+    pub inside: usize,
+    pub num_points: usize,
+    pub idx: [isize; 6],
+}

Fields§

§inside: usize§num_points: usize§idx: [isize; 6]

Trait Implementations§

source§

impl Debug for spectrum_grid_cell_t

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/clovers/spectrum/spectrum_grid/index.html b/clovers/spectrum/spectrum_grid/index.html new file mode 100644 index 00000000..9c352378 --- /dev/null +++ b/clovers/spectrum/spectrum_grid/index.html @@ -0,0 +1,2 @@ +clovers::spectrum::spectrum_grid - Rust
Expand description

Hand-converted from spectrum_grid.h in the supplemental material from Physically Meaningful Rendering using Tristimulus Colours

+
\ No newline at end of file diff --git a/clovers/spectrum/spectrum_grid/sidebar-items.js b/clovers/spectrum/spectrum_grid/sidebar-items.js new file mode 100644 index 00000000..5244ce01 --- /dev/null +++ b/clovers/spectrum/spectrum_grid/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/clovers/struct.Box.html b/clovers/struct.Box.html new file mode 100644 index 00000000..8ba9c72e --- /dev/null +++ b/clovers/struct.Box.html @@ -0,0 +1,1448 @@ +Box in clovers - Rust

Struct clovers::Box

1.0.0 · source ·
pub struct Box<T, A = Global>(/* private fields */)
+where
+    A: Allocator,
+    T: ?Sized;
Expand description

A pointer type that uniquely owns a heap allocation of type T.

+

See the module-level documentation for more.

+

Implementations§

source§

impl<T> Box<T>

source

pub fn new(x: T) -> Box<T>

Allocates memory on the heap and then places x into it.

+

This doesn’t actually allocate if T is zero-sized.

+
Examples
+
let five = Box::new(5);
+
source

pub fn new_uninit() -> Box<MaybeUninit<T>>

🔬This is a nightly-only experimental API. (new_uninit)

Constructs a new box with uninitialized contents.

+
Examples
+
#![feature(new_uninit)]
+
+let mut five = Box::<u32>::new_uninit();
+
+let five = unsafe {
+    // Deferred initialization:
+    five.as_mut_ptr().write(5);
+
+    five.assume_init()
+};
+
+assert_eq!(*five, 5)
+
source

pub fn new_zeroed() -> Box<MaybeUninit<T>>

🔬This is a nightly-only experimental API. (new_uninit)

Constructs a new Box with uninitialized contents, with the memory +being filled with 0 bytes.

+

See MaybeUninit::zeroed for examples of correct and incorrect usage +of this method.

+
Examples
+
#![feature(new_uninit)]
+
+let zero = Box::<u32>::new_zeroed();
+let zero = unsafe { zero.assume_init() };
+
+assert_eq!(*zero, 0)
+
1.33.0 · source

pub fn pin(x: T) -> Pin<Box<T>>

Constructs a new Pin<Box<T>>. If T does not implement Unpin, then +x will be pinned in memory and unable to be moved.

+

Constructing and pinning of the Box can also be done in two steps: Box::pin(x) +does the same as Box::into_pin(Box::new(x)). Consider using +into_pin if you already have a Box<T>, or if you want to +construct a (pinned) Box in a different way than with Box::new.

+
source

pub fn try_new(x: T) -> Result<Box<T>, AllocError>

🔬This is a nightly-only experimental API. (allocator_api)

Allocates memory on the heap then places x into it, +returning an error if the allocation fails

+

This doesn’t actually allocate if T is zero-sized.

+
Examples
+
#![feature(allocator_api)]
+
+let five = Box::try_new(5)?;
+
source

pub fn try_new_uninit() -> Result<Box<MaybeUninit<T>>, AllocError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new box with uninitialized contents on the heap, +returning an error if the allocation fails

+
Examples
+
#![feature(allocator_api, new_uninit)]
+
+let mut five = Box::<u32>::try_new_uninit()?;
+
+let five = unsafe {
+    // Deferred initialization:
+    five.as_mut_ptr().write(5);
+
+    five.assume_init()
+};
+
+assert_eq!(*five, 5);
+
source

pub fn try_new_zeroed() -> Result<Box<MaybeUninit<T>>, AllocError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new Box with uninitialized contents, with the memory +being filled with 0 bytes on the heap

+

See MaybeUninit::zeroed for examples of correct and incorrect usage +of this method.

+
Examples
+
#![feature(allocator_api, new_uninit)]
+
+let zero = Box::<u32>::try_new_zeroed()?;
+let zero = unsafe { zero.assume_init() };
+
+assert_eq!(*zero, 0);
+
source§

impl<T, A> Box<T, A>where + A: Allocator,

source

pub fn new_in(x: T, alloc: A) -> Box<T, A>where + A: Allocator,

🔬This is a nightly-only experimental API. (allocator_api)

Allocates memory in the given allocator then places x into it.

+

This doesn’t actually allocate if T is zero-sized.

+
Examples
+
#![feature(allocator_api)]
+
+use std::alloc::System;
+
+let five = Box::new_in(5, System);
+
source

pub fn try_new_in(x: T, alloc: A) -> Result<Box<T, A>, AllocError>where + A: Allocator,

🔬This is a nightly-only experimental API. (allocator_api)

Allocates memory in the given allocator then places x into it, +returning an error if the allocation fails

+

This doesn’t actually allocate if T is zero-sized.

+
Examples
+
#![feature(allocator_api)]
+
+use std::alloc::System;
+
+let five = Box::try_new_in(5, System)?;
+
source

pub fn new_uninit_in(alloc: A) -> Box<MaybeUninit<T>, A>where + A: Allocator,

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new box with uninitialized contents in the provided allocator.

+
Examples
+
#![feature(allocator_api, new_uninit)]
+
+use std::alloc::System;
+
+let mut five = Box::<u32, _>::new_uninit_in(System);
+
+let five = unsafe {
+    // Deferred initialization:
+    five.as_mut_ptr().write(5);
+
+    five.assume_init()
+};
+
+assert_eq!(*five, 5)
+
source

pub fn try_new_uninit_in(alloc: A) -> Result<Box<MaybeUninit<T>, A>, AllocError>where + A: Allocator,

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new box with uninitialized contents in the provided allocator, +returning an error if the allocation fails

+
Examples
+
#![feature(allocator_api, new_uninit)]
+
+use std::alloc::System;
+
+let mut five = Box::<u32, _>::try_new_uninit_in(System)?;
+
+let five = unsafe {
+    // Deferred initialization:
+    five.as_mut_ptr().write(5);
+
+    five.assume_init()
+};
+
+assert_eq!(*five, 5);
+
source

pub fn new_zeroed_in(alloc: A) -> Box<MaybeUninit<T>, A>where + A: Allocator,

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new Box with uninitialized contents, with the memory +being filled with 0 bytes in the provided allocator.

+

See MaybeUninit::zeroed for examples of correct and incorrect usage +of this method.

+
Examples
+
#![feature(allocator_api, new_uninit)]
+
+use std::alloc::System;
+
+let zero = Box::<u32, _>::new_zeroed_in(System);
+let zero = unsafe { zero.assume_init() };
+
+assert_eq!(*zero, 0)
+
source

pub fn try_new_zeroed_in(alloc: A) -> Result<Box<MaybeUninit<T>, A>, AllocError>where + A: Allocator,

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new Box with uninitialized contents, with the memory +being filled with 0 bytes in the provided allocator, +returning an error if the allocation fails,

+

See MaybeUninit::zeroed for examples of correct and incorrect usage +of this method.

+
Examples
+
#![feature(allocator_api, new_uninit)]
+
+use std::alloc::System;
+
+let zero = Box::<u32, _>::try_new_zeroed_in(System)?;
+let zero = unsafe { zero.assume_init() };
+
+assert_eq!(*zero, 0);
+
source

pub fn pin_in(x: T, alloc: A) -> Pin<Box<T, A>>where + A: 'static + Allocator,

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new Pin<Box<T, A>>. If T does not implement Unpin, then +x will be pinned in memory and unable to be moved.

+

Constructing and pinning of the Box can also be done in two steps: Box::pin_in(x, alloc) +does the same as Box::into_pin(Box::new_in(x, alloc)). Consider using +into_pin if you already have a Box<T, A>, or if you want to +construct a (pinned) Box in a different way than with Box::new_in.

+
source

pub fn into_boxed_slice(boxed: Box<T, A>) -> Box<[T], A>

🔬This is a nightly-only experimental API. (box_into_boxed_slice)

Converts a Box<T> into a Box<[T]>

+

This conversion does not allocate on the heap and happens in place.

+
source

pub fn into_inner(boxed: Box<T, A>) -> T

🔬This is a nightly-only experimental API. (box_into_inner)

Consumes the Box, returning the wrapped value.

+
Examples
+
#![feature(box_into_inner)]
+
+let c = Box::new(5);
+
+assert_eq!(Box::into_inner(c), 5);
+
source§

impl<T> Box<[T]>

source

pub fn new_uninit_slice(len: usize) -> Box<[MaybeUninit<T>]>

🔬This is a nightly-only experimental API. (new_uninit)

Constructs a new boxed slice with uninitialized contents.

+
Examples
+
#![feature(new_uninit)]
+
+let mut values = Box::<[u32]>::new_uninit_slice(3);
+
+let values = unsafe {
+    // Deferred initialization:
+    values[0].as_mut_ptr().write(1);
+    values[1].as_mut_ptr().write(2);
+    values[2].as_mut_ptr().write(3);
+
+    values.assume_init()
+};
+
+assert_eq!(*values, [1, 2, 3])
+
source

pub fn new_zeroed_slice(len: usize) -> Box<[MaybeUninit<T>]>

🔬This is a nightly-only experimental API. (new_uninit)

Constructs a new boxed slice with uninitialized contents, with the memory +being filled with 0 bytes.

+

See MaybeUninit::zeroed for examples of correct and incorrect usage +of this method.

+
Examples
+
#![feature(new_uninit)]
+
+let values = Box::<[u32]>::new_zeroed_slice(3);
+let values = unsafe { values.assume_init() };
+
+assert_eq!(*values, [0, 0, 0])
+
source

pub fn try_new_uninit_slice( + len: usize +) -> Result<Box<[MaybeUninit<T>]>, AllocError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new boxed slice with uninitialized contents. Returns an error if +the allocation fails

+
Examples
+
#![feature(allocator_api, new_uninit)]
+
+let mut values = Box::<[u32]>::try_new_uninit_slice(3)?;
+let values = unsafe {
+    // Deferred initialization:
+    values[0].as_mut_ptr().write(1);
+    values[1].as_mut_ptr().write(2);
+    values[2].as_mut_ptr().write(3);
+    values.assume_init()
+};
+
+assert_eq!(*values, [1, 2, 3]);
+
source

pub fn try_new_zeroed_slice( + len: usize +) -> Result<Box<[MaybeUninit<T>]>, AllocError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new boxed slice with uninitialized contents, with the memory +being filled with 0 bytes. Returns an error if the allocation fails

+

See MaybeUninit::zeroed for examples of correct and incorrect usage +of this method.

+
Examples
+
#![feature(allocator_api, new_uninit)]
+
+let values = Box::<[u32]>::try_new_zeroed_slice(3)?;
+let values = unsafe { values.assume_init() };
+
+assert_eq!(*values, [0, 0, 0]);
+
source§

impl<T, A> Box<[T], A>where + A: Allocator,

source

pub fn new_uninit_slice_in(len: usize, alloc: A) -> Box<[MaybeUninit<T>], A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new boxed slice with uninitialized contents in the provided allocator.

+
Examples
+
#![feature(allocator_api, new_uninit)]
+
+use std::alloc::System;
+
+let mut values = Box::<[u32], _>::new_uninit_slice_in(3, System);
+
+let values = unsafe {
+    // Deferred initialization:
+    values[0].as_mut_ptr().write(1);
+    values[1].as_mut_ptr().write(2);
+    values[2].as_mut_ptr().write(3);
+
+    values.assume_init()
+};
+
+assert_eq!(*values, [1, 2, 3])
+
source

pub fn new_zeroed_slice_in(len: usize, alloc: A) -> Box<[MaybeUninit<T>], A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new boxed slice with uninitialized contents in the provided allocator, +with the memory being filled with 0 bytes.

+

See MaybeUninit::zeroed for examples of correct and incorrect usage +of this method.

+
Examples
+
#![feature(allocator_api, new_uninit)]
+
+use std::alloc::System;
+
+let values = Box::<[u32], _>::new_zeroed_slice_in(3, System);
+let values = unsafe { values.assume_init() };
+
+assert_eq!(*values, [0, 0, 0])
+
source§

impl<T, A> Box<MaybeUninit<T>, A>where + A: Allocator,

source

pub unsafe fn assume_init(self) -> Box<T, A>

🔬This is a nightly-only experimental API. (new_uninit)

Converts to Box<T, A>.

+
Safety
+

As with MaybeUninit::assume_init, +it is up to the caller to guarantee that the value +really is in an initialized state. +Calling this when the content is not yet fully initialized +causes immediate undefined behavior.

+
Examples
+
#![feature(new_uninit)]
+
+let mut five = Box::<u32>::new_uninit();
+
+let five: Box<u32> = unsafe {
+    // Deferred initialization:
+    five.as_mut_ptr().write(5);
+
+    five.assume_init()
+};
+
+assert_eq!(*five, 5)
+
source

pub fn write(boxed: Box<MaybeUninit<T>, A>, value: T) -> Box<T, A>

🔬This is a nightly-only experimental API. (new_uninit)

Writes the value and converts to Box<T, A>.

+

This method converts the box similarly to Box::assume_init but +writes value into it before conversion thus guaranteeing safety. +In some scenarios use of this method may improve performance because +the compiler may be able to optimize copying from stack.

+
Examples
+
#![feature(new_uninit)]
+
+let big_box = Box::<[usize; 1024]>::new_uninit();
+
+let mut array = [0; 1024];
+for (i, place) in array.iter_mut().enumerate() {
+    *place = i;
+}
+
+// The optimizer may be able to elide this copy, so previous code writes
+// to heap directly.
+let big_box = Box::write(big_box, array);
+
+for (i, x) in big_box.iter().enumerate() {
+    assert_eq!(*x, i);
+}
+
source§

impl<T, A> Box<[MaybeUninit<T>], A>where + A: Allocator,

source

pub unsafe fn assume_init(self) -> Box<[T], A>

🔬This is a nightly-only experimental API. (new_uninit)

Converts to Box<[T], A>.

+
Safety
+

As with MaybeUninit::assume_init, +it is up to the caller to guarantee that the values +really are in an initialized state. +Calling this when the content is not yet fully initialized +causes immediate undefined behavior.

+
Examples
+
#![feature(new_uninit)]
+
+let mut values = Box::<[u32]>::new_uninit_slice(3);
+
+let values = unsafe {
+    // Deferred initialization:
+    values[0].as_mut_ptr().write(1);
+    values[1].as_mut_ptr().write(2);
+    values[2].as_mut_ptr().write(3);
+
+    values.assume_init()
+};
+
+assert_eq!(*values, [1, 2, 3])
+
source§

impl<T> Box<T>where + T: ?Sized,

1.4.0 · source

pub unsafe fn from_raw(raw: *mut T) -> Box<T>

Constructs a box from a raw pointer.

+

After calling this function, the raw pointer is owned by the +resulting Box. Specifically, the Box destructor will call +the destructor of T and free the allocated memory. For this +to be safe, the memory must have been allocated in accordance +with the memory layout used by Box .

+
Safety
+

This function is unsafe because improper use may lead to +memory problems. For example, a double-free may occur if the +function is called twice on the same raw pointer.

+

The safety conditions are described in the memory layout section.

+
Examples
+

Recreate a Box which was previously converted to a raw pointer +using Box::into_raw:

+ +
let x = Box::new(5);
+let ptr = Box::into_raw(x);
+let x = unsafe { Box::from_raw(ptr) };
+

Manually create a Box from scratch by using the global allocator:

+ +
use std::alloc::{alloc, Layout};
+
+unsafe {
+    let ptr = alloc(Layout::new::<i32>()) as *mut i32;
+    // In general .write is required to avoid attempting to destruct
+    // the (uninitialized) previous contents of `ptr`, though for this
+    // simple example `*ptr = 5` would have worked as well.
+    ptr.write(5);
+    let x = Box::from_raw(ptr);
+}
+
source§

impl<T, A> Box<T, A>where + A: Allocator, + T: ?Sized,

const: unstable · source

pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Box<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a box from a raw pointer in the given allocator.

+

After calling this function, the raw pointer is owned by the +resulting Box. Specifically, the Box destructor will call +the destructor of T and free the allocated memory. For this +to be safe, the memory must have been allocated in accordance +with the memory layout used by Box .

+
Safety
+

This function is unsafe because improper use may lead to +memory problems. For example, a double-free may occur if the +function is called twice on the same raw pointer.

+
Examples
+

Recreate a Box which was previously converted to a raw pointer +using Box::into_raw_with_allocator:

+ +
#![feature(allocator_api)]
+
+use std::alloc::System;
+
+let x = Box::new_in(5, System);
+let (ptr, alloc) = Box::into_raw_with_allocator(x);
+let x = unsafe { Box::from_raw_in(ptr, alloc) };
+

Manually create a Box from scratch by using the system allocator:

+ +
#![feature(allocator_api, slice_ptr_get)]
+
+use std::alloc::{Allocator, Layout, System};
+
+unsafe {
+    let ptr = System.allocate(Layout::new::<i32>())?.as_mut_ptr() as *mut i32;
+    // In general .write is required to avoid attempting to destruct
+    // the (uninitialized) previous contents of `ptr`, though for this
+    // simple example `*ptr = 5` would have worked as well.
+    ptr.write(5);
+    let x = Box::from_raw_in(ptr, System);
+}
+
1.4.0 · source

pub fn into_raw(b: Box<T, A>) -> *mut T

Consumes the Box, returning a wrapped raw pointer.

+

The pointer will be properly aligned and non-null.

+

After calling this function, the caller is responsible for the +memory previously managed by the Box. In particular, the +caller should properly destroy T and release the memory, taking +into account the memory layout used by Box. The easiest way to +do this is to convert the raw pointer back into a Box with the +Box::from_raw function, allowing the Box destructor to perform +the cleanup.

+

Note: this is an associated function, which means that you have +to call it as Box::into_raw(b) instead of b.into_raw(). This +is so that there is no conflict with a method on the inner type.

+
Examples
+

Converting the raw pointer back into a Box with Box::from_raw +for automatic cleanup:

+ +
let x = Box::new(String::from("Hello"));
+let ptr = Box::into_raw(x);
+let x = unsafe { Box::from_raw(ptr) };
+

Manual cleanup by explicitly running the destructor and deallocating +the memory:

+ +
use std::alloc::{dealloc, Layout};
+use std::ptr;
+
+let x = Box::new(String::from("Hello"));
+let p = Box::into_raw(x);
+unsafe {
+    ptr::drop_in_place(p);
+    dealloc(p as *mut u8, Layout::new::<String>());
+}
+
source

pub fn into_raw_with_allocator(b: Box<T, A>) -> (*mut T, A)

🔬This is a nightly-only experimental API. (allocator_api)

Consumes the Box, returning a wrapped raw pointer and the allocator.

+

The pointer will be properly aligned and non-null.

+

After calling this function, the caller is responsible for the +memory previously managed by the Box. In particular, the +caller should properly destroy T and release the memory, taking +into account the memory layout used by Box. The easiest way to +do this is to convert the raw pointer back into a Box with the +Box::from_raw_in function, allowing the Box destructor to perform +the cleanup.

+

Note: this is an associated function, which means that you have +to call it as Box::into_raw_with_allocator(b) instead of b.into_raw_with_allocator(). This +is so that there is no conflict with a method on the inner type.

+
Examples
+

Converting the raw pointer back into a Box with Box::from_raw_in +for automatic cleanup:

+ +
#![feature(allocator_api)]
+
+use std::alloc::System;
+
+let x = Box::new_in(String::from("Hello"), System);
+let (ptr, alloc) = Box::into_raw_with_allocator(x);
+let x = unsafe { Box::from_raw_in(ptr, alloc) };
+

Manual cleanup by explicitly running the destructor and deallocating +the memory:

+ +
#![feature(allocator_api)]
+
+use std::alloc::{Allocator, Layout, System};
+use std::ptr::{self, NonNull};
+
+let x = Box::new_in(String::from("Hello"), System);
+let (ptr, alloc) = Box::into_raw_with_allocator(x);
+unsafe {
+    ptr::drop_in_place(ptr);
+    let non_null = NonNull::new_unchecked(ptr);
+    alloc.deallocate(non_null.cast(), Layout::new::<String>());
+}
+
const: unstable · source

pub fn allocator(b: &Box<T, A>) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

+

Note: this is an associated function, which means that you have +to call it as Box::allocator(&b) instead of b.allocator(). This +is so that there is no conflict with a method on the inner type.

+
1.26.0 · source

pub fn leak<'a>(b: Box<T, A>) -> &'a mut Twhere + A: 'a,

Consumes and leaks the Box, returning a mutable reference, +&'a mut T. Note that the type T must outlive the chosen lifetime +'a. If the type has only static references, or none at all, then this +may be chosen to be 'static.

+

This function is mainly useful for data that lives for the remainder of +the program’s life. Dropping the returned reference will cause a memory +leak. If this is not acceptable, the reference should first be wrapped +with the Box::from_raw function producing a Box. This Box can +then be dropped which will properly destroy T and release the +allocated memory.

+

Note: this is an associated function, which means that you have +to call it as Box::leak(b) instead of b.leak(). This +is so that there is no conflict with a method on the inner type.

+
Examples
+

Simple usage:

+ +
let x = Box::new(41);
+let static_ref: &'static mut usize = Box::leak(x);
+*static_ref += 1;
+assert_eq!(*static_ref, 42);
+

Unsized data:

+ +
let x = vec![1, 2, 3].into_boxed_slice();
+let static_ref = Box::leak(x);
+static_ref[0] = 4;
+assert_eq!(*static_ref, [4, 2, 3]);
+
1.63.0 (const: unstable) · source

pub fn into_pin(boxed: Box<T, A>) -> Pin<Box<T, A>>where + A: 'static,

Converts a Box<T> into a Pin<Box<T>>. If T does not implement Unpin, then +*boxed will be pinned in memory and unable to be moved.

+

This conversion does not allocate on the heap and happens in place.

+

This is also available via From.

+

Constructing and pinning a Box with Box::into_pin(Box::new(x)) +can also be written more concisely using Box::pin(x). +This into_pin method is useful if you already have a Box<T>, or you are +constructing a (pinned) Box in a different way than with Box::new.

+
Notes
+

It’s not recommended that crates add an impl like From<Box<T>> for Pin<T>, +as it’ll introduce an ambiguity when calling Pin::from. +A demonstration of such a poor impl is shown below.

+ +
struct Foo; // A type defined in this crate.
+impl From<Box<()>> for Pin<Foo> {
+    fn from(_: Box<()>) -> Pin<Foo> {
+        Pin::new(Foo)
+    }
+}
+
+let foo = Box::new(());
+let bar = Pin::from(foo);
+
source§

impl<A> Box<dyn Any, A>where + A: Allocator,

source

pub fn downcast<T>(self) -> Result<Box<T, A>, Box<dyn Any, A>>where + T: Any,

Attempt to downcast the box to a concrete type.

+
Examples
+
use std::any::Any;
+
+fn print_if_string(value: Box<dyn Any>) {
+    if let Ok(string) = value.downcast::<String>() {
+        println!("String ({}): {}", string.len(), string);
+    }
+}
+
+let my_string = "Hello World".to_string();
+print_if_string(Box::new(my_string));
+print_if_string(Box::new(0i8));
+
source

pub unsafe fn downcast_unchecked<T>(self) -> Box<T, A>where + T: Any,

🔬This is a nightly-only experimental API. (downcast_unchecked)

Downcasts the box to a concrete type.

+

For a safe alternative see downcast.

+
Examples
+
#![feature(downcast_unchecked)]
+
+use std::any::Any;
+
+let x: Box<dyn Any> = Box::new(1_usize);
+
+unsafe {
+    assert_eq!(*x.downcast_unchecked::<usize>(), 1);
+}
+
Safety
+

The contained value must be of type T. Calling this method +with the incorrect type is undefined behavior.

+
source§

impl<A> Box<dyn Any + Send, A>where + A: Allocator,

source

pub fn downcast<T>(self) -> Result<Box<T, A>, Box<dyn Any + Send, A>>where + T: Any,

Attempt to downcast the box to a concrete type.

+
Examples
+
use std::any::Any;
+
+fn print_if_string(value: Box<dyn Any + Send>) {
+    if let Ok(string) = value.downcast::<String>() {
+        println!("String ({}): {}", string.len(), string);
+    }
+}
+
+let my_string = "Hello World".to_string();
+print_if_string(Box::new(my_string));
+print_if_string(Box::new(0i8));
+
source

pub unsafe fn downcast_unchecked<T>(self) -> Box<T, A>where + T: Any,

🔬This is a nightly-only experimental API. (downcast_unchecked)

Downcasts the box to a concrete type.

+

For a safe alternative see downcast.

+
Examples
+
#![feature(downcast_unchecked)]
+
+use std::any::Any;
+
+let x: Box<dyn Any + Send> = Box::new(1_usize);
+
+unsafe {
+    assert_eq!(*x.downcast_unchecked::<usize>(), 1);
+}
+
Safety
+

The contained value must be of type T. Calling this method +with the incorrect type is undefined behavior.

+
source§

impl<A> Box<dyn Any + Send + Sync, A>where + A: Allocator,

1.51.0 · source

pub fn downcast<T>(self) -> Result<Box<T, A>, Box<dyn Any + Send + Sync, A>>where + T: Any,

Attempt to downcast the box to a concrete type.

+
Examples
+
use std::any::Any;
+
+fn print_if_string(value: Box<dyn Any + Send + Sync>) {
+    if let Ok(string) = value.downcast::<String>() {
+        println!("String ({}): {}", string.len(), string);
+    }
+}
+
+let my_string = "Hello World".to_string();
+print_if_string(Box::new(my_string));
+print_if_string(Box::new(0i8));
+
source

pub unsafe fn downcast_unchecked<T>(self) -> Box<T, A>where + T: Any,

🔬This is a nightly-only experimental API. (downcast_unchecked)

Downcasts the box to a concrete type.

+

For a safe alternative see downcast.

+
Examples
+
#![feature(downcast_unchecked)]
+
+use std::any::Any;
+
+let x: Box<dyn Any + Send + Sync> = Box::new(1_usize);
+
+unsafe {
+    assert_eq!(*x.downcast_unchecked::<usize>(), 1);
+}
+
Safety
+

The contained value must be of type T. Calling this method +with the incorrect type is undefined behavior.

+

Trait Implementations§

source§

impl<'a, T, C, const N: usize> ArraysAs<[C]> for Box<[[T; N]]>where + C: ArrayCast<Array = [T; N]>,

source§

fn arrays_as(&self) -> &[C]

Cast this collection of arrays into a collection of colors.
source§

impl<'a, T, C, const N: usize> ArraysAsMut<[C]> for Box<[[T; N]]>where + C: ArrayCast<Array = [T; N]>,

source§

fn arrays_as_mut(&mut self) -> &mut [C]

Cast this collection of arrays into a mutable collection of colors.
source§

impl<'a, T, C, const N: usize> AsArrays<[[T; N]]> for Box<[C]>where + C: ArrayCast<Array = [T; N]>,

source§

fn as_arrays(&self) -> &[[T; N]]

Cast this collection of colors into a collection of arrays.
source§

impl<'a, T, C, const N: usize> AsArraysMut<[[T; N]]> for Box<[C]>where + C: ArrayCast<Array = [T; N]>,

source§

fn as_arrays_mut(&mut self) -> &mut [[T; N]]

Cast this collection of colors into a mutable collection of arrays.
source§

impl<'a, T, C, const N: usize> AsComponents<[T]> for Box<[C]>where + C: ArrayCast<Array = [T; N]>,

source§

fn as_components(&self) -> &[T]

Cast this collection of colors into a collection of color components.
source§

impl<'a, T, C, const N: usize> AsComponentsMut<[T]> for Box<[C]>where + C: ArrayCast<Array = [T; N]>,

source§

fn as_components_mut(&mut self) -> &mut [T]

Cast this collection of colors into a mutable collection of color +components.
1.64.0 · source§

impl<T> AsFd for Box<T>where + T: AsFd,

source§

fn as_fd(&self) -> BorrowedFd<'_>

Borrows the file descriptor. Read more
1.5.0 · source§

impl<T, A> AsMut<T> for Box<T, A>where + A: Allocator, + T: ?Sized,

source§

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

Converts this type into a mutable reference of the (usually inferred) input type.
1.63.0 · source§

impl<T> AsRawFd for Box<T>where + T: AsRawFd,

source§

fn as_raw_fd(&self) -> i32

Extracts the raw file descriptor. Read more
1.5.0 · source§

impl<T, A> AsRef<T> for Box<T, A>where + A: Allocator, + T: ?Sized,

source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<'a, C> AsUints<[<C as UintCast>::Uint]> for Box<[C]>where + C: UintCast,

source§

fn as_uints(&self) -> &[<C as UintCast>::Uint]

Cast this collection of colors into a collection of unsigned integers.
source§

impl<'a, C> AsUintsMut<[<C as UintCast>::Uint]> for Box<[C]>where + C: UintCast,

source§

fn as_uints_mut(&mut self) -> &mut [<C as UintCast>::Uint]

Cast this collection of colors into a mutable collection of unsigned integers.
source§

impl<S> AsyncIterator for Box<S>where + S: AsyncIterator + Unpin + ?Sized,

§

type Item = <S as AsyncIterator>::Item

🔬This is a nightly-only experimental API. (async_iterator)
The type of items yielded by the async iterator.
source§

fn poll_next( + self: Pin<&mut Box<S>>, + cx: &mut Context<'_> +) -> Poll<Option<<Box<S> as AsyncIterator>::Item>>

🔬This is a nightly-only experimental API. (async_iterator)
Attempt to pull out the next value of this async iterator, registering the +current task for wakeup if the value is not yet available, and returning +None if the async iterator is exhausted. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

🔬This is a nightly-only experimental API. (async_iterator)
Returns the bounds on the remaining length of the async iterator. Read more
1.1.0 · source§

impl<T, A> Borrow<T> for Box<T, A>where + A: Allocator, + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
1.1.0 · source§

impl<T, A> BorrowMut<T> for Box<T, A>where + A: Allocator, + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<B> BufRead for Box<B>where + B: BufRead + ?Sized,

source§

fn fill_buf(&mut self) -> Result<&[u8], Error>

Returns the contents of the internal buffer, filling it with more data +from the inner reader if it is empty. Read more
source§

fn consume(&mut self, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer, +so they should no longer be returned in calls to read. Read more
source§

fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize, Error>

Read all bytes into buf until the delimiter byte or EOF is reached. Read more
source§

fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>

Read all bytes until a newline (the 0xA byte) is reached, and append +them to the provided String buffer. Read more
source§

fn has_data_left(&mut self) -> Result<bool, Error>

🔬This is a nightly-only experimental API. (buf_read_has_data_left)
Check if the underlying Read has any data left to be read. Read more
source§

fn split(self, byte: u8) -> Split<Self>where + Self: Sized,

Returns an iterator over the contents of this reader split on the byte +byte. Read more
source§

fn lines(self) -> Lines<Self>where + Self: Sized,

Returns an iterator over the lines of this reader. Read more
1.3.0 · source§

impl<T, A> Clone for Box<[T], A>where + T: Clone, + A: Allocator + Clone,

source§

fn clone(&self) -> Box<[T], A>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &Box<[T], A>)

Performs copy-assignment from source. Read more
1.29.0 · source§

impl Clone for Box<CStr>

source§

fn clone(&self) -> Box<CStr>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
1.29.0 · source§

impl Clone for Box<OsStr>

source§

fn clone(&self) -> Box<OsStr>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
1.29.0 · source§

impl Clone for Box<Path>

source§

fn clone(&self) -> Box<Path>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Clone for Box<RawValue>

source§

fn clone(&self) -> Box<RawValue>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T, A> Clone for Box<T, A>where + T: Clone, + A: Allocator + Clone,

source§

fn clone(&self) -> Box<T, A>

Returns a new box with a clone() of this box’s contents.

+
Examples
+
let x = Box::new(5);
+let y = x.clone();
+
+// The value is the same
+assert_eq!(x, y);
+
+// But they are unique objects
+assert_ne!(&*x as *const i32, &*y as *const i32);
+
source§

fn clone_from(&mut self, source: &Box<T, A>)

Copies source’s contents into self without creating a new allocation.

+
Examples
+
let x = Box::new(5);
+let mut y = Box::new(10);
+let yp: *const i32 = &*y;
+
+y.clone_from(&x);
+
+// The value is the same
+assert_eq!(x, y);
+
+// And no allocation occurred
+assert_eq!(yp, &*y);
+
1.3.0 · source§

impl Clone for Box<str>

source§

fn clone(&self) -> Box<str>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<G, R, A> Coroutine<R> for Box<G, A>where + G: Coroutine<R> + Unpin + ?Sized, + A: Allocator + 'static,

§

type Yield = <G as Coroutine<R>>::Yield

🔬This is a nightly-only experimental API. (coroutine_trait)
The type of value this coroutine yields. Read more
§

type Return = <G as Coroutine<R>>::Return

🔬This is a nightly-only experimental API. (coroutine_trait)
The type of value this coroutine returns. Read more
source§

fn resume( + self: Pin<&mut Box<G, A>>, + arg: R +) -> CoroutineState<<Box<G, A> as Coroutine<R>>::Yield, <Box<G, A> as Coroutine<R>>::Return>

🔬This is a nightly-only experimental API. (coroutine_trait)
Resumes the execution of this coroutine. Read more
source§

impl<T, A> Debug for Box<T, A>where + T: Debug + ?Sized, + A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Default for Box<[T]>

source§

fn default() -> Box<[T]>

Returns the “default value” for a type. Read more
1.17.0 · source§

impl Default for Box<CStr>

source§

fn default() -> Box<CStr>

Returns the “default value” for a type. Read more
1.17.0 · source§

impl Default for Box<OsStr>

source§

fn default() -> Box<OsStr>

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

impl Default for Box<RawValue>

source§

fn default() -> Box<RawValue>

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

impl<T> Default for Box<T>where + T: Default,

source§

fn default() -> Box<T>

Creates a Box<T>, with the Default value for T.

+
1.17.0 · source§

impl Default for Box<str>

source§

fn default() -> Box<str>

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

impl<T, A> Deref for Box<T, A>where + A: Allocator, + T: ?Sized,

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<T, A> DerefMut for Box<T, A>where + A: Allocator, + T: ?Sized,

source§

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

Mutably dereferences the value.
source§

impl<'de, T> Deserialize<'de> for Box<[T]>where + T: Deserialize<'de>,

source§

fn deserialize<D>( + deserializer: D +) -> Result<Box<[T]>, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'de> Deserialize<'de> for Box<CStr>

source§

fn deserialize<D>( + deserializer: D +) -> Result<Box<CStr>, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'de> Deserialize<'de> for Box<OsStr>

source§

fn deserialize<D>( + deserializer: D +) -> Result<Box<OsStr>, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'de> Deserialize<'de> for Box<Path>

source§

fn deserialize<D>( + deserializer: D +) -> Result<Box<Path>, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'de> Deserialize<'de> for Box<RawValue>

source§

fn deserialize<D>( + deserializer: D +) -> Result<Box<RawValue>, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'de, T> Deserialize<'de> for Box<T>where + T: Deserialize<'de>,

source§

fn deserialize<D>( + deserializer: D +) -> Result<Box<T>, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'de> Deserialize<'de> for Box<str>

source§

fn deserialize<D>( + deserializer: D +) -> Result<Box<str>, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<T, A> Display for Box<T, A>where + T: Display + ?Sized, + A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<I, A> DoubleEndedIterator for Box<I, A>where + I: DoubleEndedIterator + ?Sized, + A: Allocator,

source§

fn next_back(&mut self) -> Option<<I as Iterator>::Item>

Removes and returns an element from the end of the iterator. Read more
source§

fn nth_back(&mut self, n: usize) -> Option<<I as Iterator>::Item>

Returns the nth element from the end of the iterator. Read more
source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.27.0 · source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> Rwhere + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes +elements starting from the back of the iterator. Read more
1.27.0 · source§

fn rfold<B, F>(self, init: B, f: F) -> Bwhere + Self: Sized, + F: FnMut(B, Self::Item) -> B,

An iterator method that reduces the iterator’s elements to a single, +final value, starting from the back. Read more
1.27.0 · source§

fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
source§

impl<T, A> Drop for Box<T, A>where + A: Allocator, + T: ?Sized,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
1.8.0 · source§

impl<T> Error for Box<T>where + T: Error,

source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
source§

fn provide<'b>(&'b self, request: &mut Request<'b>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl<I, A> ExactSizeIterator for Box<I, A>where + I: ExactSizeIterator + ?Sized, + A: Allocator,

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
1.35.0 · source§

impl<Args, F, A> Fn<Args> for Box<F, A>where + Args: Tuple, + F: Fn<Args> + ?Sized, + A: Allocator,

source§

extern "rust-call" fn call( + &self, + args: Args +) -> <Box<F, A> as FnOnce<Args>>::Output

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
1.35.0 · source§

impl<Args, F, A> FnMut<Args> for Box<F, A>where + Args: Tuple, + F: FnMut<Args> + ?Sized, + A: Allocator,

source§

extern "rust-call" fn call_mut( + &mut self, + args: Args +) -> <Box<F, A> as FnOnce<Args>>::Output

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
1.35.0 · source§

impl<Args, F, A> FnOnce<Args> for Box<F, A>where + Args: Tuple, + F: FnOnce<Args> + ?Sized, + A: Allocator,

§

type Output = <F as FnOnce<Args>>::Output

The returned type after the call operator is used.
source§

extern "rust-call" fn call_once( + self, + args: Args +) -> <Box<F, A> as FnOnce<Args>>::Output

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
1.17.0 · source§

impl<T> From<&[T]> for Box<[T]>where + T: Clone,

source§

fn from(slice: &[T]) -> Box<[T]>

Converts a &[T] into a Box<[T]>

+

This conversion allocates on the heap +and performs a copy of slice and its contents.

+
Examples
+
// create a &[u8] which will be used to create a Box<[u8]>
+let slice: &[u8] = &[104, 101, 108, 108, 111];
+let boxed_slice: Box<[u8]> = Box::from(slice);
+
+println!("{boxed_slice:?}");
+
1.17.0 · source§

impl From<&CStr> for Box<CStr>

source§

fn from(s: &CStr) -> Box<CStr>

Converts a &CStr into a Box<CStr>, +by copying the contents into a newly allocated Box.

+
1.17.0 · source§

impl From<&OsStr> for Box<OsStr>

source§

fn from(s: &OsStr) -> Box<OsStr>

Copies the string into a newly allocated Box<OsStr>.

+
1.17.0 · source§

impl From<&Path> for Box<Path>

source§

fn from(path: &Path) -> Box<Path>

Creates a boxed Path from a reference.

+

This will allocate and clone path to it.

+
1.6.0 · source§

impl From<&str> for Box<dyn Error>

source§

fn from(err: &str) -> Box<dyn Error>

Converts a str into a box of dyn Error.

+
Examples
+
use std::error::Error;
+use std::mem;
+
+let a_str_error = "a str error";
+let a_boxed_error = Box::<dyn Error>::from(a_str_error);
+assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))
+
source§

impl<'a> From<&str> for Box<dyn Error + Send + Sync + 'a>

source§

fn from(err: &str) -> Box<dyn Error + Send + Sync + 'a>

Converts a str into a box of dyn Error + Send + Sync.

+
Examples
+
use std::error::Error;
+use std::mem;
+
+let a_str_error = "a str error";
+let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_str_error);
+assert!(
+    mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))
+
1.17.0 · source§

impl From<&str> for Box<str>

source§

fn from(s: &str) -> Box<str>

Converts a &str into a Box<str>

+

This conversion allocates on the heap +and performs a copy of s.

+
Examples
+
let boxed: Box<str> = Box::from("hello");
+println!("{boxed}");
+
1.45.0 · source§

impl<T, const N: usize> From<[T; N]> for Box<[T]>

source§

fn from(array: [T; N]) -> Box<[T]>

Converts a [T; N] into a Box<[T]>

+

This conversion moves the array to newly heap-allocated memory.

+
Examples
+
let boxed: Box<[u8]> = Box::from([4, 2]);
+println!("{boxed:?}");
+
source§

impl<C, const N: usize> From<Box<[<C as Premultiply>::Scalar; N]>> for Box<PreAlpha<C>>where + C: Premultiply, + PreAlpha<C>: ArrayCast<Array = [<C as Premultiply>::Scalar; N]>,

source§

fn from(array: Box<[<C as Premultiply>::Scalar; N]>) -> Box<PreAlpha<C>>

Converts to this type from the input type.
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>where + A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of +the existing heap allocation.

+
Examples
+
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();
+assert_eq!(Vec::from(b), vec![1, 2, 3]);
+
source§

impl<S, T> From<Box<[T; 1]>> for Box<Luma<S, T>>

source§

fn from(array: Box<[T; 1]>) -> Box<Luma<S, T>>

Converts to this type from the input type.
source§

impl<S, T> From<Box<[T; 3]>> for Box<Hsl<S, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Hsl<S, T>>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<[T; 3]>> for Box<Hsluv<Wp, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Hsluv<Wp, T>>

Converts to this type from the input type.
source§

impl<S, T> From<Box<[T; 3]>> for Box<Hsv<S, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Hsv<S, T>>

Converts to this type from the input type.
source§

impl<S, T> From<Box<[T; 3]>> for Box<Hwb<S, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Hwb<S, T>>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<[T; 3]>> for Box<Lab<Wp, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Lab<Wp, T>>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<[T; 3]>> for Box<Lch<Wp, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Lch<Wp, T>>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<[T; 3]>> for Box<Lchuv<Wp, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Lchuv<Wp, T>>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<[T; 3]>> for Box<Luv<Wp, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Luv<Wp, T>>

Converts to this type from the input type.
source§

impl<T> From<Box<[T; 3]>> for Box<Okhsl<T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Okhsl<T>>

Converts to this type from the input type.
source§

impl<T> From<Box<[T; 3]>> for Box<Okhsv<T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Okhsv<T>>

Converts to this type from the input type.
source§

impl<T> From<Box<[T; 3]>> for Box<Okhwb<T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Okhwb<T>>

Converts to this type from the input type.
source§

impl<T> From<Box<[T; 3]>> for Box<Oklab<T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Oklab<T>>

Converts to this type from the input type.
source§

impl<T> From<Box<[T; 3]>> for Box<Oklch<T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Oklch<T>>

Converts to this type from the input type.
source§

impl<S, T> From<Box<[T; 3]>> for Box<Rgb<S, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Rgb<S, T>>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<[T; 3]>> for Box<Xyz<Wp, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Xyz<Wp, T>>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<[T; 3]>> for Box<Yxy<Wp, T>>

source§

fn from(array: Box<[T; 3]>) -> Box<Yxy<Wp, T>>

Converts to this type from the input type.
source§

impl<C, T, const N: usize> From<Box<[T; N]>> for Box<Alpha<C, T>>where + Alpha<C, T>: ArrayCast<Array = [T; N]>,

source§

fn from(array: Box<[T; N]>) -> Box<Alpha<C, T>>

Converts to this type from the input type.
source§

impl<O, T, const N: usize> From<Box<[T; N]>> for Box<Packed<O, [T; N]>>

source§

fn from(array: Box<[T; N]>) -> Box<Packed<O, [T; N]>>

Converts to this type from the input type.
source§

impl<C, T, const N: usize> From<Box<Alpha<C, T>>> for Box<[T; N]>where + Alpha<C, T>: ArrayCast<Array = [T; N]>,

source§

fn from(color: Box<Alpha<C, T>>) -> Box<[T; N]>

Converts to this type from the input type.
source§

impl<S, T> From<Box<Hsl<S, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Hsl<S, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<Hsluv<Wp, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Hsluv<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<S, T> From<Box<Hsv<S, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Hsv<S, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<S, T> From<Box<Hwb<S, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Hwb<S, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<Lab<Wp, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Lab<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<Lch<Wp, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Lch<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<Lchuv<Wp, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Lchuv<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<S, T> From<Box<Luma<S, T>>> for Box<[T; 1]>

source§

fn from(color: Box<Luma<S, T>>) -> Box<[T; 1]>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<Luv<Wp, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Luv<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<T> From<Box<Okhsl<T>>> for Box<[T; 3]>

source§

fn from(color: Box<Okhsl<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<T> From<Box<Okhsv<T>>> for Box<[T; 3]>

source§

fn from(color: Box<Okhsv<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<T> From<Box<Okhwb<T>>> for Box<[T; 3]>

source§

fn from(color: Box<Okhwb<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<T> From<Box<Oklab<T>>> for Box<[T; 3]>

source§

fn from(color: Box<Oklab<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<T> From<Box<Oklch<T>>> for Box<[T; 3]>

source§

fn from(color: Box<Oklch<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<O, T, const N: usize> From<Box<Packed<O, [T; N]>>> for Box<[T; N]>

source§

fn from(color: Box<Packed<O, [T; N]>>) -> Box<[T; N]>

Converts to this type from the input type.
source§

impl<C, const N: usize> From<Box<PreAlpha<C>>> for Box<[<C as Premultiply>::Scalar; N]>where + C: Premultiply, + PreAlpha<C>: ArrayCast<Array = [<C as Premultiply>::Scalar; N]>,

source§

fn from(color: Box<PreAlpha<C>>) -> Box<[<C as Premultiply>::Scalar; N]>

Converts to this type from the input type.
source§

impl From<Box<RawValue>> for Box<str>

source§

fn from(raw_value: Box<RawValue>) -> Box<str>

Converts to this type from the input type.
source§

impl<S, T> From<Box<Rgb<S, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Rgb<S, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<Xyz<Wp, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Xyz<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
source§

impl<Wp, T> From<Box<Yxy<Wp, T>>> for Box<[T; 3]>

source§

fn from(color: Box<Yxy<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
1.19.0 · source§

impl<A> From<Box<str, A>> for Box<[u8], A>where + A: Allocator,

source§

fn from(s: Box<str, A>) -> Box<[u8], A>

Converts a Box<str> into a Box<[u8]>

+

This conversion does not allocate on the heap and happens in place.

+
Examples
+
// create a Box<str> which will be used to create a Box<[u8]>
+let boxed: Box<str> = Box::from("hello");
+let boxed_str: Box<[u8]> = Box::from(boxed);
+
+// create a &[u8] which will be used to create a Box<[u8]>
+let slice: &[u8] = &[104, 101, 108, 108, 111];
+let boxed_slice = Box::from(slice);
+
+assert_eq!(boxed_slice, boxed_str);
+
1.20.0 · source§

impl From<CString> for Box<CStr>

source§

fn from(s: CString) -> Box<CStr>

Converts a CString into a Box<CStr> without copying or allocating.

+
1.45.0 · source§

impl<T> From<Cow<'_, [T]>> for Box<[T]>where + T: Clone,

source§

fn from(cow: Cow<'_, [T]>) -> Box<[T]>

Converts a Cow<'_, [T]> into a Box<[T]>

+

When cow is the Cow::Borrowed variant, this +conversion allocates on the heap and copies the +underlying slice. Otherwise, it will try to reuse the owned +Vec’s allocation.

+
1.45.0 · source§

impl From<Cow<'_, CStr>> for Box<CStr>

source§

fn from(cow: Cow<'_, CStr>) -> Box<CStr>

Converts a Cow<'a, CStr> into a Box<CStr>, +by copying the contents if they are borrowed.

+
1.45.0 · source§

impl From<Cow<'_, OsStr>> for Box<OsStr>

source§

fn from(cow: Cow<'_, OsStr>) -> Box<OsStr>

Converts a Cow<'a, OsStr> into a Box<OsStr>, +by copying the contents if they are borrowed.

+
1.45.0 · source§

impl From<Cow<'_, Path>> for Box<Path>

source§

fn from(cow: Cow<'_, Path>) -> Box<Path>

Creates a boxed Path from a clone-on-write pointer.

+

Converting from a Cow::Owned does not clone or allocate.

+
1.45.0 · source§

impl From<Cow<'_, str>> for Box<str>

source§

fn from(cow: Cow<'_, str>) -> Box<str>

Converts a Cow<'_, str> into a Box<str>

+

When cow is the Cow::Borrowed variant, this +conversion allocates on the heap and copies the +underlying str. Otherwise, it will try to reuse the owned +String’s allocation.

+
Examples
+
use std::borrow::Cow;
+
+let unboxed = Cow::Borrowed("hello");
+let boxed: Box<str> = Box::from(unboxed);
+println!("{boxed}");
+ +
let unboxed = Cow::Owned("hello".to_string());
+let boxed: Box<str> = Box::from(unboxed);
+println!("{boxed}");
+
1.22.0 · source§

impl<'a> From<Cow<'a, str>> for Box<dyn Error>

source§

fn from(err: Cow<'a, str>) -> Box<dyn Error>

Converts a Cow into a box of dyn Error.

+
Examples
+
use std::error::Error;
+use std::mem;
+use std::borrow::Cow;
+
+let a_cow_str_error = Cow::from("a str error");
+let a_boxed_error = Box::<dyn Error>::from(a_cow_str_error);
+assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))
+
1.22.0 · source§

impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + Send + Sync + 'a>

source§

fn from(err: Cow<'b, str>) -> Box<dyn Error + Send + Sync + 'a>

Converts a Cow into a box of dyn Error + Send + Sync.

+
Examples
+
use std::error::Error;
+use std::mem;
+use std::borrow::Cow;
+
+let a_cow_str_error = Cow::from("a str error");
+let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_cow_str_error);
+assert!(
+    mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))
+
source§

impl<'a, E> From<E> for Box<dyn Error + 'a>where + E: Error + 'a,

source§

fn from(err: E) -> Box<dyn Error + 'a>

Converts a type of Error into a box of dyn Error.

+
Examples
+
use std::error::Error;
+use std::fmt;
+use std::mem;
+
+#[derive(Debug)]
+struct AnError;
+
+impl fmt::Display for AnError {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "An error")
+    }
+}
+
+impl Error for AnError {}
+
+let an_error = AnError;
+assert!(0 == mem::size_of_val(&an_error));
+let a_boxed_error = Box::<dyn Error>::from(an_error);
+assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))
+
source§

impl<'a, E> From<E> for Box<dyn Error + Send + Sync + 'a>where + E: Error + Send + Sync + 'a,

source§

fn from(err: E) -> Box<dyn Error + Send + Sync + 'a>

Converts a type of Error + Send + Sync into a box of +dyn Error + Send + Sync.

+
Examples
+
use std::error::Error;
+use std::fmt;
+use std::mem;
+
+#[derive(Debug)]
+struct AnError;
+
+impl fmt::Display for AnError {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "An error")
+    }
+}
+
+impl Error for AnError {}
+
+unsafe impl Send for AnError {}
+
+unsafe impl Sync for AnError {}
+
+let an_error = AnError;
+assert!(0 == mem::size_of_val(&an_error));
+let a_boxed_error = Box::<dyn Error + Send + Sync>::from(an_error);
+assert!(
+    mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))
+
1.20.0 · source§

impl From<OsString> for Box<OsStr>

source§

fn from(s: OsString) -> Box<OsStr>

Converts an OsString into a Box<OsStr> without copying or allocating.

+
1.20.0 · source§

impl From<PathBuf> for Box<Path>

source§

fn from(p: PathBuf) -> Box<Path>

Converts a PathBuf into a Box<Path>.

+

This conversion currently should not allocate memory, +but this behavior is not guaranteed on all platforms or in all future versions.

+
1.6.0 · source§

impl From<String> for Box<dyn Error>

source§

fn from(str_err: String) -> Box<dyn Error>

Converts a String into a box of dyn Error.

+
Examples
+
use std::error::Error;
+use std::mem;
+
+let a_string_error = "a string error".to_string();
+let a_boxed_error = Box::<dyn Error>::from(a_string_error);
+assert!(mem::size_of::<Box<dyn Error>>() == mem::size_of_val(&a_boxed_error))
+
source§

impl From<String> for Box<dyn Error + Send + Sync>

source§

fn from(err: String) -> Box<dyn Error + Send + Sync>

Converts a String into a box of dyn Error + Send + Sync.

+
Examples
+
use std::error::Error;
+use std::mem;
+
+let a_string_error = "a string error".to_string();
+let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_string_error);
+assert!(
+    mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))
+
1.20.0 · source§

impl From<String> for Box<str>

source§

fn from(s: String) -> Box<str>

Converts the given String to a boxed str slice that is owned.

+
Examples
+
let s1: String = String::from("hello world");
+let s2: Box<str> = Box::from(s1);
+let s3: String = String::from(s2);
+
+assert_eq!("hello world", s3)
+
1.6.0 · source§

impl<T> From<T> for Box<T>

source§

fn from(t: T) -> Box<T>

Converts a T into a Box<T>

+

The conversion allocates on the heap and moves t +from the stack into it.

+
Examples
+
let x = 5;
+let boxed = Box::new(5);
+
+assert_eq!(Box::from(x), boxed);
+
1.20.0 · source§

impl<T, A> From<Vec<T, A>> for Box<[T], A>where + A: Allocator,

source§

fn from(v: Vec<T, A>) -> Box<[T], A>

Convert a vector into a boxed slice.

+

If v has excess capacity, its items will be moved into a +newly-allocated buffer with exactly the right capacity.

+
Examples
+
assert_eq!(Box::from(vec![1, 2, 3]), vec![1, 2, 3].into_boxed_slice());
+

Any excess capacity is removed:

+ +
let mut vec = Vec::with_capacity(10);
+vec.extend([1, 2, 3]);
+
+assert_eq!(Box::from(vec), vec![1, 2, 3].into_boxed_slice());
+
source§

impl<'a, T, C, const N: usize> FromArrays<&'a Box<[[T; N]]>> for &'a [C]where + C: ArrayCast<Array = [T; N]>,

source§

fn from_arrays(arrays: &'a Box<[[T; N]]>) -> &'a [C]

Cast a collection of arrays into an collection of colors.
source§

impl<'a, T, C, const N: usize> FromArrays<&'a mut Box<[[T; N]]>> for &'a mut [C]where + C: ArrayCast<Array = [T; N]>,

source§

fn from_arrays(arrays: &'a mut Box<[[T; N]]>) -> &'a mut [C]

Cast a collection of arrays into an collection of colors.
source§

impl<T, C, const N: usize> FromArrays<Box<[[T; N]]>> for Box<[C]>where + C: ArrayCast<Array = [T; N]>,

source§

fn from_arrays(arrays: Box<[[T; N]]>) -> Box<[C]>

Cast a collection of arrays into an collection of colors.
source§

impl<T, U> FromColor<Box<[T]>> for Box<[U]>where + T: ArrayCast, + U: ArrayCast<Array = <T as ArrayCast>::Array> + FromColor<T>,

source§

fn from_color(color: Box<[T]>) -> Box<[U]>

Convert all colors in place, without reallocating.

+ +
use palette::{convert::FromColor, SaturateAssign, Srgb, Lch};
+
+let srgb = vec![Srgb::new(0.8f32, 1.0, 0.2), Srgb::new(0.9, 0.1, 0.3)].into_boxed_slice();
+let mut lch = Box::<[Lch]>::from_color(srgb);
+
+lch.saturate_assign(0.1);
+
+let srgb = Box::<[Srgb]>::from_color(lch);
+
source§

impl<T, U> FromColorUnclamped<Box<[T]>> for Box<[U]>where + T: ArrayCast, + U: ArrayCast<Array = <T as ArrayCast>::Array> + FromColorUnclamped<T>,

source§

fn from_color_unclamped(color: Box<[T]>) -> Box<[U]>

Convert all colors in place, without reallocating.

+ +
use palette::{convert::FromColorUnclamped, SaturateAssign, Srgb, Lch};
+
+let srgb = vec![Srgb::new(0.8f32, 1.0, 0.2), Srgb::new(0.9, 0.1, 0.3)].into_boxed_slice();
+let mut lch = Box::<[Lch]>::from_color_unclamped(srgb);
+
+lch.saturate_assign(0.1);
+
+let srgb = Box::<[Srgb]>::from_color_unclamped(lch);
+
1.32.0 · source§

impl<I> FromIterator<I> for Box<[I]>

source§

fn from_iter<T>(iter: T) -> Box<[I]>where + T: IntoIterator<Item = I>,

Creates a value from an iterator. Read more
source§

impl<'a, C> FromUints<&'a Box<[<C as UintCast>::Uint]>> for &'a [C]where + C: UintCast,

source§

fn from_uints(uints: &'a Box<[<C as UintCast>::Uint]>) -> &'a [C]

Cast a collection of unsigned integers into an collection of colors.
source§

impl<'a, C> FromUints<&'a mut Box<[<C as UintCast>::Uint]>> for &'a mut [C]where + C: UintCast,

source§

fn from_uints(uints: &'a mut Box<[<C as UintCast>::Uint]>) -> &'a mut [C]

Cast a collection of unsigned integers into an collection of colors.
source§

impl<C> FromUints<Box<[<C as UintCast>::Uint]>> for Box<[C]>where + C: UintCast,

source§

fn from_uints(uints: Box<[<C as UintCast>::Uint]>) -> Box<[C]>

Cast a collection of unsigned integers into an collection of colors.
1.36.0 · source§

impl<F, A> Future for Box<F, A>where + F: Future + Unpin + ?Sized, + A: Allocator + 'static,

§

type Output = <F as Future>::Output

The type of value produced on completion.
source§

fn poll( + self: Pin<&mut Box<F, A>>, + cx: &mut Context<'_> +) -> Poll<<Box<F, A> as Future>::Output>

Attempt to resolve the future to a final value, registering +the current task for wakeup if the value is not yet available. Read more
source§

impl<T, A> Hash for Box<T, A>where + T: Hash + ?Sized, + A: Allocator,

source§

fn hash<H>(&self, state: &mut H)where + H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
1.22.0 · source§

impl<T, A> Hasher for Box<T, A>where + T: Hasher + ?Sized, + A: Allocator,

source§

fn finish(&self) -> u64

Returns the hash value for the values written so far. Read more
source§

fn write(&mut self, bytes: &[u8])

Writes some data into this Hasher. Read more
source§

fn write_u8(&mut self, i: u8)

Writes a single u8 into this hasher.
source§

fn write_u16(&mut self, i: u16)

Writes a single u16 into this hasher.
source§

fn write_u32(&mut self, i: u32)

Writes a single u32 into this hasher.
source§

fn write_u64(&mut self, i: u64)

Writes a single u64 into this hasher.
source§

fn write_u128(&mut self, i: u128)

Writes a single u128 into this hasher.
source§

fn write_usize(&mut self, i: usize)

Writes a single usize into this hasher.
source§

fn write_i8(&mut self, i: i8)

Writes a single i8 into this hasher.
source§

fn write_i16(&mut self, i: i16)

Writes a single i16 into this hasher.
source§

fn write_i32(&mut self, i: i32)

Writes a single i32 into this hasher.
source§

fn write_i64(&mut self, i: i64)

Writes a single i64 into this hasher.
source§

fn write_i128(&mut self, i: i128)

Writes a single i128 into this hasher.
source§

fn write_isize(&mut self, i: isize)

Writes a single isize into this hasher.
source§

fn write_length_prefix(&mut self, len: usize)

🔬This is a nightly-only experimental API. (hasher_prefixfree_extras)
Writes a length prefix into this hasher, as part of being prefix-free. Read more
source§

fn write_str(&mut self, s: &str)

🔬This is a nightly-only experimental API. (hasher_prefixfree_extras)
Writes a single str into this hasher. Read more
source§

impl<'a, T, C, const N: usize> IntoArrays<&'a [[T; N]]> for &'a Box<[C]>where + C: ArrayCast<Array = [T; N]>,

source§

fn into_arrays(self) -> &'a [[T; N]]

Cast this collection of colors into a collection of arrays.
source§

impl<'a, T, C, const N: usize> IntoArrays<&'a mut [[T; N]]> for &'a mut Box<[C]>where + C: ArrayCast<Array = [T; N]>,

source§

fn into_arrays(self) -> &'a mut [[T; N]]

Cast this collection of colors into a collection of arrays.
source§

impl<T, C, const N: usize> IntoArrays<Box<[[T; N]]>> for Box<[C]>where + C: ArrayCast<Array = [T; N]>,

source§

fn into_arrays(self) -> Box<[[T; N]]>

Cast this collection of colors into a collection of arrays.
source§

impl<'a, T, C> IntoComponents<&'a [T]> for &'a Box<[C]>where + T: 'a, + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

source§

fn into_components(self) -> &'a [T]

Cast this collection of colors into a collection of color components.
source§

impl<'a, T, C> IntoComponents<&'a mut [T]> for &'a mut Box<[C]>where + T: 'a, + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

source§

fn into_components(self) -> &'a mut [T]

Cast this collection of colors into a collection of color components.
source§

impl<T, C> IntoComponents<Box<[T]>> for Box<[C]>where + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

source§

fn into_components(self) -> Box<[T]>

Cast this collection of colors into a collection of color components.
source§

impl<'a, C> IntoUints<&'a [<C as UintCast>::Uint]> for &'a Box<[C]>where + C: UintCast,

source§

fn into_uints(self) -> &'a [<C as UintCast>::Uint]

Cast this collection of colors into a collection of unsigned integers.
source§

impl<'a, C> IntoUints<&'a mut [<C as UintCast>::Uint]> for &'a mut Box<[C]>where + C: UintCast,

source§

fn into_uints(self) -> &'a mut [<C as UintCast>::Uint]

Cast this collection of colors into a collection of unsigned integers.
source§

impl<C> IntoUints<Box<[<C as UintCast>::Uint]>> for Box<[C]>where + C: UintCast,

source§

fn into_uints(self) -> Box<[<C as UintCast>::Uint]>

Cast this collection of colors into a collection of unsigned integers.
source§

impl<I, A> Iterator for Box<I, A>where + I: Iterator + ?Sized, + A: Allocator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<<I as Iterator>::Item>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn nth(&mut self, n: usize) -> Option<<I as Iterator>::Item>

Returns the nth element of the iterator. Read more
source§

fn last(self) -> Option<<I as Iterator>::Item>

Consumes the iterator, returning the last element. Read more
source§

fn next_chunk<const N: usize>( + &mut self +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
source§

fn count(self) -> usizewhere + Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>where + Self: Sized, + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where + Self: Sized, + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>where + Self: Sized, + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
source§

fn map<B, F>(self, f: F) -> Map<Self, F>where + Self: Sized, + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)where + Self: Sized, + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
source§

fn enumerate(self) -> Enumerate<Self>where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
source§

fn peekable(self) -> Peekable<Self>where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods +to look at the next element of the iterator without consuming it. See +their documentation for more information. Read more
source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>where + Self: Sized, + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
source§

fn skip(self, n: usize) -> Skip<Self>where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where + Self: Sized, + U: IntoIterator, + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>where + Self: Sized, + F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over +self and returns an iterator over the outputs of f. Like slice::windows(), +the windows during mapping overlap as well. Read more
source§

fn fuse(self) -> Fuse<Self>where + Self: Sized,

Creates an iterator which ends after the first None. Read more
source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>where + Self: Sized, + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
source§

fn by_ref(&mut self) -> &mut Selfwhere + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
source§

fn collect<B>(self) -> Bwhere + B: FromIterator<Self::Item>, + Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut Ewhere + E: Extend<Self::Item>, + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
source§

fn partition<B, F>(self, f: F) -> (B, B)where + Self: Sized, + B: Default + Extend<Self::Item>, + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> boolwhere + Self: Sized, + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> Rwhere + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> Rwhere + Self: Sized, + F: FnMut(Self::Item) -> R, + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
source§

fn fold<B, F>(self, init: B, f: F) -> Bwhere + Self: Sized, + F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryTypewhere + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> R, + R: Try<Output = Self::Item>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
source§

fn all<F>(&mut self, f: F) -> boolwhere + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
source§

fn any<F>(&mut self, f: F) -> boolwhere + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn try_find<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryTypewhere + Self: Sized, + F: FnMut(&Self::Item) -> R, + R: Try<Output = bool>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
source§

fn position<P>(&mut self, predicate: P) -> Option<usize>where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>where + T: 'a + Copy, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>where + T: 'a + Clone, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> Swhere + Self: Sized, + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> Pwhere + Self: Sized, + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Orderingwhere + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Lexicographically compares the PartialOrd elements of +this Iterator with those of another. The comparison works like short-circuit +evaluation, returning a result without comparing the remaining elements. +As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> boolwhere + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> boolwhere + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> boolwhere + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> boolwhere + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> boolwhere + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> boolwhere + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> boolwhere + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> boolwhere + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> boolwhere + Self: Sized, + F: FnMut(Self::Item) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more
source§

impl<T, A> Ord for Box<T, A>where + T: Ord + ?Sized, + A: Allocator,

source§

fn cmp(&self, other: &Box<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<T, A> PartialEq for Box<T, A>where + T: PartialEq + ?Sized, + A: Allocator,

source§

fn eq(&self, other: &Box<T, A>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
source§

fn ne(&self, other: &Box<T, A>) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T, A> PartialOrd for Box<T, A>where + T: PartialOrd + ?Sized, + A: Allocator,

source§

fn partial_cmp(&self, other: &Box<T, A>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

fn lt(&self, other: &Box<T, A>) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, other: &Box<T, A>) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
source§

fn ge(&self, other: &Box<T, A>) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

fn gt(&self, other: &Box<T, A>) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
source§

impl<T, A> Pointer for Box<T, A>where + A: Allocator, + T: ?Sized,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter.
source§

impl<R> Read for Box<R>where + R: Read + ?Sized,

source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>

Pull some bytes from this source into the specified buffer, returning +how many bytes were read. Read more
source§

fn read_buf(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
source§

fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

Like read, except that it reads into a slice of buffers. Read more
source§

fn is_read_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored +implementation. Read more
source§

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

Read all bytes until EOF in this source, placing them into buf. Read more
source§

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

Read all bytes until EOF in this source, appending them to buf. Read more
source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Read the exact number of bytes required to fill buf. Read more
source§

fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Read the exact number of bytes required to fill cursor. Read more
source§

fn by_ref(&mut self) -> &mut Selfwhere + Self: Sized,

Creates a “by reference” adaptor for this instance of Read. Read more
source§

fn bytes(self) -> Bytes<Self>where + Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
source§

fn chain<R>(self, next: R) -> Chain<Self, R>where + R: Read, + Self: Sized,

Creates an adapter which will chain this stream with another. Read more
source§

fn take(self, limit: u64) -> Take<Self>where + Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
source§

impl<R> RngCore for Box<R>where + R: RngCore + ?Sized,

source§

fn next_u32(&mut self) -> u32

Return the next random u32. Read more
source§

fn next_u64(&mut self) -> u64

Return the next random u64. Read more
source§

fn fill_bytes(&mut self, dest: &mut [u8])

Fill dest with random data. Read more
source§

fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>

Fill dest entirely with random data. Read more
source§

impl<S> Seek for Box<S>where + S: Seek + ?Sized,

source§

fn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>

Seek to an offset, in bytes, in a stream. Read more
source§

fn stream_position(&mut self) -> Result<u64, Error>

Returns the current seek position from the start of the stream. Read more
1.55.0 · source§

fn rewind(&mut self) -> Result<(), Error>

Rewind to the beginning of a stream. Read more
source§

fn stream_len(&mut self) -> Result<u64, Error>

🔬This is a nightly-only experimental API. (seek_stream_len)
Returns the length of this stream (in bytes). Read more
source§

impl<T> Serialize for Box<T>where + T: Serialize + ?Sized,

source§

fn serialize<S>( + &self, + serializer: S +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl<S> Subscriber for Box<S>where + S: Subscriber + ?Sized,

§

fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest

Registers a new callsite with this subscriber, returning whether or not +the subscriber is interested in being notified about the callsite. Read more
§

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Returns true if a span or event with the specified metadata would be +recorded. Read more
§

fn max_level_hint(&self) -> Option<LevelFilter>

Returns the highest verbosity level that this Subscriber will +enable, or None, if the subscriber does not implement level-based +filtering or chooses not to implement this method. Read more
§

fn new_span(&self, span: &Attributes<'_>) -> Id

Visit the construction of a new span, returning a new span ID for the +span being constructed. Read more
§

fn record(&self, span: &Id, values: &Record<'_>)

Record a set of values on a span. Read more
§

fn record_follows_from(&self, span: &Id, follows: &Id)

Adds an indication that span follows from the span with the id +follows. Read more
§

fn event_enabled(&self, event: &Event<'_>) -> bool

Determine if an [Event] should be recorded. Read more
§

fn event(&self, event: &Event<'_>)

Records that an Event has occurred. Read more
§

fn enter(&self, span: &Id)

Records that a span has been entered. Read more
§

fn exit(&self, span: &Id)

Records that a span has been exited. Read more
§

fn clone_span(&self, id: &Id) -> Id

Notifies the subscriber that a span ID has been cloned. Read more
§

fn try_close(&self, id: Id) -> bool

Notifies the subscriber that a span ID has been dropped, and returns +true if there are now 0 IDs that refer to that span. Read more
§

fn drop_span(&self, id: Id)

👎Deprecated since 0.1.2: use Subscriber::try_close instead
This method is deprecated. Read more
§

fn current_span(&self) -> Current

Returns a type representing this subscriber’s view of the current span. Read more
§

unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>

If self is the same type as the provided TypeId, returns an untyped +*const pointer to that type. Otherwise, returns None. Read more
§

fn on_register_dispatch(&self, subscriber: &Dispatch)

Invoked when this subscriber becomes a [Dispatch]. Read more
source§

impl<'a, T, C, const N: usize> TryComponentsAs<[C]> for Box<[T]>where + C: ArrayCast<Array = [T; N]>,

§

type Error = SliceCastError

The error for when try_components_as fails to cast.
source§

fn try_components_as( + &self +) -> Result<&[C], <Box<[T]> as TryComponentsAs<[C]>>::Error>

Try to cast this collection of color components into a reference to a +collection of colors. Read more
source§

impl<'a, T, C, const N: usize> TryComponentsAsMut<[C]> for Box<[T]>where + C: ArrayCast<Array = [T; N]>,

§

type Error = SliceCastError

The error for when try_components_as_mut fails to cast.
source§

fn try_components_as_mut( + &mut self +) -> Result<&mut [C], <Box<[T]> as TryComponentsAsMut<[C]>>::Error>

Try to cast this collection of color components into a mutable reference +to a collection of colors. Read more
1.43.0 · source§

impl<T, const N: usize> TryFrom<Box<[T]>> for Box<[T; N]>

source§

fn try_from( + boxed_slice: Box<[T]> +) -> Result<Box<[T; N]>, <Box<[T; N]> as TryFrom<Box<[T]>>>::Error>

Attempts to convert a Box<[T]> into a Box<[T; N]>.

+

The conversion occurs in-place and does not require a +new memory allocation.

+
Errors
+

Returns the old Box<[T]> in the Err variant if +boxed_slice.len() does not equal N.

+
§

type Error = Box<[T]>

The type returned in the event of a conversion error.
1.66.0 · source§

impl<T, const N: usize> TryFrom<Vec<T>> for Box<[T; N]>

source§

fn try_from( + vec: Vec<T> +) -> Result<Box<[T; N]>, <Box<[T; N]> as TryFrom<Vec<T>>>::Error>

Attempts to convert a Vec<T> into a Box<[T; N]>.

+

Like Vec::into_boxed_slice, this is in-place if vec.capacity() == N, +but will require a reallocation otherwise.

+
Errors
+

Returns the original Vec<T> in the Err variant if +boxed_slice.len() does not equal N.

+
Examples
+

This can be used with vec! to create an array on the heap:

+ +
let state: Box<[f32; 100]> = vec![1.0; 100].try_into().unwrap();
+assert_eq!(state.len(), 100);
+
§

type Error = Vec<T>

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

impl<'a, T, C> TryFromComponents<&'a Box<[T]>> for &'a [C]where + T: 'a, + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

§

type Error = SliceCastError

The error for when try_from_components fails to cast.
source§

fn try_from_components( + components: &'a Box<[T]> +) -> Result<&'a [C], <&'a [C] as TryFromComponents<&'a Box<[T]>>>::Error>

Try to cast a collection of color components into an collection of +colors. Read more
source§

impl<'a, T, C> TryFromComponents<&'a mut Box<[T]>> for &'a mut [C]where + T: 'a, + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

§

type Error = SliceCastError

The error for when try_from_components fails to cast.
source§

fn try_from_components( + components: &'a mut Box<[T]> +) -> Result<&'a mut [C], <&'a mut [C] as TryFromComponents<&'a mut Box<[T]>>>::Error>

Try to cast a collection of color components into an collection of +colors. Read more
source§

impl<T, C> TryFromComponents<Box<[T]>> for Box<[C]>where + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

§

type Error = BoxedSliceCastError<T>

The error for when try_from_components fails to cast.
source§

fn try_from_components( + components: Box<[T]> +) -> Result<Box<[C]>, <Box<[C]> as TryFromComponents<Box<[T]>>>::Error>

Try to cast a collection of color components into an collection of +colors. Read more
source§

impl<'a, C> UintsAs<[C]> for Box<[<C as UintCast>::Uint]>where + C: UintCast,

source§

fn uints_as(&self) -> &[C]

Cast this collection of unsigned integers into a collection of colors.
source§

impl<'a, C> UintsAsMut<[C]> for Box<[<C as UintCast>::Uint]>where + C: UintCast,

source§

fn uints_as_mut(&mut self) -> &mut [C]

Cast this collection of unsigned integers into a mutable collection of colors.
§

impl Validate for Box<RawValue>

§

fn validate<P, R>(&self, _: &Root, _: P, _: &mut R)where + P: Fn() -> Path, + R: FnMut(&dyn Fn() -> Path, Error),

Validates the invariants required for the library to function safely.
§

impl<T> Value for Box<T>where + T: Value + ?Sized,

§

fn record(&self, key: &Field, visitor: &mut dyn Visit)

Visits this value with the given Visitor.
source§

impl<W> Write for Box<W>where + W: Write + ?Sized,

source§

fn write(&mut self, buf: &[u8]) -> Result<usize, Error>

Write a buffer into this writer, returning how many bytes were written. Read more
source§

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes from a slice of buffers. Read more
source§

fn is_write_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored +implementation. Read more
source§

fn flush(&mut self) -> Result<(), Error>

Flush this output stream, ensuring that all intermediately buffered +contents reach their destination. Read more
source§

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

Attempts to write an entire buffer into this writer. Read more
source§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error +encountered. Read more
source§

fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>

🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
source§

fn by_ref(&mut self) -> &mut Selfwhere + Self: Sized,

Creates a “by reference” adapter for this instance of Write. Read more
source§

impl<T, U, A> CoerceUnsized<Box<U, A>> for Box<T, A>where + T: Unsize<U> + ?Sized, + A: Allocator, + U: ?Sized,

source§

impl<R> CryptoRng for Box<R>where + R: CryptoRng + ?Sized,

source§

impl<T, U> DispatchFromDyn<Box<U>> for Box<T>where + T: Unsize<U> + ?Sized, + U: ?Sized,

source§

impl<T, A> Eq for Box<T, A>where + T: Eq + ?Sized, + A: Allocator,

1.26.0 · source§

impl<I, A> FusedIterator for Box<I, A>where + I: FusedIterator + ?Sized, + A: Allocator,

1.33.0 · source§

impl<T, A> Unpin for Box<T, A>where + A: Allocator + 'static, + T: ?Sized,

§

impl<T> ZeroableInOption for Box<T>where + T: ?Sized,

Auto Trait Implementations§

§

impl<T: ?Sized, A> RefUnwindSafe for Box<T, A>where + A: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<T: ?Sized, A> Send for Box<T, A>where + A: Send, + T: Send,

§

impl<T: ?Sized, A> Sync for Box<T, A>where + A: Sync, + T: Sync,

§

impl<T: ?Sized, A> UnwindSafe for Box<T, A>where + A: UnwindSafe, + T: UnwindSafe,

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<C, F> BlendFunction<C> for Fwhere + C: Premultiply, + F: FnOnce(PreAlpha<C>, PreAlpha<C>) -> PreAlpha<C>,

source§

fn apply_to(self, source: PreAlpha<C>, destination: PreAlpha<C>) -> PreAlpha<C>

Apply this blend function to a pair of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> CryptoRngCore for Twhere + T: CryptoRng + RngCore,

source§

fn as_rngcore(&mut self) -> &mut dyn RngCore

Upcast to an RngCore trait object.
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<F> IntoFuture for Fwhere + F: Future,

§

type Output = <F as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = F

Which kind of future are we turning this into?
source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
source§

impl<I> IntoIterator for Iwhere + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<I> IteratorRandom for Iwhere + I: Iterator,

source§

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>where + R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>where + R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usizewhere + R: Rng + ?Sized,

Collects values at random from the iterator into a supplied buffer +until that buffer is filled. Read more
source§

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>where + R: Rng + ?Sized,

Collects amount values at random from the iterator into a vector. Read more
source§

impl<'a, F> Pattern<'a> for Fwhere + F: FnMut(char) -> bool,

§

type Searcher = CharPredicateSearcher<'a, F>

🔬This is a nightly-only experimental API. (pattern)
Associated searcher for this pattern
source§

fn into_searcher(self, haystack: &'a str) -> CharPredicateSearcher<'a, F>

🔬This is a nightly-only experimental API. (pattern)
Constructs the associated searcher from +self and the haystack to search in.
source§

fn is_contained_in(self, haystack: &'a str) -> bool

🔬This is a nightly-only experimental API. (pattern)
Checks whether the pattern matches anywhere in the haystack
source§

fn is_prefix_of(self, haystack: &'a str) -> bool

🔬This is a nightly-only experimental API. (pattern)
Checks whether the pattern matches at the front of the haystack
source§

fn strip_prefix_of(self, haystack: &'a str) -> Option<&'a str>

🔬This is a nightly-only experimental API. (pattern)
Removes the pattern from the front of haystack, if it matches.
source§

fn is_suffix_of(self, haystack: &'a str) -> boolwhere + CharPredicateSearcher<'a, F>: ReverseSearcher<'a>,

🔬This is a nightly-only experimental API. (pattern)
Checks whether the pattern matches at the back of the haystack
source§

fn strip_suffix_of(self, haystack: &'a str) -> Option<&'a str>where + CharPredicateSearcher<'a, F>: ReverseSearcher<'a>,

🔬This is a nightly-only experimental API. (pattern)
Removes the pattern from the back of haystack, if it matches.
§

impl<R> ReadBytesExt for Rwhere + R: Read + ?Sized,

§

fn read_u8(&mut self) -> Result<u8, Error>

Reads an unsigned 8 bit integer from the underlying reader. Read more
§

fn read_i8(&mut self) -> Result<i8, Error>

Reads a signed 8 bit integer from the underlying reader. Read more
§

fn read_u16<T>(&mut self) -> Result<u16, Error>where + T: ByteOrder,

Reads an unsigned 16 bit integer from the underlying reader. Read more
§

fn read_i16<T>(&mut self) -> Result<i16, Error>where + T: ByteOrder,

Reads a signed 16 bit integer from the underlying reader. Read more
§

fn read_u24<T>(&mut self) -> Result<u32, Error>where + T: ByteOrder,

Reads an unsigned 24 bit integer from the underlying reader. Read more
§

fn read_i24<T>(&mut self) -> Result<i32, Error>where + T: ByteOrder,

Reads a signed 24 bit integer from the underlying reader. Read more
§

fn read_u32<T>(&mut self) -> Result<u32, Error>where + T: ByteOrder,

Reads an unsigned 32 bit integer from the underlying reader. Read more
§

fn read_i32<T>(&mut self) -> Result<i32, Error>where + T: ByteOrder,

Reads a signed 32 bit integer from the underlying reader. Read more
§

fn read_u48<T>(&mut self) -> Result<u64, Error>where + T: ByteOrder,

Reads an unsigned 48 bit integer from the underlying reader. Read more
§

fn read_i48<T>(&mut self) -> Result<i64, Error>where + T: ByteOrder,

Reads a signed 48 bit integer from the underlying reader. Read more
§

fn read_u64<T>(&mut self) -> Result<u64, Error>where + T: ByteOrder,

Reads an unsigned 64 bit integer from the underlying reader. Read more
§

fn read_i64<T>(&mut self) -> Result<i64, Error>where + T: ByteOrder,

Reads a signed 64 bit integer from the underlying reader. Read more
§

fn read_u128<T>(&mut self) -> Result<u128, Error>where + T: ByteOrder,

Reads an unsigned 128 bit integer from the underlying reader. Read more
§

fn read_i128<T>(&mut self) -> Result<i128, Error>where + T: ByteOrder,

Reads a signed 128 bit integer from the underlying reader. Read more
§

fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>where + T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader. Read more
§

fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>where + T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader. Read more
§

fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>where + T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader.
§

fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>where + T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader.
§

fn read_f32<T>(&mut self) -> Result<f32, Error>where + T: ByteOrder,

Reads a IEEE754 single-precision (4 bytes) floating point number from +the underlying reader. Read more
§

fn read_f64<T>(&mut self) -> Result<f64, Error>where + T: ByteOrder,

Reads a IEEE754 double-precision (8 bytes) floating point number from +the underlying reader. Read more
§

fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error>where + T: ByteOrder,

Reads a sequence of unsigned 16 bit integers from the underlying +reader. Read more
§

fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error>where + T: ByteOrder,

Reads a sequence of unsigned 32 bit integers from the underlying +reader. Read more
§

fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error>where + T: ByteOrder,

Reads a sequence of unsigned 64 bit integers from the underlying +reader. Read more
§

fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error>where + T: ByteOrder,

Reads a sequence of unsigned 128 bit integers from the underlying +reader. Read more
§

fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>

Reads a sequence of signed 8 bit integers from the underlying reader. Read more
§

fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error>where + T: ByteOrder,

Reads a sequence of signed 16 bit integers from the underlying +reader. Read more
§

fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error>where + T: ByteOrder,

Reads a sequence of signed 32 bit integers from the underlying +reader. Read more
§

fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error>where + T: ByteOrder,

Reads a sequence of signed 64 bit integers from the underlying +reader. Read more
§

fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error>where + T: ByteOrder,

Reads a sequence of signed 128 bit integers from the underlying +reader. Read more
§

fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where + T: ByteOrder,

Reads a sequence of IEEE754 single-precision (4 bytes) floating +point numbers from the underlying reader. Read more
§

fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where + T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f32_into instead
DEPRECATED. Read more
§

fn read_f64_into<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>where + T: ByteOrder,

Reads a sequence of IEEE754 double-precision (8 bytes) floating +point numbers from the underlying reader. Read more
§

fn read_f64_into_unchecked<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>where + T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f64_into instead
DEPRECATED. Read more
source§

impl<R> Rng for Rwhere + R: RngCore + ?Sized,

source§

fn gen<T>(&mut self) -> Twhere + Standard: Distribution<T>,

Return a random value supporting the Standard distribution. Read more
source§

fn gen_range<T, R>(&mut self, range: R) -> Twhere + T: SampleUniform, + R: SampleRange<T>,

Generate a random value in the given range. Read more
source§

fn sample<T, D>(&mut self, distr: D) -> Twhere + D: Distribution<T>,

Sample a new value, using the given distribution. Read more
source§

fn sample_iter<T, D>(self, distr: D) -> DistIter<D, Self, T>where + D: Distribution<T>, + Self: Sized,

Create an iterator that generates values using the given distribution. Read more
source§

fn fill<T>(&mut self, dest: &mut T)where + T: Fill + ?Sized,

Fill any type implementing Fill with random data Read more
source§

fn try_fill<T>(&mut self, dest: &mut T) -> Result<(), Error>where + T: Fill + ?Sized,

Fill any type implementing Fill with random data Read more
source§

fn gen_bool(&mut self, p: f64) -> bool

Return a bool with a probability p of being true. Read more
source§

fn gen_ratio(&mut self, numerator: u32, denominator: u32) -> bool

Return a bool with a probability of numerator/denominator of being +true. I.e. gen_ratio(2, 3) has chance of 2 in 3, or about 67%, of +returning true. If numerator == denominator, then the returned value +is guaranteed to be true. If numerator == 0, then the returned +value is guaranteed to be false. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<F> Visit for Fwhere + F: FnMut(&Field, &dyn Debug),

§

fn record_debug(&mut self, field: &Field, value: &dyn Debug)

Visit a value implementing fmt::Debug.
§

fn record_f64(&mut self, field: &Field, value: f64)

Visit a double-precision floating point value.
§

fn record_i64(&mut self, field: &Field, value: i64)

Visit a signed 64-bit integer value.
§

fn record_u64(&mut self, field: &Field, value: u64)

Visit an unsigned 64-bit integer value.
§

fn record_i128(&mut self, field: &Field, value: i128)

Visit a signed 128-bit integer value.
§

fn record_u128(&mut self, field: &Field, value: u128)

Visit an unsigned 128-bit integer value.
§

fn record_bool(&mut self, field: &Field, value: bool)

Visit a boolean value.
§

fn record_str(&mut self, field: &Field, value: &str)

Visit a string value.
§

fn record_error(&mut self, field: &Field, value: &(dyn Error + 'static))

Records a type implementing Error.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<W> WriteBytesExt for Wwhere + W: Write + ?Sized,

§

fn write_u8(&mut self, n: u8) -> Result<(), Error>

Writes an unsigned 8 bit integer to the underlying writer. Read more
§

fn write_i8(&mut self, n: i8) -> Result<(), Error>

Writes a signed 8 bit integer to the underlying writer. Read more
§

fn write_u16<T>(&mut self, n: u16) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 16 bit integer to the underlying writer. Read more
§

fn write_i16<T>(&mut self, n: i16) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 16 bit integer to the underlying writer. Read more
§

fn write_u24<T>(&mut self, n: u32) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 24 bit integer to the underlying writer. Read more
§

fn write_i24<T>(&mut self, n: i32) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 24 bit integer to the underlying writer. Read more
§

fn write_u32<T>(&mut self, n: u32) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 32 bit integer to the underlying writer. Read more
§

fn write_i32<T>(&mut self, n: i32) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 32 bit integer to the underlying writer. Read more
§

fn write_u48<T>(&mut self, n: u64) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 48 bit integer to the underlying writer. Read more
§

fn write_i48<T>(&mut self, n: i64) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 48 bit integer to the underlying writer. Read more
§

fn write_u64<T>(&mut self, n: u64) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 64 bit integer to the underlying writer. Read more
§

fn write_i64<T>(&mut self, n: i64) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 64 bit integer to the underlying writer. Read more
§

fn write_u128<T>(&mut self, n: u128) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 128 bit integer to the underlying writer.
§

fn write_i128<T>(&mut self, n: i128) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 128 bit integer to the underlying writer.
§

fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned n-bytes integer to the underlying writer. Read more
§

fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error>where + T: ByteOrder,

Writes a signed n-bytes integer to the underlying writer. Read more
§

fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned n-bytes integer to the underlying writer. Read more
§

fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error>where + T: ByteOrder,

Writes a signed n-bytes integer to the underlying writer. Read more
§

fn write_f32<T>(&mut self, n: f32) -> Result<(), Error>where + T: ByteOrder,

Writes a IEEE754 single-precision (4 bytes) floating point number to +the underlying writer. Read more
§

fn write_f64<T>(&mut self, n: f64) -> Result<(), Error>where + T: ByteOrder,

Writes a IEEE754 double-precision (8 bytes) floating point number to +the underlying writer. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

source§

impl<T> NumBytes for Twhere + T: Debug + AsRef<[u8]> + AsMut<[u8]> + PartialEq + Eq + PartialOrd + Ord + Hash + Borrow<[u8]> + BorrowMut<[u8]> + ?Sized,

source§

impl<T> Scalar for Twhere + T: 'static + Clone + PartialEq + Debug,

\ No newline at end of file diff --git a/clovers/struct.RenderOpts.html b/clovers/struct.RenderOpts.html new file mode 100644 index 00000000..1f1d7cdd --- /dev/null +++ b/clovers/struct.RenderOpts.html @@ -0,0 +1,60 @@ +RenderOpts in clovers - Rust

Struct clovers::RenderOpts

source ·
pub struct RenderOpts {
+    pub width: u32,
+    pub height: u32,
+    pub samples: u32,
+    pub max_depth: u32,
+    pub quiet: bool,
+    pub normalmap: bool,
+}
Expand description

Rendering options struct

+

Fields§

§width: u32

Width of the render in pixels

+
§height: u32

Height of the render in pixels

+
§samples: u32

Samples per pixel to render for multisampling. Higher number implies higher quality.

+
§max_depth: u32

Maximum ray bounce depth. Higher number implies higher quality.

+
§quiet: bool

Optionally, suppress CLI output

+
§normalmap: bool

Experimental render mode: return a normal map only instead of doing a full path trace render.

+

Trait Implementations§

source§

impl Clone for RenderOpts

source§

fn clone(&self) -> RenderOpts

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RenderOpts

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RenderOpts

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for RenderOpts

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/struct.Vec.html b/clovers/struct.Vec.html new file mode 100644 index 00000000..f0a7f265 --- /dev/null +++ b/clovers/struct.Vec.html @@ -0,0 +1,3991 @@ +Vec in clovers - Rust

Struct clovers::Vec

1.0.0 · source ·
pub struct Vec<T, A = Global>where
+    A: Allocator,{ /* private fields */ }
Expand description

A contiguous growable array type, written as Vec<T>, short for ‘vector’.

+

Examples

+
let mut vec = Vec::new();
+vec.push(1);
+vec.push(2);
+
+assert_eq!(vec.len(), 2);
+assert_eq!(vec[0], 1);
+
+assert_eq!(vec.pop(), Some(2));
+assert_eq!(vec.len(), 1);
+
+vec[0] = 7;
+assert_eq!(vec[0], 7);
+
+vec.extend([1, 2, 3]);
+
+for x in &vec {
+    println!("{x}");
+}
+assert_eq!(vec, [7, 1, 2, 3]);
+

The vec! macro is provided for convenient initialization:

+ +
let mut vec1 = vec![1, 2, 3];
+vec1.push(4);
+let vec2 = Vec::from([1, 2, 3, 4]);
+assert_eq!(vec1, vec2);
+

It can also initialize each element of a Vec<T> with a given value. +This may be more efficient than performing allocation and initialization +in separate steps, especially when initializing a vector of zeros:

+ +
let vec = vec![0; 5];
+assert_eq!(vec, [0, 0, 0, 0, 0]);
+
+// The following is equivalent, but potentially slower:
+let mut vec = Vec::with_capacity(5);
+vec.resize(5, 0);
+assert_eq!(vec, [0, 0, 0, 0, 0]);
+

For more information, see +Capacity and Reallocation.

+

Use a Vec<T> as an efficient stack:

+ +
let mut stack = Vec::new();
+
+stack.push(1);
+stack.push(2);
+stack.push(3);
+
+while let Some(top) = stack.pop() {
+    // Prints 3, 2, 1
+    println!("{top}");
+}
+

Indexing

+

The Vec type allows access to values by index, because it implements the +Index trait. An example will be more explicit:

+ +
let v = vec![0, 2, 4, 6];
+println!("{}", v[1]); // it will display '2'
+

However be careful: if you try to access an index which isn’t in the Vec, +your software will panic! You cannot do this:

+ +
let v = vec![0, 2, 4, 6];
+println!("{}", v[6]); // it will panic!
+

Use get and get_mut if you want to check whether the index is in +the Vec.

+

Slicing

+

A Vec can be mutable. On the other hand, slices are read-only objects. +To get a slice, use &. Example:

+ +
fn read_slice(slice: &[usize]) {
+    // ...
+}
+
+let v = vec![0, 1];
+read_slice(&v);
+
+// ... and that's all!
+// you can also do it like this:
+let u: &[usize] = &v;
+// or like this:
+let u: &[_] = &v;
+

In Rust, it’s more common to pass slices as arguments rather than vectors +when you just want to provide read access. The same goes for String and +&str.

+

Capacity and reallocation

+

The capacity of a vector is the amount of space allocated for any future +elements that will be added onto the vector. This is not to be confused with +the length of a vector, which specifies the number of actual elements +within the vector. If a vector’s length exceeds its capacity, its capacity +will automatically be increased, but its elements will have to be +reallocated.

+

For example, a vector with capacity 10 and length 0 would be an empty vector +with space for 10 more elements. Pushing 10 or fewer elements onto the +vector will not change its capacity or cause reallocation to occur. However, +if the vector’s length is increased to 11, it will have to reallocate, which +can be slow. For this reason, it is recommended to use Vec::with_capacity +whenever possible to specify how big the vector is expected to get.

+

Guarantees

+

Due to its incredibly fundamental nature, Vec makes a lot of guarantees +about its design. This ensures that it’s as low-overhead as possible in +the general case, and can be correctly manipulated in primitive ways +by unsafe code. Note that these guarantees refer to an unqualified Vec<T>. +If additional type parameters are added (e.g., to support custom allocators), +overriding their defaults may change the behavior.

+

Most fundamentally, Vec is and always will be a (pointer, capacity, length) +triplet. No more, no less. The order of these fields is completely +unspecified, and you should use the appropriate methods to modify these. +The pointer will never be null, so this type is null-pointer-optimized.

+

However, the pointer might not actually point to allocated memory. In particular, +if you construct a Vec with capacity 0 via Vec::new, vec![], +Vec::with_capacity(0), or by calling shrink_to_fit +on an empty Vec, it will not allocate memory. Similarly, if you store zero-sized +types inside a Vec, it will not allocate space for them. Note that in this case +the Vec might not report a capacity of 0. Vec will allocate if and only +if mem::size_of::<T>() * capacity() > 0. In general, Vec’s allocation +details are very subtle — if you intend to allocate memory using a Vec +and use it for something else (either to pass to unsafe code, or to build your +own memory-backed collection), be sure to deallocate this memory by using +from_raw_parts to recover the Vec and then dropping it.

+

If a Vec has allocated memory, then the memory it points to is on the heap +(as defined by the allocator Rust is configured to use by default), and its +pointer points to len initialized, contiguous elements in order (what +you would see if you coerced it to a slice), followed by capacity - len +logically uninitialized, contiguous elements.

+

A vector containing the elements 'a' and 'b' with capacity 4 can be +visualized as below. The top part is the Vec struct, it contains a +pointer to the head of the allocation in the heap, length and capacity. +The bottom part is the allocation on the heap, a contiguous memory block.

+
            ptr      len  capacity
+       +--------+--------+--------+
+       | 0x0123 |      2 |      4 |
+       +--------+--------+--------+
+            |
+            v
+Heap   +--------+--------+--------+--------+
+       |    'a' |    'b' | uninit | uninit |
+       +--------+--------+--------+--------+
+
+
    +
  • uninit represents memory that is not initialized, see MaybeUninit.
  • +
  • Note: the ABI is not stable and Vec makes no guarantees about its memory +layout (including the order of fields).
  • +
+

Vec will never perform a “small optimization” where elements are actually +stored on the stack for two reasons:

+
    +
  • +

    It would make it more difficult for unsafe code to correctly manipulate +a Vec. The contents of a Vec wouldn’t have a stable address if it were +only moved, and it would be more difficult to determine if a Vec had +actually allocated memory.

    +
  • +
  • +

    It would penalize the general case, incurring an additional branch +on every access.

    +
  • +
+

Vec will never automatically shrink itself, even if completely empty. This +ensures no unnecessary allocations or deallocations occur. Emptying a Vec +and then filling it back up to the same len should incur no calls to +the allocator. If you wish to free up unused memory, use +shrink_to_fit or shrink_to.

+

push and insert will never (re)allocate if the reported capacity is +sufficient. push and insert will (re)allocate if +len == capacity. That is, the reported capacity is completely +accurate, and can be relied on. It can even be used to manually free the memory +allocated by a Vec if desired. Bulk insertion methods may reallocate, even +when not necessary.

+

Vec does not guarantee any particular growth strategy when reallocating +when full, nor when reserve is called. The current strategy is basic +and it may prove desirable to use a non-constant growth factor. Whatever +strategy is used will of course guarantee O(1) amortized push.

+

vec![x; n], vec![a, b, c, d], and +Vec::with_capacity(n), will all produce a Vec +with exactly the requested capacity. If len == capacity, +(as is the case for the vec! macro), then a Vec<T> can be converted to +and from a Box<[T]> without reallocating or moving the elements.

+

Vec will not specifically overwrite any data that is removed from it, +but also won’t specifically preserve it. Its uninitialized memory is +scratch space that it may use however it wants. It will generally just do +whatever is most efficient or otherwise easy to implement. Do not rely on +removed data to be erased for security purposes. Even if you drop a Vec, its +buffer may simply be reused by another allocation. Even if you zero a Vec’s memory +first, that might not actually happen because the optimizer does not consider +this a side-effect that must be preserved. There is one case which we will +not break, however: using unsafe code to write to the excess capacity, +and then increasing the length to match, is always valid.

+

Currently, Vec does not guarantee the order in which elements are dropped. +The order has changed in the past and may change again.

+

Implementations§

source§

impl<T> Vec<T>

const: 1.39.0 · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

+

The vector will not allocate until elements are pushed onto it.

+
Examples
+
let mut vec: Vec<i32> = Vec::new();
+
source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

+

The vector will be able to hold at least capacity elements without +reallocating. This method is allowed to allocate for more elements than +capacity. If capacity is 0, the vector will not allocate.

+

It is important to note that although the returned vector has the +minimum capacity specified, the vector will have a zero length. For +an explanation of the difference between length and capacity, see +Capacity and reallocation.

+

If it is important to know the exact allocated capacity of a Vec, +always use the capacity method after construction.

+

For Vec<T> where T is a zero-sized type, there will be no allocation +and the capacity will always be usize::MAX.

+
Panics
+

Panics if the new capacity exceeds isize::MAX bytes.

+
Examples
+
let mut vec = Vec::with_capacity(10);
+
+// The vector contains no items, even though it has capacity for more
+assert_eq!(vec.len(), 0);
+assert!(vec.capacity() >= 10);
+
+// These are all done without reallocating...
+for i in 0..10 {
+    vec.push(i);
+}
+assert_eq!(vec.len(), 10);
+assert!(vec.capacity() >= 10);
+
+// ...but this may make the vector reallocate
+vec.push(11);
+assert_eq!(vec.len(), 11);
+assert!(vec.capacity() >= 11);
+
+// A vector of a zero-sized type will always over-allocate, since no
+// allocation is necessary
+let vec_units = Vec::<()>::with_capacity(10);
+assert_eq!(vec_units.capacity(), usize::MAX);
+
source

pub unsafe fn from_raw_parts( + ptr: *mut T, + length: usize, + capacity: usize +) -> Vec<T>

Creates a Vec<T> directly from a pointer, a capacity, and a length.

+
Safety
+

This is highly unsafe, due to the number of invariants that aren’t +checked:

+
    +
  • ptr must have been allocated using the global allocator, such as via +the alloc::alloc function.
  • +
  • T needs to have the same alignment as what ptr was allocated with. +(T having a less strict alignment is not sufficient, the alignment really +needs to be equal to satisfy the dealloc requirement that memory must be +allocated and deallocated with the same layout.)
  • +
  • The size of T times the capacity (ie. the allocated size in bytes) needs +to be the same size as the pointer was allocated with. (Because similar to +alignment, dealloc must be called with the same layout size.)
  • +
  • length needs to be less than or equal to capacity.
  • +
  • The first length values must be properly initialized values of type T.
  • +
  • capacity needs to be the capacity that the pointer was allocated with.
  • +
  • The allocated size in bytes must be no larger than isize::MAX. +See the safety documentation of pointer::offset.
  • +
+

These requirements are always upheld by any ptr that has been allocated +via Vec<T>. Other allocation sources are allowed if the invariants are +upheld.

+

Violating these may cause problems like corrupting the allocator’s +internal data structures. For example it is normally not safe +to build a Vec<u8> from a pointer to a C char array with length +size_t, doing so is only safe if the array was initially allocated by +a Vec or String. +It’s also not safe to build one from a Vec<u16> and its length, because +the allocator cares about the alignment, and these two types have different +alignments. The buffer was allocated with alignment 2 (for u16), but after +turning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid +these issues, it is often preferable to do casting/transmuting using +slice::from_raw_parts instead.

+

The ownership of ptr is effectively transferred to the +Vec<T> which may then deallocate, reallocate or change the +contents of memory pointed to by the pointer at will. Ensure +that nothing else uses the pointer after calling this +function.

+
Examples
+
use std::ptr;
+use std::mem;
+
+let v = vec![1, 2, 3];
+
+// Prevent running `v`'s destructor so we are in complete control
+// of the allocation.
+let mut v = mem::ManuallyDrop::new(v);
+
+// Pull out the various important pieces of information about `v`
+let p = v.as_mut_ptr();
+let len = v.len();
+let cap = v.capacity();
+
+unsafe {
+    // Overwrite memory with 4, 5, 6
+    for i in 0..len {
+        ptr::write(p.add(i), 4 + i);
+    }
+
+    // Put everything back together into a Vec
+    let rebuilt = Vec::from_raw_parts(p, len, cap);
+    assert_eq!(rebuilt, [4, 5, 6]);
+}
+

Using memory that was allocated elsewhere:

+ +
use std::alloc::{alloc, Layout};
+
+fn main() {
+    let layout = Layout::array::<u32>(16).expect("overflow cannot happen");
+
+    let vec = unsafe {
+        let mem = alloc(layout).cast::<u32>();
+        if mem.is_null() {
+            return;
+        }
+
+        mem.write(1_000_000);
+
+        Vec::from_raw_parts(mem, 1, 16)
+    };
+
+    assert_eq!(vec, &[1_000_000]);
+    assert_eq!(vec.capacity(), 16);
+}
+
source§

impl<T, A> Vec<T, A>where + A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

+

The vector will not allocate until elements are pushed onto it.

+
Examples
+
#![feature(allocator_api)]
+
+use std::alloc::System;
+
+let mut vec: Vec<i32, _> = Vec::new_in(System);
+
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity +with the provided allocator.

+

The vector will be able to hold at least capacity elements without +reallocating. This method is allowed to allocate for more elements than +capacity. If capacity is 0, the vector will not allocate.

+

It is important to note that although the returned vector has the +minimum capacity specified, the vector will have a zero length. For +an explanation of the difference between length and capacity, see +Capacity and reallocation.

+

If it is important to know the exact allocated capacity of a Vec, +always use the capacity method after construction.

+

For Vec<T, A> where T is a zero-sized type, there will be no allocation +and the capacity will always be usize::MAX.

+
Panics
+

Panics if the new capacity exceeds isize::MAX bytes.

+
Examples
+
#![feature(allocator_api)]
+
+use std::alloc::System;
+
+let mut vec = Vec::with_capacity_in(10, System);
+
+// The vector contains no items, even though it has capacity for more
+assert_eq!(vec.len(), 0);
+assert!(vec.capacity() >= 10);
+
+// These are all done without reallocating...
+for i in 0..10 {
+    vec.push(i);
+}
+assert_eq!(vec.len(), 10);
+assert!(vec.capacity() >= 10);
+
+// ...but this may make the vector reallocate
+vec.push(11);
+assert_eq!(vec.len(), 11);
+assert!(vec.capacity() >= 11);
+
+// A vector of a zero-sized type will always over-allocate, since no
+// allocation is necessary
+let vec_units = Vec::<(), System>::with_capacity_in(10, System);
+assert_eq!(vec_units.capacity(), usize::MAX);
+
source

pub unsafe fn from_raw_parts_in( + ptr: *mut T, + length: usize, + capacity: usize, + alloc: A +) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a capacity, a length, +and an allocator.

+
Safety
+

This is highly unsafe, due to the number of invariants that aren’t +checked:

+
    +
  • ptr must be currently allocated via the given allocator alloc.
  • +
  • T needs to have the same alignment as what ptr was allocated with. +(T having a less strict alignment is not sufficient, the alignment really +needs to be equal to satisfy the dealloc requirement that memory must be +allocated and deallocated with the same layout.)
  • +
  • The size of T times the capacity (ie. the allocated size in bytes) needs +to be the same size as the pointer was allocated with. (Because similar to +alignment, dealloc must be called with the same layout size.)
  • +
  • length needs to be less than or equal to capacity.
  • +
  • The first length values must be properly initialized values of type T.
  • +
  • capacity needs to fit the layout size that the pointer was allocated with.
  • +
  • The allocated size in bytes must be no larger than isize::MAX. +See the safety documentation of pointer::offset.
  • +
+

These requirements are always upheld by any ptr that has been allocated +via Vec<T, A>. Other allocation sources are allowed if the invariants are +upheld.

+

Violating these may cause problems like corrupting the allocator’s +internal data structures. For example it is not safe +to build a Vec<u8> from a pointer to a C char array with length size_t. +It’s also not safe to build one from a Vec<u16> and its length, because +the allocator cares about the alignment, and these two types have different +alignments. The buffer was allocated with alignment 2 (for u16), but after +turning it into a Vec<u8> it’ll be deallocated with alignment 1.

+

The ownership of ptr is effectively transferred to the +Vec<T> which may then deallocate, reallocate or change the +contents of memory pointed to by the pointer at will. Ensure +that nothing else uses the pointer after calling this +function.

+
Examples
+
#![feature(allocator_api)]
+
+use std::alloc::System;
+
+use std::ptr;
+use std::mem;
+
+let mut v = Vec::with_capacity_in(3, System);
+v.push(1);
+v.push(2);
+v.push(3);
+
+// Prevent running `v`'s destructor so we are in complete control
+// of the allocation.
+let mut v = mem::ManuallyDrop::new(v);
+
+// Pull out the various important pieces of information about `v`
+let p = v.as_mut_ptr();
+let len = v.len();
+let cap = v.capacity();
+let alloc = v.allocator();
+
+unsafe {
+    // Overwrite memory with 4, 5, 6
+    for i in 0..len {
+        ptr::write(p.add(i), 4 + i);
+    }
+
+    // Put everything back together into a Vec
+    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());
+    assert_eq!(rebuilt, [4, 5, 6]);
+}
+

Using memory that was allocated elsewhere:

+ +
#![feature(allocator_api)]
+
+use std::alloc::{AllocError, Allocator, Global, Layout};
+
+fn main() {
+    let layout = Layout::array::<u32>(16).expect("overflow cannot happen");
+
+    let vec = unsafe {
+        let mem = match Global.allocate(layout) {
+            Ok(mem) => mem.cast::<u32>().as_ptr(),
+            Err(AllocError) => return,
+        };
+
+        mem.write(1_000_000);
+
+        Vec::from_raw_parts_in(mem, 1, 16, Global)
+    };
+
+    assert_eq!(vec, &[1_000_000]);
+    assert_eq!(vec.capacity(), 16);
+}
+
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components.

+

Returns the raw pointer to the underlying data, the length of +the vector (in elements), and the allocated capacity of the +data (in elements). These are the same arguments in the same +order as the arguments to from_raw_parts.

+

After calling this function, the caller is responsible for the +memory previously managed by the Vec. The only way to do +this is to convert the raw pointer, length, and capacity back +into a Vec with the from_raw_parts function, allowing +the destructor to perform the cleanup.

+
Examples
+
#![feature(vec_into_raw_parts)]
+let v: Vec<i32> = vec![-1, 0, 1];
+
+let (ptr, len, cap) = v.into_raw_parts();
+
+let rebuilt = unsafe {
+    // We can now make changes to the components, such as
+    // transmuting the raw pointer to a compatible type.
+    let ptr = ptr as *mut u32;
+
+    Vec::from_raw_parts(ptr, len, cap)
+};
+assert_eq!(rebuilt, [4294967295, 0, 1]);
+
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components.

+

Returns the raw pointer to the underlying data, the length of the vector (in elements), +the allocated capacity of the data (in elements), and the allocator. These are the same +arguments in the same order as the arguments to from_raw_parts_in.

+

After calling this function, the caller is responsible for the +memory previously managed by the Vec. The only way to do +this is to convert the raw pointer, length, and capacity back +into a Vec with the from_raw_parts_in function, allowing +the destructor to perform the cleanup.

+
Examples
+
#![feature(allocator_api, vec_into_raw_parts)]
+
+use std::alloc::System;
+
+let mut v: Vec<i32, System> = Vec::new_in(System);
+v.push(-1);
+v.push(0);
+v.push(1);
+
+let (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();
+
+let rebuilt = unsafe {
+    // We can now make changes to the components, such as
+    // transmuting the raw pointer to a compatible type.
+    let ptr = ptr as *mut u32;
+
+    Vec::from_raw_parts_in(ptr, len, cap, alloc)
+};
+assert_eq!(rebuilt, [4294967295, 0, 1]);
+
source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without +reallocating.

+
Examples
+
let mut vec: Vec<i32> = Vec::with_capacity(10);
+vec.push(42);
+assert!(vec.capacity() >= 10);
+
source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted +in the given Vec<T>. The collection may reserve more space to +speculatively avoid frequent reallocations. After calling reserve, +capacity will be greater than or equal to self.len() + additional. +Does nothing if capacity is already sufficient.

+
Panics
+

Panics if the new capacity exceeds isize::MAX bytes.

+
Examples
+
let mut vec = vec![1];
+vec.reserve(10);
+assert!(vec.capacity() >= 11);
+
source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to +be inserted in the given Vec<T>. Unlike reserve, this will not +deliberately over-allocate to speculatively avoid frequent allocations. +After calling reserve_exact, capacity will be greater than or equal to +self.len() + additional. Does nothing if the capacity is already +sufficient.

+

Note that the allocator may give the collection more space than it +requests. Therefore, capacity can not be relied upon to be precisely +minimal. Prefer reserve if future insertions are expected.

+
Panics
+

Panics if the new capacity exceeds isize::MAX bytes.

+
Examples
+
let mut vec = vec![1];
+vec.reserve_exact(10);
+assert!(vec.capacity() >= 11);
+
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted +in the given Vec<T>. The collection may reserve more space to speculatively avoid +frequent reallocations. After calling try_reserve, capacity will be +greater than or equal to self.len() + additional if it returns +Ok(()). Does nothing if capacity is already sufficient. This method +preserves the contents even if an error occurs.

+
Errors
+

If the capacity overflows, or the allocator reports a failure, then an error +is returned.

+
Examples
+
use std::collections::TryReserveError;
+
+fn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {
+    let mut output = Vec::new();
+
+    // Pre-reserve the memory, exiting if we can't
+    output.try_reserve(data.len())?;
+
+    // Now we know this can't OOM in the middle of our complex work
+    output.extend(data.iter().map(|&val| {
+        val * 2 + 5 // very complicated
+    }));
+
+    Ok(output)
+}
+
1.57.0 · source

pub fn try_reserve_exact( + &mut self, + additional: usize +) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional +elements to be inserted in the given Vec<T>. Unlike try_reserve, +this will not deliberately over-allocate to speculatively avoid frequent +allocations. After calling try_reserve_exact, capacity will be greater +than or equal to self.len() + additional if it returns Ok(()). +Does nothing if the capacity is already sufficient.

+

Note that the allocator may give the collection more space than it +requests. Therefore, capacity can not be relied upon to be precisely +minimal. Prefer try_reserve if future insertions are expected.

+
Errors
+

If the capacity overflows, or the allocator reports a failure, then an error +is returned.

+
Examples
+
use std::collections::TryReserveError;
+
+fn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {
+    let mut output = Vec::new();
+
+    // Pre-reserve the memory, exiting if we can't
+    output.try_reserve_exact(data.len())?;
+
+    // Now we know this can't OOM in the middle of our complex work
+    output.extend(data.iter().map(|&val| {
+        val * 2 + 5 // very complicated
+    }));
+
+    Ok(output)
+}
+
source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

+

It will drop down as close as possible to the length but the allocator +may still inform the vector that there is space for a few more elements.

+
Examples
+
let mut vec = Vec::with_capacity(10);
+vec.extend([1, 2, 3]);
+assert!(vec.capacity() >= 10);
+vec.shrink_to_fit();
+assert!(vec.capacity() >= 3);
+
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

+

The capacity will remain at least as large as both the length +and the supplied value.

+

If the current capacity is less than the lower limit, this is a no-op.

+
Examples
+
let mut vec = Vec::with_capacity(10);
+vec.extend([1, 2, 3]);
+assert!(vec.capacity() >= 10);
+vec.shrink_to(4);
+assert!(vec.capacity() >= 4);
+vec.shrink_to(0);
+assert!(vec.capacity() >= 3);
+
source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

+

If the vector has excess capacity, its items will be moved into a +newly-allocated buffer with exactly the right capacity.

+
Examples
+
let v = vec![1, 2, 3];
+
+let slice = v.into_boxed_slice();
+

Any excess capacity is removed:

+ +
let mut vec = Vec::with_capacity(10);
+vec.extend([1, 2, 3]);
+
+assert!(vec.capacity() >= 10);
+let slice = vec.into_boxed_slice();
+assert_eq!(slice.into_vec().capacity(), 3);
+
source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping +the rest.

+

If len is greater or equal to the vector’s current length, this has +no effect.

+

The drain method can emulate truncate, but causes the excess +elements to be returned instead of dropped.

+

Note that this method has no effect on the allocated capacity +of the vector.

+
Examples
+

Truncating a five element vector to two elements:

+ +
let mut vec = vec![1, 2, 3, 4, 5];
+vec.truncate(2);
+assert_eq!(vec, [1, 2]);
+

No truncation occurs when len is greater than the vector’s current +length:

+ +
let mut vec = vec![1, 2, 3];
+vec.truncate(8);
+assert_eq!(vec, [1, 2, 3]);
+

Truncating when len == 0 is equivalent to calling the clear +method.

+ +
let mut vec = vec![1, 2, 3];
+vec.truncate(0);
+assert_eq!(vec, []);
+
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

+

Equivalent to &s[..].

+
Examples
+
use std::io::{self, Write};
+let buffer = vec![1, 2, 3, 5, 8];
+io::sink().write(buffer.as_slice()).unwrap();
+
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

+

Equivalent to &mut s[..].

+
Examples
+
use std::io::{self, Read};
+let mut buffer = vec![0; 3];
+io::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
+
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer +valid for zero sized reads if the vector didn’t allocate.

+

The caller must ensure that the vector outlives the pointer this +function returns, or else it will end up pointing to garbage. +Modifying the vector may cause its buffer to be reallocated, +which would also make any pointers to it invalid.

+

The caller must also ensure that the memory the pointer (non-transitively) points to +is never written to (except inside an UnsafeCell) using this pointer or any pointer +derived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

+

This method guarantees that for the purpose of the aliasing model, this method +does not materialize a reference to the underlying slice, and thus the returned pointer +will remain valid when mixed with other calls to as_ptr and as_mut_ptr. +Note that calling other methods that materialize mutable references to the slice, +or mutable references to specific elements you are planning on accessing through this pointer, +as well as writing to those elements, may still invalidate this pointer. +See the second example below for how this guarantee can be used.

+
Examples
+
let x = vec![1, 2, 4];
+let x_ptr = x.as_ptr();
+
+unsafe {
+    for i in 0..x.len() {
+        assert_eq!(*x_ptr.add(i), 1 << i);
+    }
+}
+

Due to the aliasing guarantee, the following code is legal:

+ +
unsafe {
+    let mut v = vec![0, 1, 2];
+    let ptr1 = v.as_ptr();
+    let _ = ptr1.read();
+    let ptr2 = v.as_mut_ptr().offset(2);
+    ptr2.write(2);
+    // Notably, the write to `ptr2` did *not* invalidate `ptr1`
+    // because it mutated a different element:
+    let _ = ptr1.read();
+}
+
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling +raw pointer valid for zero sized reads if the vector didn’t allocate.

+

The caller must ensure that the vector outlives the pointer this +function returns, or else it will end up pointing to garbage. +Modifying the vector may cause its buffer to be reallocated, +which would also make any pointers to it invalid.

+

This method guarantees that for the purpose of the aliasing model, this method +does not materialize a reference to the underlying slice, and thus the returned pointer +will remain valid when mixed with other calls to as_ptr and as_mut_ptr. +Note that calling other methods that materialize references to the slice, +or references to specific elements you are planning on accessing through this pointer, +may still invalidate this pointer. +See the second example below for how this guarantee can be used.

+
Examples
+
// Allocate vector big enough for 4 elements.
+let size = 4;
+let mut x: Vec<i32> = Vec::with_capacity(size);
+let x_ptr = x.as_mut_ptr();
+
+// Initialize elements via raw pointer writes, then set length.
+unsafe {
+    for i in 0..size {
+        *x_ptr.add(i) = i as i32;
+    }
+    x.set_len(size);
+}
+assert_eq!(&*x, &[0, 1, 2, 3]);
+

Due to the aliasing guarantee, the following code is legal:

+ +
unsafe {
+    let mut v = vec![0];
+    let ptr1 = v.as_mut_ptr();
+    ptr1.write(1);
+    let ptr2 = v.as_mut_ptr();
+    ptr2.write(2);
+    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:
+    ptr1.write(3);
+}
+
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

+
source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

+

This is a low-level operation that maintains none of the normal +invariants of the type. Normally changing the length of a vector +is done using one of the safe operations instead, such as +truncate, resize, extend, or clear.

+
Safety
+
    +
  • new_len must be less than or equal to capacity().
  • +
  • The elements at old_len..new_len must be initialized.
  • +
+
Examples
+

This method can be useful for situations in which the vector +is serving as a buffer for other code, particularly over FFI:

+ +
pub fn get_dictionary(&self) -> Option<Vec<u8>> {
+    // Per the FFI method's docs, "32768 bytes is always enough".
+    let mut dict = Vec::with_capacity(32_768);
+    let mut dict_length = 0;
+    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:
+    // 1. `dict_length` elements were initialized.
+    // 2. `dict_length` <= the capacity (32_768)
+    // which makes `set_len` safe to call.
+    unsafe {
+        // Make the FFI call...
+        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);
+        if r == Z_OK {
+            // ...and update the length to what was initialized.
+            dict.set_len(dict_length);
+            Some(dict)
+        } else {
+            None
+        }
+    }
+}
+

While the following example is sound, there is a memory leak since +the inner vectors were not freed prior to the set_len call:

+ +
let mut vec = vec![vec![1, 0, 0],
+                   vec![0, 1, 0],
+                   vec![0, 0, 1]];
+// SAFETY:
+// 1. `old_len..0` is empty so no elements need to be initialized.
+// 2. `0 <= capacity` always holds whatever `capacity` is.
+unsafe {
+    vec.set_len(0);
+}
+

Normally, here, one would use clear instead to correctly drop +the contents and thus not leak memory.

+
source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

+

The removed element is replaced by the last element of the vector.

+

This does not preserve ordering, but is O(1). +If you need to preserve the element order, use remove instead.

+
Panics
+

Panics if index is out of bounds.

+
Examples
+
let mut v = vec!["foo", "bar", "baz", "qux"];
+
+assert_eq!(v.swap_remove(1), "bar");
+assert_eq!(v, ["foo", "qux", "baz"]);
+
+assert_eq!(v.swap_remove(0), "foo");
+assert_eq!(v, ["baz", "qux"]);
+
source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all +elements after it to the right.

+
Panics
+

Panics if index > len.

+
Examples
+
let mut vec = vec![1, 2, 3];
+vec.insert(1, 4);
+assert_eq!(vec, [1, 4, 2, 3]);
+vec.insert(4, 5);
+assert_eq!(vec, [1, 4, 2, 3, 5]);
+
source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector, +shifting all elements after it to the left.

+

Note: Because this shifts over the remaining elements, it has a +worst-case performance of O(n). If you don’t need the order of elements +to be preserved, use swap_remove instead. If you’d like to remove +elements from the beginning of the Vec, consider using +VecDeque::pop_front instead.

+
Panics
+

Panics if index is out of bounds.

+
Examples
+
let mut v = vec![1, 2, 3];
+assert_eq!(v.remove(1), 2);
+assert_eq!(v, [1, 3]);
+
source

pub fn retain<F>(&mut self, f: F)where + F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

+

In other words, remove all elements e for which f(&e) returns false. +This method operates in place, visiting each element exactly once in the +original order, and preserves the order of the retained elements.

+
Examples
+
let mut vec = vec![1, 2, 3, 4];
+vec.retain(|&x| x % 2 == 0);
+assert_eq!(vec, [2, 4]);
+

Because the elements are visited exactly once in the original order, +external state may be used to decide which elements to keep.

+ +
let mut vec = vec![1, 2, 3, 4, 5];
+let keep = [false, true, true, false, true];
+let mut iter = keep.iter();
+vec.retain(|_| *iter.next().unwrap());
+assert_eq!(vec, [2, 3, 5]);
+
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)where + F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

+

In other words, remove all elements e such that f(&mut e) returns false. +This method operates in place, visiting each element exactly once in the +original order, and preserves the order of the retained elements.

+
Examples
+
let mut vec = vec![1, 2, 3, 4];
+vec.retain_mut(|x| if *x <= 3 {
+    *x += 1;
+    true
+} else {
+    false
+});
+assert_eq!(vec, [2, 3, 4]);
+
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)where + F: FnMut(&mut T) -> K, + K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same +key.

+

If the vector is sorted, this removes all duplicates.

+
Examples
+
let mut vec = vec![10, 20, 21, 30, 20];
+
+vec.dedup_by_key(|i| *i / 10);
+
+assert_eq!(vec, [10, 20, 30, 20]);
+
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)where + F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality +relation.

+

The same_bucket function is passed references to two elements from the vector and +must determine if the elements compare equal. The elements are passed in opposite order +from their order in the slice, so if same_bucket(a, b) returns true, a is removed.

+

If the vector is sorted, this removes all duplicates.

+
Examples
+
let mut vec = vec!["foo", "bar", "Bar", "baz", "bar"];
+
+vec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));
+
+assert_eq!(vec, ["foo", "bar", "baz", "bar"]);
+
source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

+
Panics
+

Panics if the new capacity exceeds isize::MAX bytes.

+
Examples
+
let mut vec = vec![1, 2];
+vec.push(3);
+assert_eq!(vec, [1, 2, 3]);
+
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned +with the element.

+

Unlike push this method will not reallocate when there’s insufficient capacity. +The caller should use reserve or try_reserve to ensure that there is enough capacity.

+
Examples
+

A manual, panic-free alternative to FromIterator:

+ +
#![feature(vec_push_within_capacity)]
+
+use std::collections::TryReserveError;
+fn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {
+    let mut vec = Vec::new();
+    for value in iter {
+        if let Err(value) = vec.push_within_capacity(value) {
+            vec.try_reserve(1)?;
+            // this cannot fail, the previous line either returned or added at least 1 free slot
+            let _ = vec.push_within_capacity(value);
+        }
+    }
+    Ok(vec)
+}
+assert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
+
source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it +is empty.

+

If you’d like to pop the first element, consider using +VecDeque::pop_front instead.

+
Examples
+
let mut vec = vec![1, 2, 3];
+assert_eq!(vec.pop(), Some(3));
+assert_eq!(vec, [1, 2]);
+
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

+
Panics
+

Panics if the new capacity exceeds isize::MAX bytes.

+
Examples
+
let mut vec = vec![1, 2, 3];
+let mut vec2 = vec![4, 5, 6];
+vec.append(&mut vec2);
+assert_eq!(vec, [1, 2, 3, 4, 5, 6]);
+assert_eq!(vec2, []);
+
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>where + R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all +removed elements as an iterator. If the iterator is dropped before +being fully consumed, it drops the remaining removed elements.

+

The returned iterator keeps a mutable borrow on the vector to optimize +its implementation.

+
Panics
+

Panics if the starting point is greater than the end point or if +the end point is greater than the length of the vector.

+
Leaking
+

If the returned iterator goes out of scope without being dropped (due to +mem::forget, for example), the vector may have lost and leaked +elements arbitrarily, including elements outside the range.

+
Examples
+
let mut v = vec![1, 2, 3];
+let u: Vec<_> = v.drain(1..).collect();
+assert_eq!(v, &[1]);
+assert_eq!(u, &[2, 3]);
+
+// A full range clears the vector, like `clear()` does
+v.drain(..);
+assert_eq!(v, &[]);
+
source

pub fn clear(&mut self)

Clears the vector, removing all values.

+

Note that this method has no effect on the allocated capacity +of the vector.

+
Examples
+
let mut v = vec![1, 2, 3];
+
+v.clear();
+
+assert!(v.is_empty());
+
source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to +as its ‘length’.

+
Examples
+
let a = vec![1, 2, 3];
+assert_eq!(a.len(), 3);
+
source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

+
Examples
+
let mut v = Vec::new();
+assert!(v.is_empty());
+
+v.push(1);
+assert!(!v.is_empty());
+
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>where + A: Clone,

Splits the collection into two at the given index.

+

Returns a newly allocated vector containing the elements in the range +[at, len). After the call, the original vector will be left containing +the elements [0, at) with its previous capacity unchanged.

+
Panics
+

Panics if at > len.

+
Examples
+
let mut vec = vec![1, 2, 3];
+let vec2 = vec.split_off(1);
+assert_eq!(vec, [1]);
+assert_eq!(vec2, [2, 3]);
+
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)where + F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

+

If new_len is greater than len, the Vec is extended by the +difference, with each additional slot filled with the result of +calling the closure f. The return values from f will end up +in the Vec in the order they have been generated.

+

If new_len is less than len, the Vec is simply truncated.

+

This method uses a closure to create new values on every push. If +you’d rather Clone a given value, use Vec::resize. If you +want to use the Default trait to generate values, you can +pass Default::default as the second argument.

+
Examples
+
let mut vec = vec![1, 2, 3];
+vec.resize_with(5, Default::default);
+assert_eq!(vec, [1, 2, 3, 0, 0]);
+
+let mut vec = vec![];
+let mut p = 1;
+vec.resize_with(4, || { p *= 2; p });
+assert_eq!(vec, [2, 4, 8, 16]);
+
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]where + A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents, +&'a mut [T]. Note that the type T must outlive the chosen lifetime +'a. If the type has only static references, or none at all, then this +may be chosen to be 'static.

+

As of Rust 1.57, this method does not reallocate or shrink the Vec, +so the leaked allocation may include unused capacity that is not part +of the returned slice.

+

This function is mainly useful for data that lives for the remainder of +the program’s life. Dropping the returned reference will cause a memory +leak.

+
Examples
+

Simple usage:

+ +
let x = vec![1, 2, 3];
+let static_ref: &'static mut [usize] = x.leak();
+static_ref[0] += 1;
+assert_eq!(static_ref, &[2, 2, 3]);
+
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of +MaybeUninit<T>.

+

The returned slice can be used to fill the vector with data (e.g. by +reading from a file) before marking the data as initialized using the +set_len method.

+
Examples
+
// Allocate vector big enough for 10 elements.
+let mut v = Vec::with_capacity(10);
+
+// Fill in the first 3 elements.
+let uninit = v.spare_capacity_mut();
+uninit[0].write(0);
+uninit[1].write(1);
+uninit[2].write(2);
+
+// Mark the first 3 elements of the vector as being initialized.
+unsafe {
+    v.set_len(3);
+}
+
+assert_eq!(&v, &[0, 1, 2]);
+
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare +capacity of the vector as a slice of MaybeUninit<T>.

+

The returned spare capacity slice can be used to fill the vector with data +(e.g. by reading from a file) before marking the data as initialized using +the set_len method.

+

Note that this is a low-level API, which should be used with care for +optimization purposes. If you need to append data to a Vec +you can use push, extend, extend_from_slice, +extend_from_within, insert, append, resize or +resize_with, depending on your exact needs.

+
Examples
+
#![feature(vec_split_at_spare)]
+
+let mut v = vec![1, 1, 2];
+
+// Reserve additional space big enough for 10 elements.
+v.reserve(10);
+
+let (init, uninit) = v.split_at_spare_mut();
+let sum = init.iter().copied().sum::<u32>();
+
+// Fill in the next 4 elements.
+uninit[0].write(sum);
+uninit[1].write(sum * 2);
+uninit[2].write(sum * 3);
+uninit[3].write(sum * 4);
+
+// Mark the 4 elements of the vector as being initialized.
+unsafe {
+    let len = v.len();
+    v.set_len(len + 4);
+}
+
+assert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
+
source§

impl<T, A> Vec<T, A>where + T: Clone, + A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

+

If new_len is greater than len, the Vec is extended by the +difference, with each additional slot filled with value. +If new_len is less than len, the Vec is simply truncated.

+

This method requires T to implement Clone, +in order to be able to clone the passed value. +If you need more flexibility (or want to rely on Default instead of +Clone), use Vec::resize_with. +If you only need to resize to a smaller size, use Vec::truncate.

+
Examples
+
let mut vec = vec!["hello"];
+vec.resize(3, "world");
+assert_eq!(vec, ["hello", "world", "world"]);
+
+let mut vec = vec![1, 2, 3, 4];
+vec.resize(2, 0);
+assert_eq!(vec, [1, 2]);
+
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

+

Iterates over the slice other, clones each element, and then appends +it to this Vec. The other slice is traversed in-order.

+

Note that this function is same as extend except that it is +specialized to work with slices instead. If and when Rust gets +specialization this function will likely be deprecated (but still +available).

+
Examples
+
let mut vec = vec![1];
+vec.extend_from_slice(&[2, 3, 4]);
+assert_eq!(vec, [1, 2, 3, 4]);
+
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)where + R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

+
Panics
+

Panics if the starting point is greater than the end point or if +the end point is greater than the length of the vector.

+
Examples
+
let mut vec = vec![0, 1, 2, 3, 4];
+
+vec.extend_from_within(2..);
+assert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);
+
+vec.extend_from_within(..2);
+assert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);
+
+vec.extend_from_within(4..8);
+assert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
+
source§

impl<T, A, const N: usize> Vec<[T; N], A>where + A: Allocator,

source

pub fn into_flattened(self) -> Vec<T, A>

🔬This is a nightly-only experimental API. (slice_flatten)

Takes a Vec<[T; N]> and flattens it into a Vec<T>.

+
Panics
+

Panics if the length of the resulting vector would overflow a usize.

+

This is only possible when flattening a vector of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +size_of::<T>() > 0, this will never panic.

+
Examples
+
#![feature(slice_flatten)]
+
+let mut vec = vec![[1, 2, 3], [4, 5, 6], [7, 8, 9]];
+assert_eq!(vec.pop(), Some([7, 8, 9]));
+
+let mut flattened = vec.into_flattened();
+assert_eq!(flattened.pop(), Some(6));
+
source§

impl<T, A> Vec<T, A>where + T: PartialEq, + A: Allocator,

source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the +PartialEq trait implementation.

+

If the vector is sorted, this removes all duplicates.

+
Examples
+
let mut vec = vec![1, 2, 2, 3, 2];
+
+vec.dedup();
+
+assert_eq!(vec, [1, 2, 3, 2]);
+
source§

impl<T, A> Vec<T, A>where + A: Allocator,

1.21.0 · source

pub fn splice<R, I>( + &mut self, + range: R, + replace_with: I +) -> Splice<'_, <I as IntoIterator>::IntoIter, A>where + R: RangeBounds<usize>, + I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector +with the given replace_with iterator and yields the removed items. +replace_with does not need to be the same length as range.

+

range is removed even if the iterator is not consumed until the end.

+

It is unspecified how many elements are removed from the vector +if the Splice value is leaked.

+

The input iterator replace_with is only consumed when the Splice value is dropped.

+

This is optimal if:

+
    +
  • The tail (elements in the vector after range) is empty,
  • +
  • or replace_with yields fewer or equal elements than range’s length
  • +
  • or the lower bound of its size_hint() is exact.
  • +
+

Otherwise, a temporary vector is allocated and the tail is moved twice.

+
Panics
+

Panics if the starting point is greater than the end point or if +the end point is greater than the length of the vector.

+
Examples
+
let mut v = vec![1, 2, 3, 4];
+let new = [7, 8, 9];
+let u: Vec<_> = v.splice(1..3, new).collect();
+assert_eq!(v, &[1, 7, 8, 9, 4]);
+assert_eq!(u, &[2, 3]);
+
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>where + F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

+

If the closure returns true, then the element is removed and yielded. +If the closure returns false, the element will remain in the vector and will not be yielded +by the iterator.

+

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating +or the iteration short-circuits, then the remaining elements will be retained. +Use retain with a negated predicate if you do not need the returned iterator.

+

Using this method is equivalent to the following code:

+ +
let mut i = 0;
+while i < vec.len() {
+    if some_predicate(&mut vec[i]) {
+        let val = vec.remove(i);
+        // your code here
+    } else {
+        i += 1;
+    }
+}
+
+

But extract_if is easier to use. extract_if is also more efficient, +because it can backshift the elements of the array in bulk.

+

Note that extract_if also lets you mutate every element in the filter closure, +regardless of whether you choose to keep or remove it.

+
Examples
+

Splitting an array into evens and odds, reusing the original allocation:

+ +
#![feature(extract_if)]
+let mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];
+
+let evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();
+let odds = numbers;
+
+assert_eq!(evens, vec![2, 4, 6, 8, 14]);
+assert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
+

Methods from Deref<Target = [T]>§

source

pub fn flatten(&self) -> &[T]

🔬This is a nightly-only experimental API. (slice_flatten)

Takes a &[[T; N]], and flattens it to a &[T].

+
Panics
+

This panics if the length of the resulting slice would overflow a usize.

+

This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +size_of::<T>() > 0, this will never panic.

+
Examples
+
#![feature(slice_flatten)]
+
+assert_eq!([[1, 2, 3], [4, 5, 6]].flatten(), &[1, 2, 3, 4, 5, 6]);
+
+assert_eq!(
+    [[1, 2, 3], [4, 5, 6]].flatten(),
+    [[1, 2], [3, 4], [5, 6]].flatten(),
+);
+
+let slice_of_empty_arrays: &[[i32; 0]] = &[[], [], [], [], []];
+assert!(slice_of_empty_arrays.flatten().is_empty());
+
+let empty_slice_of_arrays: &[[u32; 10]] = &[];
+assert!(empty_slice_of_arrays.flatten().is_empty());
+
source

pub fn flatten_mut(&mut self) -> &mut [T]

🔬This is a nightly-only experimental API. (slice_flatten)

Takes a &mut [[T; N]], and flattens it to a &mut [T].

+
Panics
+

This panics if the length of the resulting slice would overflow a usize.

+

This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +size_of::<T>() > 0, this will never panic.

+
Examples
+
#![feature(slice_flatten)]
+
+fn add_5_to_all(slice: &mut [i32]) {
+    for i in slice {
+        *i += 5;
+    }
+}
+
+let mut array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
+add_5_to_all(array.flatten_mut());
+assert_eq!(array, [[6, 7, 8], [9, 10, 11], [12, 13, 14]]);
+
source

pub fn len(&self) -> usize

Returns the number of elements in the slice.

+
Examples
+
let a = [1, 2, 3];
+assert_eq!(a.len(), 3);
+
source

pub fn is_empty(&self) -> bool

Returns true if the slice has a length of 0.

+
Examples
+
let a = [1, 2, 3];
+assert!(!a.is_empty());
+
source

pub fn first(&self) -> Option<&T>

Returns the first element of the slice, or None if it is empty.

+
Examples
+
let v = [10, 40, 30];
+assert_eq!(Some(&10), v.first());
+
+let w: &[i32] = &[];
+assert_eq!(None, w.first());
+
source

pub fn first_mut(&mut self) -> Option<&mut T>

Returns a mutable pointer to the first element of the slice, or None if it is empty.

+
Examples
+
let x = &mut [0, 1, 2];
+
+if let Some(first) = x.first_mut() {
+    *first = 5;
+}
+assert_eq!(x, &[5, 1, 2]);
+
1.5.0 · source

pub fn split_first(&self) -> Option<(&T, &[T])>

Returns the first and all the rest of the elements of the slice, or None if it is empty.

+
Examples
+
let x = &[0, 1, 2];
+
+if let Some((first, elements)) = x.split_first() {
+    assert_eq!(first, &0);
+    assert_eq!(elements, &[1, 2]);
+}
+
1.5.0 · source

pub fn split_first_mut(&mut self) -> Option<(&mut T, &mut [T])>

Returns the first and all the rest of the elements of the slice, or None if it is empty.

+
Examples
+
let x = &mut [0, 1, 2];
+
+if let Some((first, elements)) = x.split_first_mut() {
+    *first = 3;
+    elements[0] = 4;
+    elements[1] = 5;
+}
+assert_eq!(x, &[3, 4, 5]);
+
1.5.0 · source

pub fn split_last(&self) -> Option<(&T, &[T])>

Returns the last and all the rest of the elements of the slice, or None if it is empty.

+
Examples
+
let x = &[0, 1, 2];
+
+if let Some((last, elements)) = x.split_last() {
+    assert_eq!(last, &2);
+    assert_eq!(elements, &[0, 1]);
+}
+
1.5.0 · source

pub fn split_last_mut(&mut self) -> Option<(&mut T, &mut [T])>

Returns the last and all the rest of the elements of the slice, or None if it is empty.

+
Examples
+
let x = &mut [0, 1, 2];
+
+if let Some((last, elements)) = x.split_last_mut() {
+    *last = 3;
+    elements[0] = 4;
+    elements[1] = 5;
+}
+assert_eq!(x, &[4, 5, 3]);
+
source

pub fn last(&self) -> Option<&T>

Returns the last element of the slice, or None if it is empty.

+
Examples
+
let v = [10, 40, 30];
+assert_eq!(Some(&30), v.last());
+
+let w: &[i32] = &[];
+assert_eq!(None, w.last());
+
source

pub fn last_mut(&mut self) -> Option<&mut T>

Returns a mutable pointer to the last item in the slice.

+
Examples
+
let x = &mut [0, 1, 2];
+
+if let Some(last) = x.last_mut() {
+    *last = 10;
+}
+assert_eq!(x, &[0, 1, 10]);
+
source

pub fn first_chunk<const N: usize>(&self) -> Option<&[T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the first N elements of the slice, or None if it has fewer than N elements.

+
Examples
+
#![feature(slice_first_last_chunk)]
+
+let u = [10, 40, 30];
+assert_eq!(Some(&[10, 40]), u.first_chunk::<2>());
+
+let v: &[i32] = &[10];
+assert_eq!(None, v.first_chunk::<2>());
+
+let w: &[i32] = &[];
+assert_eq!(Some(&[]), w.first_chunk::<0>());
+
source

pub fn first_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns a mutable reference to the first N elements of the slice, +or None if it has fewer than N elements.

+
Examples
+
#![feature(slice_first_last_chunk)]
+
+let x = &mut [0, 1, 2];
+
+if let Some(first) = x.first_chunk_mut::<2>() {
+    first[0] = 5;
+    first[1] = 4;
+}
+assert_eq!(x, &[5, 4, 2]);
+
source

pub fn split_first_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the first N elements of the slice and the remainder, +or None if it has fewer than N elements.

+
Examples
+
#![feature(slice_first_last_chunk)]
+
+let x = &[0, 1, 2];
+
+if let Some((first, elements)) = x.split_first_chunk::<2>() {
+    assert_eq!(first, &[0, 1]);
+    assert_eq!(elements, &[2]);
+}
+
source

pub fn split_first_chunk_mut<const N: usize>( + &mut self +) -> Option<(&mut [T; N], &mut [T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns a mutable reference to the first N elements of the slice and the remainder, +or None if it has fewer than N elements.

+
Examples
+
#![feature(slice_first_last_chunk)]
+
+let x = &mut [0, 1, 2];
+
+if let Some((first, elements)) = x.split_first_chunk_mut::<2>() {
+    first[0] = 3;
+    first[1] = 4;
+    elements[0] = 5;
+}
+assert_eq!(x, &[3, 4, 5]);
+
source

pub fn split_last_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last N elements of the slice and the remainder, +or None if it has fewer than N elements.

+
Examples
+
#![feature(slice_first_last_chunk)]
+
+let x = &[0, 1, 2];
+
+if let Some((last, elements)) = x.split_last_chunk::<2>() {
+    assert_eq!(last, &[1, 2]);
+    assert_eq!(elements, &[0]);
+}
+
source

pub fn split_last_chunk_mut<const N: usize>( + &mut self +) -> Option<(&mut [T; N], &mut [T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last and all the rest of the elements of the slice, or None if it is empty.

+
Examples
+
#![feature(slice_first_last_chunk)]
+
+let x = &mut [0, 1, 2];
+
+if let Some((last, elements)) = x.split_last_chunk_mut::<2>() {
+    last[0] = 3;
+    last[1] = 4;
+    elements[0] = 5;
+}
+assert_eq!(x, &[5, 3, 4]);
+
source

pub fn last_chunk<const N: usize>(&self) -> Option<&[T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last element of the slice, or None if it is empty.

+
Examples
+
#![feature(slice_first_last_chunk)]
+
+let u = [10, 40, 30];
+assert_eq!(Some(&[40, 30]), u.last_chunk::<2>());
+
+let v: &[i32] = &[10];
+assert_eq!(None, v.last_chunk::<2>());
+
+let w: &[i32] = &[];
+assert_eq!(Some(&[]), w.last_chunk::<0>());
+
source

pub fn last_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns a mutable pointer to the last item in the slice.

+
Examples
+
#![feature(slice_first_last_chunk)]
+
+let x = &mut [0, 1, 2];
+
+if let Some(last) = x.last_chunk_mut::<2>() {
+    last[0] = 10;
+    last[1] = 20;
+}
+assert_eq!(x, &[0, 10, 20]);
+
source

pub fn get<I>(&self, index: I) -> Option<&<I as SliceIndex<[T]>>::Output>where + I: SliceIndex<[T]>,

Returns a reference to an element or subslice depending on the type of +index.

+
    +
  • If given a position, returns a reference to the element at that +position or None if out of bounds.
  • +
  • If given a range, returns the subslice corresponding to that range, +or None if out of bounds.
  • +
+
Examples
+
let v = [10, 40, 30];
+assert_eq!(Some(&40), v.get(1));
+assert_eq!(Some(&[10, 40][..]), v.get(0..2));
+assert_eq!(None, v.get(3));
+assert_eq!(None, v.get(0..4));
+
source

pub fn get_mut<I>( + &mut self, + index: I +) -> Option<&mut <I as SliceIndex<[T]>>::Output>where + I: SliceIndex<[T]>,

Returns a mutable reference to an element or subslice depending on the +type of index (see get) or None if the index is out of bounds.

+
Examples
+
let x = &mut [0, 1, 2];
+
+if let Some(elem) = x.get_mut(1) {
+    *elem = 42;
+}
+assert_eq!(x, &[0, 42, 2]);
+
source

pub unsafe fn get_unchecked<I>( + &self, + index: I +) -> &<I as SliceIndex<[T]>>::Outputwhere + I: SliceIndex<[T]>,

Returns a reference to an element or subslice, without doing bounds +checking.

+

For a safe alternative see get.

+
Safety
+

Calling this method with an out-of-bounds index is undefined behavior +even if the resulting reference is not used.

+

You can think of this like .get(index).unwrap_unchecked(). It’s UB +to call .get_unchecked(len), even if you immediately convert to a +pointer. And it’s UB to call .get_unchecked(..len + 1), +.get_unchecked(..=len), or similar.

+
Examples
+
let x = &[1, 2, 4];
+
+unsafe {
+    assert_eq!(x.get_unchecked(1), &2);
+}
+
source

pub unsafe fn get_unchecked_mut<I>( + &mut self, + index: I +) -> &mut <I as SliceIndex<[T]>>::Outputwhere + I: SliceIndex<[T]>,

Returns a mutable reference to an element or subslice, without doing +bounds checking.

+

For a safe alternative see get_mut.

+
Safety
+

Calling this method with an out-of-bounds index is undefined behavior +even if the resulting reference is not used.

+

You can think of this like .get_mut(index).unwrap_unchecked(). It’s +UB to call .get_unchecked_mut(len), even if you immediately convert +to a pointer. And it’s UB to call .get_unchecked_mut(..len + 1), +.get_unchecked_mut(..=len), or similar.

+
Examples
+
let x = &mut [1, 2, 4];
+
+unsafe {
+    let elem = x.get_unchecked_mut(1);
+    *elem = 13;
+}
+assert_eq!(x, &[1, 13, 4]);
+
source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the slice’s buffer.

+

The caller must ensure that the slice outlives the pointer this +function returns, or else it will end up pointing to garbage.

+

The caller must also ensure that the memory the pointer (non-transitively) points to +is never written to (except inside an UnsafeCell) using this pointer or any pointer +derived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

+

Modifying the container referenced by this slice may cause its buffer +to be reallocated, which would also make any pointers to it invalid.

+
Examples
+
let x = &[1, 2, 4];
+let x_ptr = x.as_ptr();
+
+unsafe {
+    for i in 0..x.len() {
+        assert_eq!(x.get_unchecked(i), &*x_ptr.add(i));
+    }
+}
+
source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the slice’s buffer.

+

The caller must ensure that the slice outlives the pointer this +function returns, or else it will end up pointing to garbage.

+

Modifying the container referenced by this slice may cause its buffer +to be reallocated, which would also make any pointers to it invalid.

+
Examples
+
let x = &mut [1, 2, 4];
+let x_ptr = x.as_mut_ptr();
+
+unsafe {
+    for i in 0..x.len() {
+        *x_ptr.add(i) += 2;
+    }
+}
+assert_eq!(x, &[3, 4, 6]);
+
1.48.0 · source

pub fn as_ptr_range(&self) -> Range<*const T>

Returns the two raw pointers spanning the slice.

+

The returned range is half-open, which means that the end pointer +points one past the last element of the slice. This way, an empty +slice is represented by two equal pointers, and the difference between +the two pointers represents the size of the slice.

+

See as_ptr for warnings on using these pointers. The end pointer +requires extra caution, as it does not point to a valid element in the +slice.

+

This function is useful for interacting with foreign interfaces which +use two pointers to refer to a range of elements in memory, as is +common in C++.

+

It can also be useful to check if a pointer to an element refers to an +element of this slice:

+ +
let a = [1, 2, 3];
+let x = &a[1] as *const _;
+let y = &5 as *const _;
+
+assert!(a.as_ptr_range().contains(&x));
+assert!(!a.as_ptr_range().contains(&y));
+
1.48.0 · source

pub fn as_mut_ptr_range(&mut self) -> Range<*mut T>

Returns the two unsafe mutable pointers spanning the slice.

+

The returned range is half-open, which means that the end pointer +points one past the last element of the slice. This way, an empty +slice is represented by two equal pointers, and the difference between +the two pointers represents the size of the slice.

+

See as_mut_ptr for warnings on using these pointers. The end +pointer requires extra caution, as it does not point to a valid element +in the slice.

+

This function is useful for interacting with foreign interfaces which +use two pointers to refer to a range of elements in memory, as is +common in C++.

+
source

pub fn swap(&mut self, a: usize, b: usize)

Swaps two elements in the slice.

+

If a equals to b, it’s guaranteed that elements won’t change value.

+
Arguments
+
    +
  • a - The index of the first element
  • +
  • b - The index of the second element
  • +
+
Panics
+

Panics if a or b are out of bounds.

+
Examples
+
let mut v = ["a", "b", "c", "d", "e"];
+v.swap(2, 4);
+assert!(v == ["a", "b", "e", "d", "c"]);
+
source

pub unsafe fn swap_unchecked(&mut self, a: usize, b: usize)

🔬This is a nightly-only experimental API. (slice_swap_unchecked)

Swaps two elements in the slice, without doing bounds checking.

+

For a safe alternative see swap.

+
Arguments
+
    +
  • a - The index of the first element
  • +
  • b - The index of the second element
  • +
+
Safety
+

Calling this method with an out-of-bounds index is undefined behavior. +The caller has to ensure that a < self.len() and b < self.len().

+
Examples
+
#![feature(slice_swap_unchecked)]
+
+let mut v = ["a", "b", "c", "d"];
+// SAFETY: we know that 1 and 3 are both indices of the slice
+unsafe { v.swap_unchecked(1, 3) };
+assert!(v == ["a", "d", "c", "b"]);
+
source

pub fn reverse(&mut self)

Reverses the order of elements in the slice, in place.

+
Examples
+
let mut v = [1, 2, 3];
+v.reverse();
+assert!(v == [3, 2, 1]);
+
source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the slice.

+

The iterator yields all items from start to end.

+
Examples
+
let x = &[1, 2, 4];
+let mut iterator = x.iter();
+
+assert_eq!(iterator.next(), Some(&1));
+assert_eq!(iterator.next(), Some(&2));
+assert_eq!(iterator.next(), Some(&4));
+assert_eq!(iterator.next(), None);
+
source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns an iterator that allows modifying each value.

+

The iterator yields all items from start to end.

+
Examples
+
let x = &mut [1, 2, 4];
+for elem in x.iter_mut() {
+    *elem += 2;
+}
+assert_eq!(x, &[3, 4, 6]);
+
source

pub fn windows(&self, size: usize) -> Windows<'_, T>

Returns an iterator over all contiguous windows of length +size. The windows overlap. If the slice is shorter than +size, the iterator returns no values.

+
Panics
+

Panics if size is 0.

+
Examples
+
let slice = ['r', 'u', 's', 't'];
+let mut iter = slice.windows(2);
+assert_eq!(iter.next().unwrap(), &['r', 'u']);
+assert_eq!(iter.next().unwrap(), &['u', 's']);
+assert_eq!(iter.next().unwrap(), &['s', 't']);
+assert!(iter.next().is_none());
+

If the slice is shorter than size:

+ +
let slice = ['f', 'o', 'o'];
+let mut iter = slice.windows(4);
+assert!(iter.next().is_none());
+

There’s no windows_mut, as that existing would let safe code violate the +“only one &mut at a time to the same thing” rule. However, you can sometimes +use Cell::as_slice_of_cells in +conjunction with windows to accomplish something similar:

+ +
use std::cell::Cell;
+
+let mut array = ['R', 'u', 's', 't', ' ', '2', '0', '1', '5'];
+let slice = &mut array[..];
+let slice_of_cells: &[Cell<char>] = Cell::from_mut(slice).as_slice_of_cells();
+for w in slice_of_cells.windows(3) {
+    Cell::swap(&w[0], &w[2]);
+}
+assert_eq!(array, ['s', 't', ' ', '2', '0', '1', '5', 'u', 'R']);
+
source

pub fn chunks(&self, chunk_size: usize) -> Chunks<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the +beginning of the slice.

+

The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last chunk will not have length chunk_size.

+

See chunks_exact for a variant of this iterator that returns chunks of always exactly +chunk_size elements, and rchunks for the same iterator but starting at the end of the +slice.

+
Panics
+

Panics if chunk_size is 0.

+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
+let mut iter = slice.chunks(2);
+assert_eq!(iter.next().unwrap(), &['l', 'o']);
+assert_eq!(iter.next().unwrap(), &['r', 'e']);
+assert_eq!(iter.next().unwrap(), &['m']);
+assert!(iter.next().is_none());
+
source

pub fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the +beginning of the slice.

+

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the +length of the slice, then the last chunk will not have length chunk_size.

+

See chunks_exact_mut for a variant of this iterator that returns chunks of always +exactly chunk_size elements, and rchunks_mut for the same iterator but starting at +the end of the slice.

+
Panics
+

Panics if chunk_size is 0.

+
Examples
+
let v = &mut [0, 0, 0, 0, 0];
+let mut count = 1;
+
+for chunk in v.chunks_mut(2) {
+    for elem in chunk.iter_mut() {
+        *elem += count;
+    }
+    count += 1;
+}
+assert_eq!(v, &[1, 1, 2, 2, 3]);
+
1.31.0 · source

pub fn chunks_exact(&self, chunk_size: usize) -> ChunksExact<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the +beginning of the slice.

+

The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved +from the remainder function of the iterator.

+

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the +resulting code better than in the case of chunks.

+

See chunks for a variant of this iterator that also returns the remainder as a smaller +chunk, and rchunks_exact for the same iterator but starting at the end of the slice.

+
Panics
+

Panics if chunk_size is 0.

+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
+let mut iter = slice.chunks_exact(2);
+assert_eq!(iter.next().unwrap(), &['l', 'o']);
+assert_eq!(iter.next().unwrap(), &['r', 'e']);
+assert!(iter.next().is_none());
+assert_eq!(iter.remainder(), &['m']);
+
1.31.0 · source

pub fn chunks_exact_mut(&mut self, chunk_size: usize) -> ChunksExactMut<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the +beginning of the slice.

+

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the +length of the slice, then the last up to chunk_size-1 elements will be omitted and can be +retrieved from the into_remainder function of the iterator.

+

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the +resulting code better than in the case of chunks_mut.

+

See chunks_mut for a variant of this iterator that also returns the remainder as a +smaller chunk, and rchunks_exact_mut for the same iterator but starting at the end of +the slice.

+
Panics
+

Panics if chunk_size is 0.

+
Examples
+
let v = &mut [0, 0, 0, 0, 0];
+let mut count = 1;
+
+for chunk in v.chunks_exact_mut(2) {
+    for elem in chunk.iter_mut() {
+        *elem += count;
+    }
+    count += 1;
+}
+assert_eq!(v, &[1, 1, 2, 2, 0]);
+
source

pub unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]]

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +assuming that there’s no remainder.

+
Safety
+

This may only be called when

+
    +
  • The slice splits exactly into N-element chunks (aka self.len() % N == 0).
  • +
  • N != 0.
  • +
+
Examples
+
#![feature(slice_as_chunks)]
+let slice: &[char] = &['l', 'o', 'r', 'e', 'm', '!'];
+let chunks: &[[char; 1]] =
+    // SAFETY: 1-element chunks never have remainder
+    unsafe { slice.as_chunks_unchecked() };
+assert_eq!(chunks, &[['l'], ['o'], ['r'], ['e'], ['m'], ['!']]);
+let chunks: &[[char; 3]] =
+    // SAFETY: The slice length (6) is a multiple of 3
+    unsafe { slice.as_chunks_unchecked() };
+assert_eq!(chunks, &[['l', 'o', 'r'], ['e', 'm', '!']]);
+
+// These would be unsound:
+// let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
+// let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
+
source

pub fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +starting at the beginning of the slice, +and a remainder slice with length strictly less than N.

+
Panics
+

Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

+
Examples
+
#![feature(slice_as_chunks)]
+let slice = ['l', 'o', 'r', 'e', 'm'];
+let (chunks, remainder) = slice.as_chunks();
+assert_eq!(chunks, &[['l', 'o'], ['r', 'e']]);
+assert_eq!(remainder, &['m']);
+

If you expect the slice to be an exact multiple, you can combine +let-else with an empty slice pattern:

+ +
#![feature(slice_as_chunks)]
+let slice = ['R', 'u', 's', 't'];
+let (chunks, []) = slice.as_chunks::<2>() else {
+    panic!("slice didn't have even length")
+};
+assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
+
source

pub fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +starting at the end of the slice, +and a remainder slice with length strictly less than N.

+
Panics
+

Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

+
Examples
+
#![feature(slice_as_chunks)]
+let slice = ['l', 'o', 'r', 'e', 'm'];
+let (remainder, chunks) = slice.as_rchunks();
+assert_eq!(remainder, &['l']);
+assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
+
source

pub fn array_chunks<const N: usize>(&self) -> ArrayChunks<'_, T, N>

🔬This is a nightly-only experimental API. (array_chunks)

Returns an iterator over N elements of the slice at a time, starting at the +beginning of the slice.

+

The chunks are array references and do not overlap. If N does not divide the +length of the slice, then the last up to N-1 elements will be omitted and can be +retrieved from the remainder function of the iterator.

+

This method is the const generic equivalent of chunks_exact.

+
Panics
+

Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

+
Examples
+
#![feature(array_chunks)]
+let slice = ['l', 'o', 'r', 'e', 'm'];
+let mut iter = slice.array_chunks();
+assert_eq!(iter.next().unwrap(), &['l', 'o']);
+assert_eq!(iter.next().unwrap(), &['r', 'e']);
+assert!(iter.next().is_none());
+assert_eq!(iter.remainder(), &['m']);
+
source

pub unsafe fn as_chunks_unchecked_mut<const N: usize>( + &mut self +) -> &mut [[T; N]]

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +assuming that there’s no remainder.

+
Safety
+

This may only be called when

+
    +
  • The slice splits exactly into N-element chunks (aka self.len() % N == 0).
  • +
  • N != 0.
  • +
+
Examples
+
#![feature(slice_as_chunks)]
+let slice: &mut [char] = &mut ['l', 'o', 'r', 'e', 'm', '!'];
+let chunks: &mut [[char; 1]] =
+    // SAFETY: 1-element chunks never have remainder
+    unsafe { slice.as_chunks_unchecked_mut() };
+chunks[0] = ['L'];
+assert_eq!(chunks, &[['L'], ['o'], ['r'], ['e'], ['m'], ['!']]);
+let chunks: &mut [[char; 3]] =
+    // SAFETY: The slice length (6) is a multiple of 3
+    unsafe { slice.as_chunks_unchecked_mut() };
+chunks[1] = ['a', 'x', '?'];
+assert_eq!(slice, &['L', 'o', 'r', 'a', 'x', '?']);
+
+// These would be unsound:
+// let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5
+// let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
+
source

pub fn as_chunks_mut<const N: usize>(&mut self) -> (&mut [[T; N]], &mut [T])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +starting at the beginning of the slice, +and a remainder slice with length strictly less than N.

+
Panics
+

Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

+
Examples
+
#![feature(slice_as_chunks)]
+let v = &mut [0, 0, 0, 0, 0];
+let mut count = 1;
+
+let (chunks, remainder) = v.as_chunks_mut();
+remainder[0] = 9;
+for chunk in chunks {
+    *chunk = [count; 2];
+    count += 1;
+}
+assert_eq!(v, &[1, 1, 2, 2, 9]);
+
source

pub fn as_rchunks_mut<const N: usize>(&mut self) -> (&mut [T], &mut [[T; N]])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +starting at the end of the slice, +and a remainder slice with length strictly less than N.

+
Panics
+

Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

+
Examples
+
#![feature(slice_as_chunks)]
+let v = &mut [0, 0, 0, 0, 0];
+let mut count = 1;
+
+let (remainder, chunks) = v.as_rchunks_mut();
+remainder[0] = 9;
+for chunk in chunks {
+    *chunk = [count; 2];
+    count += 1;
+}
+assert_eq!(v, &[9, 1, 1, 2, 2]);
+
source

pub fn array_chunks_mut<const N: usize>(&mut self) -> ArrayChunksMut<'_, T, N>

🔬This is a nightly-only experimental API. (array_chunks)

Returns an iterator over N elements of the slice at a time, starting at the +beginning of the slice.

+

The chunks are mutable array references and do not overlap. If N does not divide +the length of the slice, then the last up to N-1 elements will be omitted and +can be retrieved from the into_remainder function of the iterator.

+

This method is the const generic equivalent of chunks_exact_mut.

+
Panics
+

Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

+
Examples
+
#![feature(array_chunks)]
+let v = &mut [0, 0, 0, 0, 0];
+let mut count = 1;
+
+for chunk in v.array_chunks_mut() {
+    *chunk = [count; 2];
+    count += 1;
+}
+assert_eq!(v, &[1, 1, 2, 2, 0]);
+
source

pub fn array_windows<const N: usize>(&self) -> ArrayWindows<'_, T, N>

🔬This is a nightly-only experimental API. (array_windows)

Returns an iterator over overlapping windows of N elements of a slice, +starting at the beginning of the slice.

+

This is the const generic equivalent of windows.

+

If N is greater than the size of the slice, it will return no windows.

+
Panics
+

Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

+
Examples
+
#![feature(array_windows)]
+let slice = [0, 1, 2, 3];
+let mut iter = slice.array_windows();
+assert_eq!(iter.next().unwrap(), &[0, 1]);
+assert_eq!(iter.next().unwrap(), &[1, 2]);
+assert_eq!(iter.next().unwrap(), &[2, 3]);
+assert!(iter.next().is_none());
+
1.31.0 · source

pub fn rchunks(&self, chunk_size: usize) -> RChunks<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the end +of the slice.

+

The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last chunk will not have length chunk_size.

+

See rchunks_exact for a variant of this iterator that returns chunks of always exactly +chunk_size elements, and chunks for the same iterator but starting at the beginning +of the slice.

+
Panics
+

Panics if chunk_size is 0.

+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
+let mut iter = slice.rchunks(2);
+assert_eq!(iter.next().unwrap(), &['e', 'm']);
+assert_eq!(iter.next().unwrap(), &['o', 'r']);
+assert_eq!(iter.next().unwrap(), &['l']);
+assert!(iter.next().is_none());
+
1.31.0 · source

pub fn rchunks_mut(&mut self, chunk_size: usize) -> RChunksMut<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the end +of the slice.

+

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the +length of the slice, then the last chunk will not have length chunk_size.

+

See rchunks_exact_mut for a variant of this iterator that returns chunks of always +exactly chunk_size elements, and chunks_mut for the same iterator but starting at the +beginning of the slice.

+
Panics
+

Panics if chunk_size is 0.

+
Examples
+
let v = &mut [0, 0, 0, 0, 0];
+let mut count = 1;
+
+for chunk in v.rchunks_mut(2) {
+    for elem in chunk.iter_mut() {
+        *elem += count;
+    }
+    count += 1;
+}
+assert_eq!(v, &[3, 2, 2, 1, 1]);
+
1.31.0 · source

pub fn rchunks_exact(&self, chunk_size: usize) -> RChunksExact<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the +end of the slice.

+

The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved +from the remainder function of the iterator.

+

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the +resulting code better than in the case of rchunks.

+

See rchunks for a variant of this iterator that also returns the remainder as a smaller +chunk, and chunks_exact for the same iterator but starting at the beginning of the +slice.

+
Panics
+

Panics if chunk_size is 0.

+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
+let mut iter = slice.rchunks_exact(2);
+assert_eq!(iter.next().unwrap(), &['e', 'm']);
+assert_eq!(iter.next().unwrap(), &['o', 'r']);
+assert!(iter.next().is_none());
+assert_eq!(iter.remainder(), &['l']);
+
1.31.0 · source

pub fn rchunks_exact_mut(&mut self, chunk_size: usize) -> RChunksExactMut<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the end +of the slice.

+

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the +length of the slice, then the last up to chunk_size-1 elements will be omitted and can be +retrieved from the into_remainder function of the iterator.

+

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the +resulting code better than in the case of chunks_mut.

+

See rchunks_mut for a variant of this iterator that also returns the remainder as a +smaller chunk, and chunks_exact_mut for the same iterator but starting at the beginning +of the slice.

+
Panics
+

Panics if chunk_size is 0.

+
Examples
+
let v = &mut [0, 0, 0, 0, 0];
+let mut count = 1;
+
+for chunk in v.rchunks_exact_mut(2) {
+    for elem in chunk.iter_mut() {
+        *elem += count;
+    }
+    count += 1;
+}
+assert_eq!(v, &[0, 2, 2, 1, 1]);
+
source

pub fn group_by<F>(&self, pred: F) -> GroupBy<'_, T, F>where + F: FnMut(&T, &T) -> bool,

🔬This is a nightly-only experimental API. (slice_group_by)

Returns an iterator over the slice producing non-overlapping runs +of elements using the predicate to separate them.

+

The predicate is called on two elements following themselves, +it means the predicate is called on slice[0] and slice[1] +then on slice[1] and slice[2] and so on.

+
Examples
+
#![feature(slice_group_by)]
+
+let slice = &[1, 1, 1, 3, 3, 2, 2, 2];
+
+let mut iter = slice.group_by(|a, b| a == b);
+
+assert_eq!(iter.next(), Some(&[1, 1, 1][..]));
+assert_eq!(iter.next(), Some(&[3, 3][..]));
+assert_eq!(iter.next(), Some(&[2, 2, 2][..]));
+assert_eq!(iter.next(), None);
+

This method can be used to extract the sorted subslices:

+ +
#![feature(slice_group_by)]
+
+let slice = &[1, 1, 2, 3, 2, 3, 2, 3, 4];
+
+let mut iter = slice.group_by(|a, b| a <= b);
+
+assert_eq!(iter.next(), Some(&[1, 1, 2, 3][..]));
+assert_eq!(iter.next(), Some(&[2, 3][..]));
+assert_eq!(iter.next(), Some(&[2, 3, 4][..]));
+assert_eq!(iter.next(), None);
+
source

pub fn group_by_mut<F>(&mut self, pred: F) -> GroupByMut<'_, T, F>where + F: FnMut(&T, &T) -> bool,

🔬This is a nightly-only experimental API. (slice_group_by)

Returns an iterator over the slice producing non-overlapping mutable +runs of elements using the predicate to separate them.

+

The predicate is called on two elements following themselves, +it means the predicate is called on slice[0] and slice[1] +then on slice[1] and slice[2] and so on.

+
Examples
+
#![feature(slice_group_by)]
+
+let slice = &mut [1, 1, 1, 3, 3, 2, 2, 2];
+
+let mut iter = slice.group_by_mut(|a, b| a == b);
+
+assert_eq!(iter.next(), Some(&mut [1, 1, 1][..]));
+assert_eq!(iter.next(), Some(&mut [3, 3][..]));
+assert_eq!(iter.next(), Some(&mut [2, 2, 2][..]));
+assert_eq!(iter.next(), None);
+

This method can be used to extract the sorted subslices:

+ +
#![feature(slice_group_by)]
+
+let slice = &mut [1, 1, 2, 3, 2, 3, 2, 3, 4];
+
+let mut iter = slice.group_by_mut(|a, b| a <= b);
+
+assert_eq!(iter.next(), Some(&mut [1, 1, 2, 3][..]));
+assert_eq!(iter.next(), Some(&mut [2, 3][..]));
+assert_eq!(iter.next(), Some(&mut [2, 3, 4][..]));
+assert_eq!(iter.next(), None);
+
source

pub fn split_at(&self, mid: usize) -> (&[T], &[T])

Divides one slice into two at an index.

+

The first will contain all indices from [0, mid) (excluding +the index mid itself) and the second will contain all +indices from [mid, len) (excluding the index len itself).

+
Panics
+

Panics if mid > len.

+
Examples
+
let v = [1, 2, 3, 4, 5, 6];
+
+{
+   let (left, right) = v.split_at(0);
+   assert_eq!(left, []);
+   assert_eq!(right, [1, 2, 3, 4, 5, 6]);
+}
+
+{
+    let (left, right) = v.split_at(2);
+    assert_eq!(left, [1, 2]);
+    assert_eq!(right, [3, 4, 5, 6]);
+}
+
+{
+    let (left, right) = v.split_at(6);
+    assert_eq!(left, [1, 2, 3, 4, 5, 6]);
+    assert_eq!(right, []);
+}
+
source

pub fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T])

Divides one mutable slice into two at an index.

+

The first will contain all indices from [0, mid) (excluding +the index mid itself) and the second will contain all +indices from [mid, len) (excluding the index len itself).

+
Panics
+

Panics if mid > len.

+
Examples
+
let mut v = [1, 0, 3, 0, 5, 6];
+let (left, right) = v.split_at_mut(2);
+assert_eq!(left, [1, 0]);
+assert_eq!(right, [3, 0, 5, 6]);
+left[1] = 2;
+right[1] = 4;
+assert_eq!(v, [1, 2, 3, 4, 5, 6]);
+
source

pub unsafe fn split_at_unchecked(&self, mid: usize) -> (&[T], &[T])

🔬This is a nightly-only experimental API. (slice_split_at_unchecked)

Divides one slice into two at an index, without doing bounds checking.

+

The first will contain all indices from [0, mid) (excluding +the index mid itself) and the second will contain all +indices from [mid, len) (excluding the index len itself).

+

For a safe alternative see split_at.

+
Safety
+

Calling this method with an out-of-bounds index is undefined behavior +even if the resulting reference is not used. The caller has to ensure that +0 <= mid <= self.len().

+
Examples
+
#![feature(slice_split_at_unchecked)]
+
+let v = [1, 2, 3, 4, 5, 6];
+
+unsafe {
+   let (left, right) = v.split_at_unchecked(0);
+   assert_eq!(left, []);
+   assert_eq!(right, [1, 2, 3, 4, 5, 6]);
+}
+
+unsafe {
+    let (left, right) = v.split_at_unchecked(2);
+    assert_eq!(left, [1, 2]);
+    assert_eq!(right, [3, 4, 5, 6]);
+}
+
+unsafe {
+    let (left, right) = v.split_at_unchecked(6);
+    assert_eq!(left, [1, 2, 3, 4, 5, 6]);
+    assert_eq!(right, []);
+}
+
source

pub unsafe fn split_at_mut_unchecked( + &mut self, + mid: usize +) -> (&mut [T], &mut [T])

🔬This is a nightly-only experimental API. (slice_split_at_unchecked)

Divides one mutable slice into two at an index, without doing bounds checking.

+

The first will contain all indices from [0, mid) (excluding +the index mid itself) and the second will contain all +indices from [mid, len) (excluding the index len itself).

+

For a safe alternative see split_at_mut.

+
Safety
+

Calling this method with an out-of-bounds index is undefined behavior +even if the resulting reference is not used. The caller has to ensure that +0 <= mid <= self.len().

+
Examples
+
#![feature(slice_split_at_unchecked)]
+
+let mut v = [1, 0, 3, 0, 5, 6];
+// scoped to restrict the lifetime of the borrows
+unsafe {
+    let (left, right) = v.split_at_mut_unchecked(2);
+    assert_eq!(left, [1, 0]);
+    assert_eq!(right, [3, 0, 5, 6]);
+    left[1] = 2;
+    right[1] = 4;
+}
+assert_eq!(v, [1, 2, 3, 4, 5, 6]);
+
source

pub fn split_array_ref<const N: usize>(&self) -> (&[T; N], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one slice into an array and a remainder slice at an index.

+

The array will contain all indices from [0, N) (excluding +the index N itself) and the slice will contain all +indices from [N, len) (excluding the index len itself).

+
Panics
+

Panics if N > len.

+
Examples
+
#![feature(split_array)]
+
+let v = &[1, 2, 3, 4, 5, 6][..];
+
+{
+   let (left, right) = v.split_array_ref::<0>();
+   assert_eq!(left, &[]);
+   assert_eq!(right, [1, 2, 3, 4, 5, 6]);
+}
+
+{
+    let (left, right) = v.split_array_ref::<2>();
+    assert_eq!(left, &[1, 2]);
+    assert_eq!(right, [3, 4, 5, 6]);
+}
+
+{
+    let (left, right) = v.split_array_ref::<6>();
+    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
+    assert_eq!(right, []);
+}
+
source

pub fn split_array_mut<const N: usize>(&mut self) -> (&mut [T; N], &mut [T])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable slice into an array and a remainder slice at an index.

+

The array will contain all indices from [0, N) (excluding +the index N itself) and the slice will contain all +indices from [N, len) (excluding the index len itself).

+
Panics
+

Panics if N > len.

+
Examples
+
#![feature(split_array)]
+
+let mut v = &mut [1, 0, 3, 0, 5, 6][..];
+let (left, right) = v.split_array_mut::<2>();
+assert_eq!(left, &mut [1, 0]);
+assert_eq!(right, [3, 0, 5, 6]);
+left[1] = 2;
+right[1] = 4;
+assert_eq!(v, [1, 2, 3, 4, 5, 6]);
+
source

pub fn rsplit_array_ref<const N: usize>(&self) -> (&[T], &[T; N])

🔬This is a nightly-only experimental API. (split_array)

Divides one slice into an array and a remainder slice at an index from +the end.

+

The slice will contain all indices from [0, len - N) (excluding +the index len - N itself) and the array will contain all +indices from [len - N, len) (excluding the index len itself).

+
Panics
+

Panics if N > len.

+
Examples
+
#![feature(split_array)]
+
+let v = &[1, 2, 3, 4, 5, 6][..];
+
+{
+   let (left, right) = v.rsplit_array_ref::<0>();
+   assert_eq!(left, [1, 2, 3, 4, 5, 6]);
+   assert_eq!(right, &[]);
+}
+
+{
+    let (left, right) = v.rsplit_array_ref::<2>();
+    assert_eq!(left, [1, 2, 3, 4]);
+    assert_eq!(right, &[5, 6]);
+}
+
+{
+    let (left, right) = v.rsplit_array_ref::<6>();
+    assert_eq!(left, []);
+    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
+}
+
source

pub fn rsplit_array_mut<const N: usize>(&mut self) -> (&mut [T], &mut [T; N])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable slice into an array and a remainder slice at an +index from the end.

+

The slice will contain all indices from [0, len - N) (excluding +the index N itself) and the array will contain all +indices from [len - N, len) (excluding the index len itself).

+
Panics
+

Panics if N > len.

+
Examples
+
#![feature(split_array)]
+
+let mut v = &mut [1, 0, 3, 0, 5, 6][..];
+let (left, right) = v.rsplit_array_mut::<4>();
+assert_eq!(left, [1, 0]);
+assert_eq!(right, &mut [3, 0, 5, 6]);
+left[1] = 2;
+right[1] = 4;
+assert_eq!(v, [1, 2, 3, 4, 5, 6]);
+
source

pub fn split<F>(&self, pred: F) -> Split<'_, T, F>where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +pred. The matched element is not contained in the subslices.

+
Examples
+
let slice = [10, 40, 33, 20];
+let mut iter = slice.split(|num| num % 3 == 0);
+
+assert_eq!(iter.next().unwrap(), &[10, 40]);
+assert_eq!(iter.next().unwrap(), &[20]);
+assert!(iter.next().is_none());
+

If the first element is matched, an empty slice will be the first item +returned by the iterator. Similarly, if the last element in the slice +is matched, an empty slice will be the last item returned by the +iterator:

+ +
let slice = [10, 40, 33];
+let mut iter = slice.split(|num| num % 3 == 0);
+
+assert_eq!(iter.next().unwrap(), &[10, 40]);
+assert_eq!(iter.next().unwrap(), &[]);
+assert!(iter.next().is_none());
+

If two matched elements are directly adjacent, an empty slice will be +present between them:

+ +
let slice = [10, 6, 33, 20];
+let mut iter = slice.split(|num| num % 3 == 0);
+
+assert_eq!(iter.next().unwrap(), &[10]);
+assert_eq!(iter.next().unwrap(), &[]);
+assert_eq!(iter.next().unwrap(), &[20]);
+assert!(iter.next().is_none());
+
source

pub fn split_mut<F>(&mut self, pred: F) -> SplitMut<'_, T, F>where + F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that +match pred. The matched element is not contained in the subslices.

+
Examples
+
let mut v = [10, 40, 30, 20, 60, 50];
+
+for group in v.split_mut(|num| *num % 3 == 0) {
+    group[0] = 1;
+}
+assert_eq!(v, [1, 40, 30, 1, 60, 1]);
+
1.51.0 · source

pub fn split_inclusive<F>(&self, pred: F) -> SplitInclusive<'_, T, F>where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +pred. The matched element is contained in the end of the previous +subslice as a terminator.

+
Examples
+
let slice = [10, 40, 33, 20];
+let mut iter = slice.split_inclusive(|num| num % 3 == 0);
+
+assert_eq!(iter.next().unwrap(), &[10, 40, 33]);
+assert_eq!(iter.next().unwrap(), &[20]);
+assert!(iter.next().is_none());
+

If the last element of the slice is matched, +that element will be considered the terminator of the preceding slice. +That slice will be the last item returned by the iterator.

+ +
let slice = [3, 10, 40, 33];
+let mut iter = slice.split_inclusive(|num| num % 3 == 0);
+
+assert_eq!(iter.next().unwrap(), &[3]);
+assert_eq!(iter.next().unwrap(), &[10, 40, 33]);
+assert!(iter.next().is_none());
+
1.51.0 · source

pub fn split_inclusive_mut<F>(&mut self, pred: F) -> SplitInclusiveMut<'_, T, F>where + F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that +match pred. The matched element is contained in the previous +subslice as a terminator.

+
Examples
+
let mut v = [10, 40, 30, 20, 60, 50];
+
+for group in v.split_inclusive_mut(|num| *num % 3 == 0) {
+    let terminator_idx = group.len()-1;
+    group[terminator_idx] = 1;
+}
+assert_eq!(v, [10, 40, 1, 20, 1, 1]);
+
1.27.0 · source

pub fn rsplit<F>(&self, pred: F) -> RSplit<'_, T, F>where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +pred, starting at the end of the slice and working backwards. +The matched element is not contained in the subslices.

+
Examples
+
let slice = [11, 22, 33, 0, 44, 55];
+let mut iter = slice.rsplit(|num| *num == 0);
+
+assert_eq!(iter.next().unwrap(), &[44, 55]);
+assert_eq!(iter.next().unwrap(), &[11, 22, 33]);
+assert_eq!(iter.next(), None);
+

As with split(), if the first or last element is matched, an empty +slice will be the first (or last) item returned by the iterator.

+ +
let v = &[0, 1, 1, 2, 3, 5, 8];
+let mut it = v.rsplit(|n| *n % 2 == 0);
+assert_eq!(it.next().unwrap(), &[]);
+assert_eq!(it.next().unwrap(), &[3, 5]);
+assert_eq!(it.next().unwrap(), &[1, 1]);
+assert_eq!(it.next().unwrap(), &[]);
+assert_eq!(it.next(), None);
+
1.27.0 · source

pub fn rsplit_mut<F>(&mut self, pred: F) -> RSplitMut<'_, T, F>where + F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that +match pred, starting at the end of the slice and working +backwards. The matched element is not contained in the subslices.

+
Examples
+
let mut v = [100, 400, 300, 200, 600, 500];
+
+let mut count = 0;
+for group in v.rsplit_mut(|num| *num % 3 == 0) {
+    count += 1;
+    group[0] = count;
+}
+assert_eq!(v, [3, 400, 300, 2, 600, 1]);
+
source

pub fn splitn<F>(&self, n: usize, pred: F) -> SplitN<'_, T, F>where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +pred, limited to returning at most n items. The matched element is +not contained in the subslices.

+

The last element returned, if any, will contain the remainder of the +slice.

+
Examples
+

Print the slice split once by numbers divisible by 3 (i.e., [10, 40], +[20, 60, 50]):

+ +
let v = [10, 40, 30, 20, 60, 50];
+
+for group in v.splitn(2, |num| *num % 3 == 0) {
+    println!("{group:?}");
+}
+
source

pub fn splitn_mut<F>(&mut self, n: usize, pred: F) -> SplitNMut<'_, T, F>where + F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that match +pred, limited to returning at most n items. The matched element is +not contained in the subslices.

+

The last element returned, if any, will contain the remainder of the +slice.

+
Examples
+
let mut v = [10, 40, 30, 20, 60, 50];
+
+for group in v.splitn_mut(2, |num| *num % 3 == 0) {
+    group[0] = 1;
+}
+assert_eq!(v, [1, 40, 30, 1, 60, 50]);
+
source

pub fn rsplitn<F>(&self, n: usize, pred: F) -> RSplitN<'_, T, F>where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +pred limited to returning at most n items. This starts at the end of +the slice and works backwards. The matched element is not contained in +the subslices.

+

The last element returned, if any, will contain the remainder of the +slice.

+
Examples
+

Print the slice split once, starting from the end, by numbers divisible +by 3 (i.e., [50], [10, 40, 30, 20]):

+ +
let v = [10, 40, 30, 20, 60, 50];
+
+for group in v.rsplitn(2, |num| *num % 3 == 0) {
+    println!("{group:?}");
+}
+
source

pub fn rsplitn_mut<F>(&mut self, n: usize, pred: F) -> RSplitNMut<'_, T, F>where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +pred limited to returning at most n items. This starts at the end of +the slice and works backwards. The matched element is not contained in +the subslices.

+

The last element returned, if any, will contain the remainder of the +slice.

+
Examples
+
let mut s = [10, 40, 30, 20, 60, 50];
+
+for group in s.rsplitn_mut(2, |num| *num % 3 == 0) {
+    group[0] = 1;
+}
+assert_eq!(s, [1, 40, 30, 20, 60, 1]);
+
source

pub fn split_once<F>(&self, pred: F) -> Option<(&[T], &[T])>where + F: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (slice_split_once)

Splits the slice on the first element that matches the specified +predicate.

+

If any matching elements are resent in the slice, returns the prefix +before the match and suffix after. The matching element itself is not +included. If no elements match, returns None.

+
Examples
+
#![feature(slice_split_once)]
+let s = [1, 2, 3, 2, 4];
+assert_eq!(s.split_once(|&x| x == 2), Some((
+    &[1][..],
+    &[3, 2, 4][..]
+)));
+assert_eq!(s.split_once(|&x| x == 0), None);
+
source

pub fn rsplit_once<F>(&self, pred: F) -> Option<(&[T], &[T])>where + F: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (slice_split_once)

Splits the slice on the last element that matches the specified +predicate.

+

If any matching elements are resent in the slice, returns the prefix +before the match and suffix after. The matching element itself is not +included. If no elements match, returns None.

+
Examples
+
#![feature(slice_split_once)]
+let s = [1, 2, 3, 2, 4];
+assert_eq!(s.rsplit_once(|&x| x == 2), Some((
+    &[1, 2, 3][..],
+    &[4][..]
+)));
+assert_eq!(s.rsplit_once(|&x| x == 0), None);
+
source

pub fn contains(&self, x: &T) -> boolwhere + T: PartialEq,

Returns true if the slice contains an element with the given value.

+

This operation is O(n).

+

Note that if you have a sorted slice, binary_search may be faster.

+
Examples
+
let v = [10, 40, 30];
+assert!(v.contains(&30));
+assert!(!v.contains(&50));
+

If you do not have a &T, but some other value that you can compare +with one (for example, String implements PartialEq<str>), you can +use iter().any:

+ +
let v = [String::from("hello"), String::from("world")]; // slice of `String`
+assert!(v.iter().any(|e| e == "hello")); // search with `&str`
+assert!(!v.iter().any(|e| e == "hi"));
+
source

pub fn starts_with(&self, needle: &[T]) -> boolwhere + T: PartialEq,

Returns true if needle is a prefix of the slice.

+
Examples
+
let v = [10, 40, 30];
+assert!(v.starts_with(&[10]));
+assert!(v.starts_with(&[10, 40]));
+assert!(!v.starts_with(&[50]));
+assert!(!v.starts_with(&[10, 50]));
+

Always returns true if needle is an empty slice:

+ +
let v = &[10, 40, 30];
+assert!(v.starts_with(&[]));
+let v: &[u8] = &[];
+assert!(v.starts_with(&[]));
+
source

pub fn ends_with(&self, needle: &[T]) -> boolwhere + T: PartialEq,

Returns true if needle is a suffix of the slice.

+
Examples
+
let v = [10, 40, 30];
+assert!(v.ends_with(&[30]));
+assert!(v.ends_with(&[40, 30]));
+assert!(!v.ends_with(&[50]));
+assert!(!v.ends_with(&[50, 30]));
+

Always returns true if needle is an empty slice:

+ +
let v = &[10, 40, 30];
+assert!(v.ends_with(&[]));
+let v: &[u8] = &[];
+assert!(v.ends_with(&[]));
+
1.51.0 · source

pub fn strip_prefix<P>(&self, prefix: &P) -> Option<&[T]>where + P: SlicePattern<Item = T> + ?Sized, + T: PartialEq,

Returns a subslice with the prefix removed.

+

If the slice starts with prefix, returns the subslice after the prefix, wrapped in Some. +If prefix is empty, simply returns the original slice.

+

If the slice does not start with prefix, returns None.

+
Examples
+
let v = &[10, 40, 30];
+assert_eq!(v.strip_prefix(&[10]), Some(&[40, 30][..]));
+assert_eq!(v.strip_prefix(&[10, 40]), Some(&[30][..]));
+assert_eq!(v.strip_prefix(&[50]), None);
+assert_eq!(v.strip_prefix(&[10, 50]), None);
+
+let prefix : &str = "he";
+assert_eq!(b"hello".strip_prefix(prefix.as_bytes()),
+           Some(b"llo".as_ref()));
+
1.51.0 · source

pub fn strip_suffix<P>(&self, suffix: &P) -> Option<&[T]>where + P: SlicePattern<Item = T> + ?Sized, + T: PartialEq,

Returns a subslice with the suffix removed.

+

If the slice ends with suffix, returns the subslice before the suffix, wrapped in Some. +If suffix is empty, simply returns the original slice.

+

If the slice does not end with suffix, returns None.

+
Examples
+
let v = &[10, 40, 30];
+assert_eq!(v.strip_suffix(&[30]), Some(&[10, 40][..]));
+assert_eq!(v.strip_suffix(&[40, 30]), Some(&[10][..]));
+assert_eq!(v.strip_suffix(&[50]), None);
+assert_eq!(v.strip_suffix(&[50, 30]), None);
+

Binary searches this slice for a given element. +If the slice is not sorted, the returned result is unspecified and +meaningless.

+

If the value is found then Result::Ok is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then Result::Err is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.

+

See also binary_search_by, binary_search_by_key, and partition_point.

+
Examples
+

Looks up a series of four elements. The first is found, with a +uniquely determined position; the second and third are not +found; the fourth could match any position in [1, 4].

+ +
let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
+
+assert_eq!(s.binary_search(&13),  Ok(9));
+assert_eq!(s.binary_search(&4),   Err(7));
+assert_eq!(s.binary_search(&100), Err(13));
+let r = s.binary_search(&1);
+assert!(match r { Ok(1..=4) => true, _ => false, });
+

If you want to find that whole range of matching items, rather than +an arbitrary matching one, that can be done using partition_point:

+ +
let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
+
+let low = s.partition_point(|x| x < &1);
+assert_eq!(low, 1);
+let high = s.partition_point(|x| x <= &1);
+assert_eq!(high, 5);
+let r = s.binary_search(&1);
+assert!((low..high).contains(&r.unwrap()));
+
+assert!(s[..low].iter().all(|&x| x < 1));
+assert!(s[low..high].iter().all(|&x| x == 1));
+assert!(s[high..].iter().all(|&x| x > 1));
+
+// For something not found, the "range" of equal items is empty
+assert_eq!(s.partition_point(|x| x < &11), 9);
+assert_eq!(s.partition_point(|x| x <= &11), 9);
+assert_eq!(s.binary_search(&11), Err(9));
+

If you want to insert an item to a sorted vector, while maintaining +sort order, consider using partition_point:

+ +
let mut s = vec![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
+let num = 42;
+let idx = s.partition_point(|&x| x < num);
+// The above is equivalent to `let idx = s.binary_search(&num).unwrap_or_else(|x| x);`
+s.insert(idx, num);
+assert_eq!(s, [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55]);
+
source

pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>where + F: FnMut(&'a T) -> Ordering,

Binary searches this slice with a comparator function.

+

The comparator function should return an order code that indicates +whether its argument is Less, Equal or Greater the desired +target. +If the slice is not sorted or if the comparator function does not +implement an order consistent with the sort order of the underlying +slice, the returned result is unspecified and meaningless.

+

If the value is found then Result::Ok is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then Result::Err is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.

+

See also binary_search, binary_search_by_key, and partition_point.

+
Examples
+

Looks up a series of four elements. The first is found, with a +uniquely determined position; the second and third are not +found; the fourth could match any position in [1, 4].

+ +
let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
+
+let seek = 13;
+assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Ok(9));
+let seek = 4;
+assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Err(7));
+let seek = 100;
+assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Err(13));
+let seek = 1;
+let r = s.binary_search_by(|probe| probe.cmp(&seek));
+assert!(match r { Ok(1..=4) => true, _ => false, });
+
1.10.0 · source

pub fn binary_search_by_key<'a, B, F>( + &'a self, + b: &B, + f: F +) -> Result<usize, usize>where + F: FnMut(&'a T) -> B, + B: Ord,

Binary searches this slice with a key extraction function.

+

Assumes that the slice is sorted by the key, for instance with +sort_by_key using the same key extraction function. +If the slice is not sorted by the key, the returned result is +unspecified and meaningless.

+

If the value is found then Result::Ok is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then Result::Err is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.

+

See also binary_search, binary_search_by, and partition_point.

+
Examples
+

Looks up a series of four elements in a slice of pairs sorted by +their second elements. The first is found, with a uniquely +determined position; the second and third are not found; the +fourth could match any position in [1, 4].

+ +
let s = [(0, 0), (2, 1), (4, 1), (5, 1), (3, 1),
+         (1, 2), (2, 3), (4, 5), (5, 8), (3, 13),
+         (1, 21), (2, 34), (4, 55)];
+
+assert_eq!(s.binary_search_by_key(&13, |&(a, b)| b),  Ok(9));
+assert_eq!(s.binary_search_by_key(&4, |&(a, b)| b),   Err(7));
+assert_eq!(s.binary_search_by_key(&100, |&(a, b)| b), Err(13));
+let r = s.binary_search_by_key(&1, |&(a, b)| b);
+assert!(match r { Ok(1..=4) => true, _ => false, });
+
1.20.0 · source

pub fn sort_unstable(&mut self)where + T: Ord,

Sorts the slice, but might not preserve the order of equal elements.

+

This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and O(n * log(n)) worst-case.

+
Current implementation
+

The current algorithm is based on pattern-defeating quicksort by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.

+

It is typically faster than stable sorting, except in a few special cases, e.g., when the +slice consists of several concatenated sorted sequences.

+
Examples
+
let mut v = [-5, 4, 1, -3, 2];
+
+v.sort_unstable();
+assert!(v == [-5, -3, 1, 2, 4]);
+
1.20.0 · source

pub fn sort_unstable_by<F>(&mut self, compare: F)where + F: FnMut(&T, &T) -> Ordering,

Sorts the slice with a comparator function, but might not preserve the order of equal +elements.

+

This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and O(n * log(n)) worst-case.

+

The comparator function must define a total ordering for the elements in the slice. If +the ordering is not total, the order of the elements is unspecified. An order is a +total order if it is (for all a, b and c):

+
    +
  • total and antisymmetric: exactly one of a < b, a == b or a > b is true, and
  • +
  • transitive, a < b and b < c implies a < c. The same must hold for both == and >.
  • +
+

For example, while f64 doesn’t implement Ord because NaN != NaN, we can use +partial_cmp as our sort function when we know the slice doesn’t contain a NaN.

+ +
let mut floats = [5f64, 4.0, 1.0, 3.0, 2.0];
+floats.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap());
+assert_eq!(floats, [1.0, 2.0, 3.0, 4.0, 5.0]);
+
Current implementation
+

The current algorithm is based on pattern-defeating quicksort by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.

+

It is typically faster than stable sorting, except in a few special cases, e.g., when the +slice consists of several concatenated sorted sequences.

+
Examples
+
let mut v = [5, 4, 1, 3, 2];
+v.sort_unstable_by(|a, b| a.cmp(b));
+assert!(v == [1, 2, 3, 4, 5]);
+
+// reverse sorting
+v.sort_unstable_by(|a, b| b.cmp(a));
+assert!(v == [5, 4, 3, 2, 1]);
+
1.20.0 · source

pub fn sort_unstable_by_key<K, F>(&mut self, f: F)where + F: FnMut(&T) -> K, + K: Ord,

Sorts the slice with a key extraction function, but might not preserve the order of equal +elements.

+

This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and O(m * n * log(n)) worst-case, where the key function is +O(m).

+
Current implementation
+

The current algorithm is based on pattern-defeating quicksort by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.

+

Due to its key calling strategy, sort_unstable_by_key +is likely to be slower than sort_by_cached_key in +cases where the key function is expensive.

+
Examples
+
let mut v = [-5i32, 4, 1, -3, 2];
+
+v.sort_unstable_by_key(|k| k.abs());
+assert!(v == [1, 2, -3, 4, -5]);
+
1.49.0 · source

pub fn select_nth_unstable( + &mut self, + index: usize +) -> (&mut [T], &mut T, &mut [T])where + T: Ord,

Reorder the slice such that the element at index is at its final sorted position.

+

This reordering has the additional property that any value at position i < index will be +less than or equal to any value at a position j > index. Additionally, this reordering is +unstable (i.e. any number of equal elements may end up at position index), in-place +(i.e. does not allocate), and runs in O(n) time. +This function is also known as “kth element” in other libraries.

+

It returns a triplet of the following from the reordered slice: +the subslice prior to index, the element at index, and the subslice after index; +accordingly, the values in those two subslices will respectively all be less-than-or-equal-to +and greater-than-or-equal-to the value of the element at index.

+
Current implementation
+

The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also +the basis for sort_unstable. The fallback algorithm is Median of Medians using Tukey’s Ninther for +pivot selection, which guarantees linear runtime for all inputs.

+
Panics
+

Panics when index >= len(), meaning it always panics on empty slices.

+
Examples
+
let mut v = [-5i32, 4, 1, -3, 2];
+
+// Find the median
+v.select_nth_unstable(2);
+
+// We are only guaranteed the slice will be one of the following, based on the way we sort
+// about the specified index.
+assert!(v == [-3, -5, 1, 2, 4] ||
+        v == [-5, -3, 1, 2, 4] ||
+        v == [-3, -5, 1, 4, 2] ||
+        v == [-5, -3, 1, 4, 2]);
+
1.49.0 · source

pub fn select_nth_unstable_by<F>( + &mut self, + index: usize, + compare: F +) -> (&mut [T], &mut T, &mut [T])where + F: FnMut(&T, &T) -> Ordering,

Reorder the slice with a comparator function such that the element at index is at its +final sorted position.

+

This reordering has the additional property that any value at position i < index will be +less than or equal to any value at a position j > index using the comparator function. +Additionally, this reordering is unstable (i.e. any number of equal elements may end up at +position index), in-place (i.e. does not allocate), and runs in O(n) time. +This function is also known as “kth element” in other libraries.

+

It returns a triplet of the following from +the slice reordered according to the provided comparator function: the subslice prior to +index, the element at index, and the subslice after index; accordingly, the values in +those two subslices will respectively all be less-than-or-equal-to and greater-than-or-equal-to +the value of the element at index.

+
Current implementation
+

The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also +the basis for sort_unstable. The fallback algorithm is Median of Medians using Tukey’s Ninther for +pivot selection, which guarantees linear runtime for all inputs.

+
Panics
+

Panics when index >= len(), meaning it always panics on empty slices.

+
Examples
+
let mut v = [-5i32, 4, 1, -3, 2];
+
+// Find the median as if the slice were sorted in descending order.
+v.select_nth_unstable_by(2, |a, b| b.cmp(a));
+
+// We are only guaranteed the slice will be one of the following, based on the way we sort
+// about the specified index.
+assert!(v == [2, 4, 1, -5, -3] ||
+        v == [2, 4, 1, -3, -5] ||
+        v == [4, 2, 1, -5, -3] ||
+        v == [4, 2, 1, -3, -5]);
+
1.49.0 · source

pub fn select_nth_unstable_by_key<K, F>( + &mut self, + index: usize, + f: F +) -> (&mut [T], &mut T, &mut [T])where + F: FnMut(&T) -> K, + K: Ord,

Reorder the slice with a key extraction function such that the element at index is at its +final sorted position.

+

This reordering has the additional property that any value at position i < index will be +less than or equal to any value at a position j > index using the key extraction function. +Additionally, this reordering is unstable (i.e. any number of equal elements may end up at +position index), in-place (i.e. does not allocate), and runs in O(n) time. +This function is also known as “kth element” in other libraries.

+

It returns a triplet of the following from +the slice reordered according to the provided key extraction function: the subslice prior to +index, the element at index, and the subslice after index; accordingly, the values in +those two subslices will respectively all be less-than-or-equal-to and greater-than-or-equal-to +the value of the element at index.

+
Current implementation
+

The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also +the basis for sort_unstable. The fallback algorithm is Median of Medians using Tukey’s Ninther for +pivot selection, which guarantees linear runtime for all inputs.

+
Panics
+

Panics when index >= len(), meaning it always panics on empty slices.

+
Examples
+
let mut v = [-5i32, 4, 1, -3, 2];
+
+// Return the median as if the array were sorted according to absolute value.
+v.select_nth_unstable_by_key(2, |a| a.abs());
+
+// We are only guaranteed the slice will be one of the following, based on the way we sort
+// about the specified index.
+assert!(v == [1, 2, -3, 4, -5] ||
+        v == [1, 2, -3, -5, 4] ||
+        v == [2, 1, -3, 4, -5] ||
+        v == [2, 1, -3, -5, 4]);
+
source

pub fn partition_dedup(&mut self) -> (&mut [T], &mut [T])where + T: PartialEq,

🔬This is a nightly-only experimental API. (slice_partition_dedup)

Moves all consecutive repeated elements to the end of the slice according to the +PartialEq trait implementation.

+

Returns two slices. The first contains no consecutive repeated elements. +The second contains all the duplicates in no specified order.

+

If the slice is sorted, the first returned slice contains no duplicates.

+
Examples
+
#![feature(slice_partition_dedup)]
+
+let mut slice = [1, 2, 2, 3, 3, 2, 1, 1];
+
+let (dedup, duplicates) = slice.partition_dedup();
+
+assert_eq!(dedup, [1, 2, 3, 2, 1]);
+assert_eq!(duplicates, [2, 3, 1]);
+
source

pub fn partition_dedup_by<F>(&mut self, same_bucket: F) -> (&mut [T], &mut [T])where + F: FnMut(&mut T, &mut T) -> bool,

🔬This is a nightly-only experimental API. (slice_partition_dedup)

Moves all but the first of consecutive elements to the end of the slice satisfying +a given equality relation.

+

Returns two slices. The first contains no consecutive repeated elements. +The second contains all the duplicates in no specified order.

+

The same_bucket function is passed references to two elements from the slice and +must determine if the elements compare equal. The elements are passed in opposite order +from their order in the slice, so if same_bucket(a, b) returns true, a is moved +at the end of the slice.

+

If the slice is sorted, the first returned slice contains no duplicates.

+
Examples
+
#![feature(slice_partition_dedup)]
+
+let mut slice = ["foo", "Foo", "BAZ", "Bar", "bar", "baz", "BAZ"];
+
+let (dedup, duplicates) = slice.partition_dedup_by(|a, b| a.eq_ignore_ascii_case(b));
+
+assert_eq!(dedup, ["foo", "BAZ", "Bar", "baz"]);
+assert_eq!(duplicates, ["bar", "Foo", "BAZ"]);
+
source

pub fn partition_dedup_by_key<K, F>(&mut self, key: F) -> (&mut [T], &mut [T])where + F: FnMut(&mut T) -> K, + K: PartialEq,

🔬This is a nightly-only experimental API. (slice_partition_dedup)

Moves all but the first of consecutive elements to the end of the slice that resolve +to the same key.

+

Returns two slices. The first contains no consecutive repeated elements. +The second contains all the duplicates in no specified order.

+

If the slice is sorted, the first returned slice contains no duplicates.

+
Examples
+
#![feature(slice_partition_dedup)]
+
+let mut slice = [10, 20, 21, 30, 30, 20, 11, 13];
+
+let (dedup, duplicates) = slice.partition_dedup_by_key(|i| *i / 10);
+
+assert_eq!(dedup, [10, 20, 30, 20, 11]);
+assert_eq!(duplicates, [21, 30, 13]);
+
1.26.0 · source

pub fn rotate_left(&mut self, mid: usize)

Rotates the slice in-place such that the first mid elements of the +slice move to the end while the last self.len() - mid elements move to +the front. After calling rotate_left, the element previously at index +mid will become the first element in the slice.

+
Panics
+

This function will panic if mid is greater than the length of the +slice. Note that mid == self.len() does not panic and is a no-op +rotation.

+
Complexity
+

Takes linear (in self.len()) time.

+
Examples
+
let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
+a.rotate_left(2);
+assert_eq!(a, ['c', 'd', 'e', 'f', 'a', 'b']);
+

Rotating a subslice:

+ +
let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
+a[1..5].rotate_left(1);
+assert_eq!(a, ['a', 'c', 'd', 'e', 'b', 'f']);
+
1.26.0 · source

pub fn rotate_right(&mut self, k: usize)

Rotates the slice in-place such that the first self.len() - k +elements of the slice move to the end while the last k elements move +to the front. After calling rotate_right, the element previously at +index self.len() - k will become the first element in the slice.

+
Panics
+

This function will panic if k is greater than the length of the +slice. Note that k == self.len() does not panic and is a no-op +rotation.

+
Complexity
+

Takes linear (in self.len()) time.

+
Examples
+
let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
+a.rotate_right(2);
+assert_eq!(a, ['e', 'f', 'a', 'b', 'c', 'd']);
+

Rotating a subslice:

+ +
let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
+a[1..5].rotate_right(1);
+assert_eq!(a, ['a', 'e', 'b', 'c', 'd', 'f']);
+
1.50.0 · source

pub fn fill(&mut self, value: T)where + T: Clone,

Fills self with elements by cloning value.

+
Examples
+
let mut buf = vec![0; 10];
+buf.fill(1);
+assert_eq!(buf, vec![1; 10]);
+
1.51.0 · source

pub fn fill_with<F>(&mut self, f: F)where + F: FnMut() -> T,

Fills self with elements returned by calling a closure repeatedly.

+

This method uses a closure to create new values. If you’d rather +Clone a given value, use fill. If you want to use the Default +trait to generate values, you can pass Default::default as the +argument.

+
Examples
+
let mut buf = vec![1; 10];
+buf.fill_with(Default::default);
+assert_eq!(buf, vec![0; 10]);
+
1.7.0 · source

pub fn clone_from_slice(&mut self, src: &[T])where + T: Clone,

Copies the elements from src into self.

+

The length of src must be the same as self.

+
Panics
+

This function will panic if the two slices have different lengths.

+
Examples
+

Cloning two elements from a slice into another:

+ +
let src = [1, 2, 3, 4];
+let mut dst = [0, 0];
+
+// Because the slices have to be the same length,
+// we slice the source slice from four elements
+// to two. It will panic if we don't do this.
+dst.clone_from_slice(&src[2..]);
+
+assert_eq!(src, [1, 2, 3, 4]);
+assert_eq!(dst, [3, 4]);
+

Rust enforces that there can only be one mutable reference with no +immutable references to a particular piece of data in a particular +scope. Because of this, attempting to use clone_from_slice on a +single slice will result in a compile failure:

+ +
let mut slice = [1, 2, 3, 4, 5];
+
+slice[..2].clone_from_slice(&slice[3..]); // compile fail!
+

To work around this, we can use split_at_mut to create two distinct +sub-slices from a slice:

+ +
let mut slice = [1, 2, 3, 4, 5];
+
+{
+    let (left, right) = slice.split_at_mut(2);
+    left.clone_from_slice(&right[1..]);
+}
+
+assert_eq!(slice, [4, 5, 3, 4, 5]);
+
1.9.0 · source

pub fn copy_from_slice(&mut self, src: &[T])where + T: Copy,

Copies all elements from src into self, using a memcpy.

+

The length of src must be the same as self.

+

If T does not implement Copy, use clone_from_slice.

+
Panics
+

This function will panic if the two slices have different lengths.

+
Examples
+

Copying two elements from a slice into another:

+ +
let src = [1, 2, 3, 4];
+let mut dst = [0, 0];
+
+// Because the slices have to be the same length,
+// we slice the source slice from four elements
+// to two. It will panic if we don't do this.
+dst.copy_from_slice(&src[2..]);
+
+assert_eq!(src, [1, 2, 3, 4]);
+assert_eq!(dst, [3, 4]);
+

Rust enforces that there can only be one mutable reference with no +immutable references to a particular piece of data in a particular +scope. Because of this, attempting to use copy_from_slice on a +single slice will result in a compile failure:

+ +
let mut slice = [1, 2, 3, 4, 5];
+
+slice[..2].copy_from_slice(&slice[3..]); // compile fail!
+

To work around this, we can use split_at_mut to create two distinct +sub-slices from a slice:

+ +
let mut slice = [1, 2, 3, 4, 5];
+
+{
+    let (left, right) = slice.split_at_mut(2);
+    left.copy_from_slice(&right[1..]);
+}
+
+assert_eq!(slice, [4, 5, 3, 4, 5]);
+
1.37.0 · source

pub fn copy_within<R>(&mut self, src: R, dest: usize)where + R: RangeBounds<usize>, + T: Copy,

Copies elements from one part of the slice to another part of itself, +using a memmove.

+

src is the range within self to copy from. dest is the starting +index of the range within self to copy to, which will have the same +length as src. The two ranges may overlap. The ends of the two ranges +must be less than or equal to self.len().

+
Panics
+

This function will panic if either range exceeds the end of the slice, +or if the end of src is before the start.

+
Examples
+

Copying four bytes within a slice:

+ +
let mut bytes = *b"Hello, World!";
+
+bytes.copy_within(1..5, 8);
+
+assert_eq!(&bytes, b"Hello, Wello!");
+
1.27.0 · source

pub fn swap_with_slice(&mut self, other: &mut [T])

Swaps all elements in self with those in other.

+

The length of other must be the same as self.

+
Panics
+

This function will panic if the two slices have different lengths.

+
Example
+

Swapping two elements across slices:

+ +
let mut slice1 = [0, 0];
+let mut slice2 = [1, 2, 3, 4];
+
+slice1.swap_with_slice(&mut slice2[2..]);
+
+assert_eq!(slice1, [3, 4]);
+assert_eq!(slice2, [1, 2, 0, 0]);
+

Rust enforces that there can only be one mutable reference to a +particular piece of data in a particular scope. Because of this, +attempting to use swap_with_slice on a single slice will result in +a compile failure:

+ +
let mut slice = [1, 2, 3, 4, 5];
+slice[..2].swap_with_slice(&mut slice[3..]); // compile fail!
+

To work around this, we can use split_at_mut to create two distinct +mutable sub-slices from a slice:

+ +
let mut slice = [1, 2, 3, 4, 5];
+
+{
+    let (left, right) = slice.split_at_mut(2);
+    left.swap_with_slice(&mut right[1..]);
+}
+
+assert_eq!(slice, [4, 5, 3, 1, 2]);
+
1.30.0 · source

pub unsafe fn align_to<U>(&self) -> (&[T], &[U], &[T])

Transmute the slice to a slice of another type, ensuring alignment of the types is +maintained.

+

This method splits the slice into three distinct slices: prefix, correctly aligned middle +slice of a new type, and the suffix slice. How exactly the slice is split up is not +specified; the middle part may be smaller than necessary. However, if this fails to return a +maximal middle part, that is because code is running in a context where performance does not +matter, such as a sanitizer attempting to find alignment bugs. Regular code running +in a default (debug or release) execution will return a maximal middle part.

+

This method has no purpose when either input element T or output element U are +zero-sized and will return the original slice without splitting anything.

+
Safety
+

This method is essentially a transmute with respect to the elements in the returned +middle slice, so all the usual caveats pertaining to transmute::<T, U> also apply here.

+
Examples
+

Basic usage:

+ +
unsafe {
+    let bytes: [u8; 7] = [1, 2, 3, 4, 5, 6, 7];
+    let (prefix, shorts, suffix) = bytes.align_to::<u16>();
+    // less_efficient_algorithm_for_bytes(prefix);
+    // more_efficient_algorithm_for_aligned_shorts(shorts);
+    // less_efficient_algorithm_for_bytes(suffix);
+}
+
1.30.0 · source

pub unsafe fn align_to_mut<U>(&mut self) -> (&mut [T], &mut [U], &mut [T])

Transmute the mutable slice to a mutable slice of another type, ensuring alignment of the +types is maintained.

+

This method splits the slice into three distinct slices: prefix, correctly aligned middle +slice of a new type, and the suffix slice. How exactly the slice is split up is not +specified; the middle part may be smaller than necessary. However, if this fails to return a +maximal middle part, that is because code is running in a context where performance does not +matter, such as a sanitizer attempting to find alignment bugs. Regular code running +in a default (debug or release) execution will return a maximal middle part.

+

This method has no purpose when either input element T or output element U are +zero-sized and will return the original slice without splitting anything.

+
Safety
+

This method is essentially a transmute with respect to the elements in the returned +middle slice, so all the usual caveats pertaining to transmute::<T, U> also apply here.

+
Examples
+

Basic usage:

+ +
unsafe {
+    let mut bytes: [u8; 7] = [1, 2, 3, 4, 5, 6, 7];
+    let (prefix, shorts, suffix) = bytes.align_to_mut::<u16>();
+    // less_efficient_algorithm_for_bytes(prefix);
+    // more_efficient_algorithm_for_aligned_shorts(shorts);
+    // less_efficient_algorithm_for_bytes(suffix);
+}
+
source

pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])where + Simd<T, LANES>: AsRef<[T; LANES]>, + T: SimdElement, + LaneCount<LANES>: SupportedLaneCount,

🔬This is a nightly-only experimental API. (portable_simd)

Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.

+

This is a safe wrapper around slice::align_to, so has the same weak +postconditions as that method. You’re only assured that +self.len() == prefix.len() + middle.len() * LANES + suffix.len().

+

Notably, all of the following are possible:

+
    +
  • prefix.len() >= LANES.
  • +
  • middle.is_empty() despite self.len() >= 3 * LANES.
  • +
  • suffix.len() >= LANES.
  • +
+

That said, this is a safe method, so if you’re only writing safe code, +then this can at most cause incorrect logic, not unsoundness.

+
Panics
+

This will panic if the size of the SIMD type is different from +LANES times that of the scalar.

+

At the time of writing, the trait restrictions on Simd<T, LANES> keeps +that from ever happening, as only power-of-two numbers of lanes are +supported. It’s possible that, in the future, those restrictions might +be lifted in a way that would make it possible to see panics from this +method for something like LANES == 3.

+
Examples
+
#![feature(portable_simd)]
+use core::simd::SimdFloat;
+
+let short = &[1, 2, 3];
+let (prefix, middle, suffix) = short.as_simd::<4>();
+assert_eq!(middle, []); // Not enough elements for anything in the middle
+
+// They might be split in any possible way between prefix and suffix
+let it = prefix.iter().chain(suffix).copied();
+assert_eq!(it.collect::<Vec<_>>(), vec![1, 2, 3]);
+
+fn basic_simd_sum(x: &[f32]) -> f32 {
+    use std::ops::Add;
+    use std::simd::f32x4;
+    let (prefix, middle, suffix) = x.as_simd();
+    let sums = f32x4::from_array([
+        prefix.iter().copied().sum(),
+        0.0,
+        0.0,
+        suffix.iter().copied().sum(),
+    ]);
+    let sums = middle.iter().copied().fold(sums, f32x4::add);
+    sums.reduce_sum()
+}
+
+let numbers: Vec<f32> = (1..101).map(|x| x as _).collect();
+assert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0);
+
source

pub fn as_simd_mut<const LANES: usize>( + &mut self +) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T])where + Simd<T, LANES>: AsMut<[T; LANES]>, + T: SimdElement, + LaneCount<LANES>: SupportedLaneCount,

🔬This is a nightly-only experimental API. (portable_simd)

Split a mutable slice into a mutable prefix, a middle of aligned SIMD types, +and a mutable suffix.

+

This is a safe wrapper around slice::align_to_mut, so has the same weak +postconditions as that method. You’re only assured that +self.len() == prefix.len() + middle.len() * LANES + suffix.len().

+

Notably, all of the following are possible:

+
    +
  • prefix.len() >= LANES.
  • +
  • middle.is_empty() despite self.len() >= 3 * LANES.
  • +
  • suffix.len() >= LANES.
  • +
+

That said, this is a safe method, so if you’re only writing safe code, +then this can at most cause incorrect logic, not unsoundness.

+

This is the mutable version of slice::as_simd; see that for examples.

+
Panics
+

This will panic if the size of the SIMD type is different from +LANES times that of the scalar.

+

At the time of writing, the trait restrictions on Simd<T, LANES> keeps +that from ever happening, as only power-of-two numbers of lanes are +supported. It’s possible that, in the future, those restrictions might +be lifted in a way that would make it possible to see panics from this +method for something like LANES == 3.

+
source

pub fn is_sorted(&self) -> boolwhere + T: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this slice are sorted.

+

That is, for each element a and its following element b, a <= b must hold. If the +slice yields exactly zero or one element, true is returned.

+

Note that if Self::Item is only PartialOrd, but not Ord, the above definition +implies that this function returns false if any two consecutive items are not +comparable.

+
Examples
+
#![feature(is_sorted)]
+let empty: [i32; 0] = [];
+
+assert!([1, 2, 2, 9].is_sorted());
+assert!(![1, 3, 2, 4].is_sorted());
+assert!([0].is_sorted());
+assert!(empty.is_sorted());
+assert!(![0.0, 1.0, f32::NAN].is_sorted());
+
source

pub fn is_sorted_by<'a, F>(&'a self, compare: F) -> boolwhere + F: FnMut(&'a T, &'a T) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this slice are sorted using the given comparator function.

+

Instead of using PartialOrd::partial_cmp, this function uses the given compare +function to determine the ordering of two elements. Apart from that, it’s equivalent to +is_sorted; see its documentation for more information.

+
source

pub fn is_sorted_by_key<'a, F, K>(&'a self, f: F) -> boolwhere + F: FnMut(&'a T) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this slice are sorted using the given key extraction function.

+

Instead of comparing the slice’s elements directly, this function compares the keys of the +elements, as determined by f. Apart from that, it’s equivalent to is_sorted; see its +documentation for more information.

+
Examples
+
#![feature(is_sorted)]
+
+assert!(["c", "bb", "aaa"].is_sorted_by_key(|s| s.len()));
+assert!(![-2i32, -1, 0, 3].is_sorted_by_key(|n| n.abs()));
+
1.52.0 · source

pub fn partition_point<P>(&self, pred: P) -> usizewhere + P: FnMut(&T) -> bool,

Returns the index of the partition point according to the given predicate +(the index of the first element of the second partition).

+

The slice is assumed to be partitioned according to the given predicate. +This means that all elements for which the predicate returns true are at the start of the slice +and all elements for which the predicate returns false are at the end. +For example, [7, 15, 3, 5, 4, 12, 6] is partitioned under the predicate x % 2 != 0 +(all odd numbers are at the start, all even at the end).

+

If this slice is not partitioned, the returned result is unspecified and meaningless, +as this method performs a kind of binary search.

+

See also binary_search, binary_search_by, and binary_search_by_key.

+
Examples
+
let v = [1, 2, 3, 3, 5, 6, 7];
+let i = v.partition_point(|&x| x < 5);
+
+assert_eq!(i, 4);
+assert!(v[..i].iter().all(|&x| x < 5));
+assert!(v[i..].iter().all(|&x| !(x < 5)));
+

If all elements of the slice match the predicate, including if the slice +is empty, then the length of the slice will be returned:

+ +
let a = [2, 4, 8];
+assert_eq!(a.partition_point(|x| x < &100), a.len());
+let a: [i32; 0] = [];
+assert_eq!(a.partition_point(|x| x < &100), 0);
+

If you want to insert an item to a sorted vector, while maintaining +sort order:

+ +
let mut s = vec![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
+let num = 42;
+let idx = s.partition_point(|&x| x < num);
+s.insert(idx, num);
+assert_eq!(s, [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55]);
+
source

pub fn take<R, 'a>(self: &mut &'a [T], range: R) -> Option<&'a [T]>where + R: OneSidedRange<usize>,

🔬This is a nightly-only experimental API. (slice_take)

Removes the subslice corresponding to the given range +and returns a reference to it.

+

Returns None and does not modify the slice if the given +range is out of bounds.

+

Note that this method only accepts one-sided ranges such as +2.. or ..6, but not 2..6.

+
Examples
+

Taking the first three elements of a slice:

+ +
#![feature(slice_take)]
+
+let mut slice: &[_] = &['a', 'b', 'c', 'd'];
+let mut first_three = slice.take(..3).unwrap();
+
+assert_eq!(slice, &['d']);
+assert_eq!(first_three, &['a', 'b', 'c']);
+

Taking the last two elements of a slice:

+ +
#![feature(slice_take)]
+
+let mut slice: &[_] = &['a', 'b', 'c', 'd'];
+let mut tail = slice.take(2..).unwrap();
+
+assert_eq!(slice, &['a', 'b']);
+assert_eq!(tail, &['c', 'd']);
+

Getting None when range is out of bounds:

+ +
#![feature(slice_take)]
+
+let mut slice: &[_] = &['a', 'b', 'c', 'd'];
+
+assert_eq!(None, slice.take(5..));
+assert_eq!(None, slice.take(..5));
+assert_eq!(None, slice.take(..=4));
+let expected: &[char] = &['a', 'b', 'c', 'd'];
+assert_eq!(Some(expected), slice.take(..4));
+
source

pub fn take_mut<R, 'a>(self: &mut &'a mut [T], range: R) -> Option<&'a mut [T]>where + R: OneSidedRange<usize>,

🔬This is a nightly-only experimental API. (slice_take)

Removes the subslice corresponding to the given range +and returns a mutable reference to it.

+

Returns None and does not modify the slice if the given +range is out of bounds.

+

Note that this method only accepts one-sided ranges such as +2.. or ..6, but not 2..6.

+
Examples
+

Taking the first three elements of a slice:

+ +
#![feature(slice_take)]
+
+let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
+let mut first_three = slice.take_mut(..3).unwrap();
+
+assert_eq!(slice, &mut ['d']);
+assert_eq!(first_three, &mut ['a', 'b', 'c']);
+

Taking the last two elements of a slice:

+ +
#![feature(slice_take)]
+
+let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
+let mut tail = slice.take_mut(2..).unwrap();
+
+assert_eq!(slice, &mut ['a', 'b']);
+assert_eq!(tail, &mut ['c', 'd']);
+

Getting None when range is out of bounds:

+ +
#![feature(slice_take)]
+
+let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
+
+assert_eq!(None, slice.take_mut(5..));
+assert_eq!(None, slice.take_mut(..5));
+assert_eq!(None, slice.take_mut(..=4));
+let expected: &mut [_] = &mut ['a', 'b', 'c', 'd'];
+assert_eq!(Some(expected), slice.take_mut(..4));
+
source

pub fn take_first<'a>(self: &mut &'a [T]) -> Option<&'a T>

🔬This is a nightly-only experimental API. (slice_take)

Removes the first element of the slice and returns a reference +to it.

+

Returns None if the slice is empty.

+
Examples
+
#![feature(slice_take)]
+
+let mut slice: &[_] = &['a', 'b', 'c'];
+let first = slice.take_first().unwrap();
+
+assert_eq!(slice, &['b', 'c']);
+assert_eq!(first, &'a');
+
source

pub fn take_first_mut<'a>(self: &mut &'a mut [T]) -> Option<&'a mut T>

🔬This is a nightly-only experimental API. (slice_take)

Removes the first element of the slice and returns a mutable +reference to it.

+

Returns None if the slice is empty.

+
Examples
+
#![feature(slice_take)]
+
+let mut slice: &mut [_] = &mut ['a', 'b', 'c'];
+let first = slice.take_first_mut().unwrap();
+*first = 'd';
+
+assert_eq!(slice, &['b', 'c']);
+assert_eq!(first, &'d');
+
source

pub fn take_last<'a>(self: &mut &'a [T]) -> Option<&'a T>

🔬This is a nightly-only experimental API. (slice_take)

Removes the last element of the slice and returns a reference +to it.

+

Returns None if the slice is empty.

+
Examples
+
#![feature(slice_take)]
+
+let mut slice: &[_] = &['a', 'b', 'c'];
+let last = slice.take_last().unwrap();
+
+assert_eq!(slice, &['a', 'b']);
+assert_eq!(last, &'c');
+
source

pub fn take_last_mut<'a>(self: &mut &'a mut [T]) -> Option<&'a mut T>

🔬This is a nightly-only experimental API. (slice_take)

Removes the last element of the slice and returns a mutable +reference to it.

+

Returns None if the slice is empty.

+
Examples
+
#![feature(slice_take)]
+
+let mut slice: &mut [_] = &mut ['a', 'b', 'c'];
+let last = slice.take_last_mut().unwrap();
+*last = 'd';
+
+assert_eq!(slice, &['a', 'b']);
+assert_eq!(last, &'d');
+
source

pub unsafe fn get_many_unchecked_mut<const N: usize>( + &mut self, + indices: [usize; N] +) -> [&mut T; N]

🔬This is a nightly-only experimental API. (get_many_mut)

Returns mutable references to many indices at once, without doing any checks.

+

For a safe alternative see get_many_mut.

+
Safety
+

Calling this method with overlapping or out-of-bounds indices is undefined behavior +even if the resulting references are not used.

+
Examples
+
#![feature(get_many_mut)]
+
+let x = &mut [1, 2, 4];
+
+unsafe {
+    let [a, b] = x.get_many_unchecked_mut([0, 2]);
+    *a *= 10;
+    *b *= 100;
+}
+assert_eq!(x, &[10, 2, 400]);
+
source

pub fn get_many_mut<const N: usize>( + &mut self, + indices: [usize; N] +) -> Result<[&mut T; N], GetManyMutError<N>>

🔬This is a nightly-only experimental API. (get_many_mut)

Returns mutable references to many indices at once.

+

Returns an error if any index is out-of-bounds, or if the same index was +passed more than once.

+
Examples
+
#![feature(get_many_mut)]
+
+let v = &mut [1, 2, 3];
+if let Ok([a, b]) = v.get_many_mut([0, 2]) {
+    *a = 413;
+    *b = 612;
+}
+assert_eq!(v, &[413, 2, 612]);
+
1.23.0 · source

pub fn is_ascii(&self) -> bool

Checks if all bytes in this slice are within the ASCII range.

+
source

pub fn as_ascii(&self) -> Option<&[AsciiChar]>

🔬This is a nightly-only experimental API. (ascii_char)

If this slice is_ascii, returns it as a slice of +ASCII characters, otherwise returns None.

+
source

pub unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar]

🔬This is a nightly-only experimental API. (ascii_char)

Converts this slice of bytes into a slice of ASCII characters, +without checking whether they’re valid.

+
Safety
+

Every byte in the slice must be in 0..=127, or else this is UB.

+
1.23.0 · source

pub fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool

Checks that two slices are an ASCII case-insensitive match.

+

Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), +but without allocating and copying temporaries.

+
1.23.0 · source

pub fn make_ascii_uppercase(&mut self)

Converts this slice to its ASCII upper case equivalent in-place.

+

ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, +but non-ASCII letters are unchanged.

+

To return a new uppercased value without modifying the existing one, use +to_ascii_uppercase.

+
1.23.0 · source

pub fn make_ascii_lowercase(&mut self)

Converts this slice to its ASCII lower case equivalent in-place.

+

ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, +but non-ASCII letters are unchanged.

+

To return a new lowercased value without modifying the existing one, use +to_ascii_lowercase.

+
1.60.0 · source

pub fn escape_ascii(&self) -> EscapeAscii<'_>

Returns an iterator that produces an escaped version of this slice, +treating it as an ASCII string.

+
Examples
+

+let s = b"0\t\r\n'\"\\\x9d";
+let escaped = s.escape_ascii().to_string();
+assert_eq!(escaped, "0\\t\\r\\n\\'\\\"\\\\\\x9d");
+
source

pub fn trim_ascii_start(&self) -> &[u8]

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with leading ASCII whitespace bytes removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

+
Examples
+
#![feature(byte_slice_trim_ascii)]
+
+assert_eq!(b" \t hello world\n".trim_ascii_start(), b"hello world\n");
+assert_eq!(b"  ".trim_ascii_start(), b"");
+assert_eq!(b"".trim_ascii_start(), b"");
+
source

pub fn trim_ascii_end(&self) -> &[u8]

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with trailing ASCII whitespace bytes removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

+
Examples
+
#![feature(byte_slice_trim_ascii)]
+
+assert_eq!(b"\r hello world\n ".trim_ascii_end(), b"\r hello world");
+assert_eq!(b"  ".trim_ascii_end(), b"");
+assert_eq!(b"".trim_ascii_end(), b"");
+
source

pub fn trim_ascii(&self) -> &[u8]

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with leading and trailing ASCII whitespace bytes +removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

+
Examples
+
#![feature(byte_slice_trim_ascii)]
+
+assert_eq!(b"\r hello world\n ".trim_ascii(), b"hello world");
+assert_eq!(b"  ".trim_ascii(), b"");
+assert_eq!(b"".trim_ascii(), b"");
+
source

pub fn as_str(&self) -> &str

🔬This is a nightly-only experimental API. (ascii_char)

Views this slice of ASCII characters as a UTF-8 str.

+
source

pub fn as_bytes(&self) -> &[u8]

🔬This is a nightly-only experimental API. (ascii_char)

Views this slice of ASCII characters as a slice of u8 bytes.

+
source

pub fn sort_floats(&mut self)

🔬This is a nightly-only experimental API. (sort_floats)

Sorts the slice of floats.

+

This sort is in-place (i.e. does not allocate), O(n * log(n)) worst-case, and uses +the ordering defined by f32::total_cmp.

+
Current implementation
+

This uses the same sorting algorithm as sort_unstable_by.

+
Examples
+
#![feature(sort_floats)]
+let mut v = [2.6, -5e-8, f32::NAN, 8.29, f32::INFINITY, -1.0, 0.0, -f32::INFINITY, -0.0];
+
+v.sort_floats();
+let sorted = [-f32::INFINITY, -1.0, -5e-8, -0.0, 0.0, 2.6, 8.29, f32::INFINITY, f32::NAN];
+assert_eq!(&v[..8], &sorted[..8]);
+assert!(v[8].is_nan());
+
source

pub fn sort_floats(&mut self)

🔬This is a nightly-only experimental API. (sort_floats)

Sorts the slice of floats.

+

This sort is in-place (i.e. does not allocate), O(n * log(n)) worst-case, and uses +the ordering defined by f64::total_cmp.

+
Current implementation
+

This uses the same sorting algorithm as sort_unstable_by.

+
Examples
+
#![feature(sort_floats)]
+let mut v = [2.6, -5e-8, f64::NAN, 8.29, f64::INFINITY, -1.0, 0.0, -f64::INFINITY, -0.0];
+
+v.sort_floats();
+let sorted = [-f64::INFINITY, -1.0, -5e-8, -0.0, 0.0, 2.6, 8.29, f64::INFINITY, f64::NAN];
+assert_eq!(&v[..8], &sorted[..8]);
+assert!(v[8].is_nan());
+
source

pub fn sort(&mut self)where + T: Ord,

Sorts the slice.

+

This sort is stable (i.e., does not reorder equal elements) and O(n * log(n)) worst-case.

+

When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See sort_unstable.

+
Current implementation
+

The current algorithm is an adaptive, iterative merge sort inspired by +timsort. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.

+

Also, it allocates temporary storage half the size of self, but for short slices a +non-allocating insertion sort is used instead.

+
Examples
+
let mut v = [-5, 4, 1, -3, 2];
+
+v.sort();
+assert!(v == [-5, -3, 1, 2, 4]);
+
source

pub fn sort_by<F>(&mut self, compare: F)where + F: FnMut(&T, &T) -> Ordering,

Sorts the slice with a comparator function.

+

This sort is stable (i.e., does not reorder equal elements) and O(n * log(n)) worst-case.

+

The comparator function must define a total ordering for the elements in the slice. If +the ordering is not total, the order of the elements is unspecified. An order is a +total order if it is (for all a, b and c):

+
    +
  • total and antisymmetric: exactly one of a < b, a == b or a > b is true, and
  • +
  • transitive, a < b and b < c implies a < c. The same must hold for both == and >.
  • +
+

For example, while f64 doesn’t implement Ord because NaN != NaN, we can use +partial_cmp as our sort function when we know the slice doesn’t contain a NaN.

+ +
let mut floats = [5f64, 4.0, 1.0, 3.0, 2.0];
+floats.sort_by(|a, b| a.partial_cmp(b).unwrap());
+assert_eq!(floats, [1.0, 2.0, 3.0, 4.0, 5.0]);
+

When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See sort_unstable_by.

+
Current implementation
+

The current algorithm is an adaptive, iterative merge sort inspired by +timsort. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.

+

Also, it allocates temporary storage half the size of self, but for short slices a +non-allocating insertion sort is used instead.

+
Examples
+
let mut v = [5, 4, 1, 3, 2];
+v.sort_by(|a, b| a.cmp(b));
+assert!(v == [1, 2, 3, 4, 5]);
+
+// reverse sorting
+v.sort_by(|a, b| b.cmp(a));
+assert!(v == [5, 4, 3, 2, 1]);
+
1.7.0 · source

pub fn sort_by_key<K, F>(&mut self, f: F)where + F: FnMut(&T) -> K, + K: Ord,

Sorts the slice with a key extraction function.

+

This sort is stable (i.e., does not reorder equal elements) and O(m * n * log(n)) +worst-case, where the key function is O(m).

+

For expensive key functions (e.g. functions that are not simple property accesses or +basic operations), sort_by_cached_key is likely to be +significantly faster, as it does not recompute element keys.

+

When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See sort_unstable_by_key.

+
Current implementation
+

The current algorithm is an adaptive, iterative merge sort inspired by +timsort. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.

+

Also, it allocates temporary storage half the size of self, but for short slices a +non-allocating insertion sort is used instead.

+
Examples
+
let mut v = [-5i32, 4, 1, -3, 2];
+
+v.sort_by_key(|k| k.abs());
+assert!(v == [1, 2, -3, 4, -5]);
+
1.34.0 · source

pub fn sort_by_cached_key<K, F>(&mut self, f: F)where + F: FnMut(&T) -> K, + K: Ord,

Sorts the slice with a key extraction function.

+

During sorting, the key function is called at most once per element, by using +temporary storage to remember the results of key evaluation. +The order of calls to the key function is unspecified and may change in future versions +of the standard library.

+

This sort is stable (i.e., does not reorder equal elements) and O(m * n + n * log(n)) +worst-case, where the key function is O(m).

+

For simple key functions (e.g., functions that are property accesses or +basic operations), sort_by_key is likely to be +faster.

+
Current implementation
+

The current algorithm is based on pattern-defeating quicksort by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.

+

In the worst case, the algorithm allocates temporary storage in a Vec<(K, usize)> the +length of the slice.

+
Examples
+
let mut v = [-5i32, 4, 32, -3, 2];
+
+v.sort_by_cached_key(|k| k.to_string());
+assert!(v == [-3, -5, 2, 32, 4]);
+
source

pub fn to_vec(&self) -> Vec<T>where + T: Clone,

Copies self into a new Vec.

+
Examples
+
let s = [10, 40, 30];
+let x = s.to_vec();
+// Here, `s` and `x` can be modified independently.
+
source

pub fn to_vec_in<A>(&self, alloc: A) -> Vec<T, A>where + A: Allocator, + T: Clone,

🔬This is a nightly-only experimental API. (allocator_api)

Copies self into a new Vec with an allocator.

+
Examples
+
#![feature(allocator_api)]
+
+use std::alloc::System;
+
+let s = [10, 40, 30];
+let x = s.to_vec_in(System);
+// Here, `s` and `x` can be modified independently.
+
1.40.0 · source

pub fn repeat(&self, n: usize) -> Vec<T>where + T: Copy,

Creates a vector by copying a slice n times.

+
Panics
+

This function will panic if the capacity would overflow.

+
Examples
+

Basic usage:

+ +
assert_eq!([1, 2].repeat(3), vec![1, 2, 1, 2, 1, 2]);
+

A panic upon overflow:

+ +
// this will panic at runtime
+b"0123456789abcdef".repeat(usize::MAX);
+
source

pub fn concat<Item>(&self) -> <[T] as Concat<Item>>::Output where + [T]: Concat<Item>, + Item: ?Sized,

Flattens a slice of T into a single value Self::Output.

+
Examples
+
assert_eq!(["hello", "world"].concat(), "helloworld");
+assert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]);
+
1.3.0 · source

pub fn join<Separator>( + &self, + sep: Separator +) -> <[T] as Join<Separator>>::Output where + [T]: Join<Separator>,

Flattens a slice of T into a single value Self::Output, placing a +given separator between each.

+
Examples
+
assert_eq!(["hello", "world"].join(" "), "hello world");
+assert_eq!([[1, 2], [3, 4]].join(&0), [1, 2, 0, 3, 4]);
+assert_eq!([[1, 2], [3, 4]].join(&[0, 0][..]), [1, 2, 0, 0, 3, 4]);
+
source

pub fn connect<Separator>( + &self, + sep: Separator +) -> <[T] as Join<Separator>>::Output where + [T]: Join<Separator>,

👎Deprecated since 1.3.0: renamed to join

Flattens a slice of T into a single value Self::Output, placing a +given separator between each.

+
Examples
+
assert_eq!(["hello", "world"].connect(" "), "hello world");
+assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
+
1.23.0 · source

pub fn to_ascii_uppercase(&self) -> Vec<u8>

Returns a vector containing a copy of this slice where each byte +is mapped to its ASCII upper case equivalent.

+

ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, +but non-ASCII letters are unchanged.

+

To uppercase the value in-place, use make_ascii_uppercase.

+
1.23.0 · source

pub fn to_ascii_lowercase(&self) -> Vec<u8>

Returns a vector containing a copy of this slice where each byte +is mapped to its ASCII lower case equivalent.

+

ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, +but non-ASCII letters are unchanged.

+

To lowercase the value in-place, use make_ascii_lowercase.

+

Trait Implementations§

source§

impl<'a, T, C, const N: usize> ArraysAs<[C]> for Vec<[T; N]>where + C: ArrayCast<Array = [T; N]>,

source§

fn arrays_as(&self) -> &[C]

Cast this collection of arrays into a collection of colors.
source§

impl<'a, T, C, const N: usize> ArraysAsMut<[C]> for Vec<[T; N]>where + C: ArrayCast<Array = [T; N]>,

source§

fn arrays_as_mut(&mut self) -> &mut [C]

Cast this collection of arrays into a mutable collection of colors.
source§

impl<'a, T, C, const N: usize> AsArrays<[[T; N]]> for Vec<C>where + C: ArrayCast<Array = [T; N]>,

source§

fn as_arrays(&self) -> &[[T; N]]

Cast this collection of colors into a collection of arrays.
source§

impl<'a, T, C, const N: usize> AsArraysMut<[[T; N]]> for Vec<C>where + C: ArrayCast<Array = [T; N]>,

source§

fn as_arrays_mut(&mut self) -> &mut [[T; N]]

Cast this collection of colors into a mutable collection of arrays.
source§

impl<'a, T, C, const N: usize> AsComponents<[T]> for Vec<C>where + C: ArrayCast<Array = [T; N]>,

source§

fn as_components(&self) -> &[T]

Cast this collection of colors into a collection of color components.
source§

impl<'a, T, C, const N: usize> AsComponentsMut<[T]> for Vec<C>where + C: ArrayCast<Array = [T; N]>,

source§

fn as_components_mut(&mut self) -> &mut [T]

Cast this collection of colors into a mutable collection of color +components.
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>where + A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>where + A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T, A> AsRef<[T]> for Vec<T, A>where + A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>where + A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<'a, C> AsUints<[<C as UintCast>::Uint]> for Vec<C>where + C: UintCast,

source§

fn as_uints(&self) -> &[<C as UintCast>::Uint]

Cast this collection of colors into a collection of unsigned integers.
source§

impl<'a, C> AsUintsMut<[<C as UintCast>::Uint]> for Vec<C>where + C: UintCast,

source§

fn as_uints_mut(&mut self) -> &mut [<C as UintCast>::Uint]

Cast this collection of colors into a mutable collection of unsigned integers.
source§

impl<T, A> Borrow<[T]> for Vec<T, A>where + A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>where + A: Allocator,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, A> Clone for Vec<T, A>where + T: Clone, + A: Allocator + Clone,

source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &Vec<T, A>)

Performs copy-assignment from source. Read more
source§

impl<T, A> Debug for Vec<T, A>where + T: Debug, + A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

+

The vector will not allocate until elements are pushed onto it.

+
source§

impl<T, A> Deref for Vec<T, A>where + A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
source§

impl<T, A> DerefMut for Vec<T, A>where + A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
source§

impl<'de, T> Deserialize<'de> for Vec<T>where + T: Deserialize<'de>,

source§

fn deserialize<D>( + deserializer: D +) -> Result<Vec<T>, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<T, A> Drop for Vec<T, A>where + A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>where + T: Copy + 'a, + A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

+

This implementation is specialized for slice iterators, where it uses copy_from_slice to +append the entire slice at once.

+
source§

fn extend<I>(&mut self, iter: I)where + I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<T, A> Extend<T> for Vec<T, A>where + A: Allocator,

source§

fn extend<I>(&mut self, iter: I)where + I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<T> From<&[T]> for Vec<T>where + T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

+
Examples
+
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
+
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>where + T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

+
Examples
+
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
+
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>where + T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

+
Examples
+
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
+
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>where + T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

+
Examples
+
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
+
source§

impl From<&str> for Vec<u8>

source§

fn from(s: &str) -> Vec<u8>

Allocate a Vec<u8> and fill it with a UTF-8 string.

+
Examples
+
assert_eq!(Vec::from("123"), vec![b'1', b'2', b'3']);
+
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

+
Examples
+
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
+
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>where + A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

+

This conversion requires no data movement or allocation, and has +constant time complexity.

+
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>where + A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of +the existing heap allocation.

+
Examples
+
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();
+assert_eq!(Vec::from(b), vec![1, 2, 3]);
+
1.7.0 · source§

impl From<CString> for Vec<u8>

source§

fn from(s: CString) -> Vec<u8>

Converts a CString into a Vec<u8>.

+

The conversion consumes the CString, and removes the terminating NUL byte.

+
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>where + [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

+

If s already owns a Vec<T>, it will be returned directly. +If s is borrowing a slice, a new Vec<T> will be allocated and +filled by cloning s’s items into it.

+
Examples
+
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);
+let b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);
+assert_eq!(Vec::from(o), Vec::from(b));
+
source§

impl<'scene> From<GLTFInit> for Vec<Hitable<'scene>>

source§

fn from(gltf: GLTFInit) -> Self

Converts to this type from the input type.
1.14.0 · source§

impl From<String> for Vec<u8>

source§

fn from(string: String) -> Vec<u8>

Converts the given String to a vector Vec that holds values of type u8.

+
Examples
+
let s1 = String::from("hello world");
+let v1 = Vec::from(s1);
+
+for b in v1 {
+    println!("{b}");
+}
+
1.20.0 · source§

impl<T, A> From<Vec<T, A>> for Box<[T], A>where + A: Allocator,

source§

fn from(v: Vec<T, A>) -> Box<[T], A>

Convert a vector into a boxed slice.

+

If v has excess capacity, its items will be moved into a +newly-allocated buffer with exactly the right capacity.

+
Examples
+
assert_eq!(Box::from(vec![1, 2, 3]), vec![1, 2, 3].into_boxed_slice());
+

Any excess capacity is removed:

+ +
let mut vec = Vec::with_capacity(10);
+vec.extend([1, 2, 3]);
+
+assert_eq!(Box::from(vec), vec![1, 2, 3].into_boxed_slice());
+
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>where + A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

+

This never needs to re-allocate, but does need to do O(n) data movement if +the circular buffer doesn’t happen to be at the beginning of the allocation.

+
Examples
+
use std::collections::VecDeque;
+
+// This one is *O*(1).
+let deque: VecDeque<_> = (1..5).collect();
+let ptr = deque.as_slices().0.as_ptr();
+let vec = Vec::from(deque);
+assert_eq!(vec, [1, 2, 3, 4]);
+assert_eq!(vec.as_ptr(), ptr);
+
+// This one needs data rearranging.
+let mut deque: VecDeque<_> = (1..5).collect();
+deque.push_front(9);
+deque.push_front(8);
+let ptr = deque.as_slices().1.as_ptr();
+let vec = Vec::from(deque);
+assert_eq!(vec, [8, 9, 1, 2, 3, 4]);
+assert_eq!(vec.as_ptr(), ptr);
+
source§

impl<T, R, C> From<VecStorage<T, R, C>> for Vec<T>where + R: Dim, + C: Dim,

source§

fn from(vec: VecStorage<T, R, C>) -> Vec<T>

Converts to this type from the input type.
source§

impl<'a, T, C, const N: usize> FromArrays<&'a Vec<[T; N]>> for &'a [C]where + C: ArrayCast<Array = [T; N]>,

source§

fn from_arrays(arrays: &'a Vec<[T; N]>) -> &'a [C]

Cast a collection of arrays into an collection of colors.
source§

impl<'a, T, C, const N: usize> FromArrays<&'a mut Vec<[T; N]>> for &'a mut [C]where + C: ArrayCast<Array = [T; N]>,

source§

fn from_arrays(arrays: &'a mut Vec<[T; N]>) -> &'a mut [C]

Cast a collection of arrays into an collection of colors.
source§

impl<T, C, const N: usize> FromArrays<Vec<[T; N]>> for Vec<C>where + C: ArrayCast<Array = [T; N]>,

source§

fn from_arrays(arrays: Vec<[T; N]>) -> Vec<C>

Cast a collection of arrays into an collection of colors.
source§

impl<T, U> FromColor<Vec<T>> for Vec<U>where + T: ArrayCast, + U: ArrayCast<Array = <T as ArrayCast>::Array> + FromColor<T>,

source§

fn from_color(color: Vec<T>) -> Vec<U>

Convert all colors in place, without reallocating.

+ +
use palette::{convert::FromColor, SaturateAssign, Srgb, Lch};
+
+let srgb = vec![Srgb::new(0.8f32, 1.0, 0.2), Srgb::new(0.9, 0.1, 0.3)];
+let mut lch = Vec::<Lch>::from_color(srgb);
+
+lch.saturate_assign(0.1);
+
+let srgb = Vec::<Srgb>::from_color(lch);
+
source§

impl<T, U> FromColorUnclamped<Vec<T>> for Vec<U>where + T: ArrayCast, + U: ArrayCast<Array = <T as ArrayCast>::Array> + FromColorUnclamped<T>,

source§

fn from_color_unclamped(color: Vec<T>) -> Vec<U>

Convert all colors in place, without reallocating.

+ +
use palette::{convert::FromColorUnclamped, SaturateAssign, Srgb, Lch};
+
+let srgb = vec![Srgb::new(0.8f32, 1.0, 0.2), Srgb::new(0.9, 0.1, 0.3)];
+let mut lch = Vec::<Lch>::from_color_unclamped(srgb);
+
+lch.saturate_assign(0.1);
+
+let srgb = Vec::<Srgb>::from_color_unclamped(lch);
+
source§

impl<T> FromIterator<T> for Vec<T>

source§

fn from_iter<I>(iter: I) -> Vec<T>where + I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
source§

impl<'a, C> FromUints<&'a Vec<<C as UintCast>::Uint>> for &'a [C]where + C: UintCast,

source§

fn from_uints(uints: &'a Vec<<C as UintCast>::Uint>) -> &'a [C]

Cast a collection of unsigned integers into an collection of colors.
source§

impl<'a, C> FromUints<&'a mut Vec<<C as UintCast>::Uint>> for &'a mut [C]where + C: UintCast,

source§

fn from_uints(uints: &'a mut Vec<<C as UintCast>::Uint>) -> &'a mut [C]

Cast a collection of unsigned integers into an collection of colors.
source§

impl<C> FromUints<Vec<<C as UintCast>::Uint>> for Vec<C>where + C: UintCast,

source§

fn from_uints(uints: Vec<<C as UintCast>::Uint>) -> Vec<C>

Cast a collection of unsigned integers into an collection of colors.
source§

impl<T, A> Hash for Vec<T, A>where + T: Hash, + A: Allocator,

The hash of a vector is the same as that of the corresponding slice, +as required by the core::borrow::Borrow implementation.

+ +
use std::hash::BuildHasher;
+
+let b = std::collections::hash_map::RandomState::new();
+let v: Vec<u8> = vec![0xa8, 0x3c, 0x09];
+let s: &[u8] = &[0xa8, 0x3c, 0x09];
+assert_eq!(b.hash_one(v), b.hash_one(s));
+
source§

fn hash<H>(&self, state: &mut H)where + H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T, I, A> Index<I> for Vec<T, A>where + I: SliceIndex<[T]>, + A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T, I, A> IndexMut<I> for Vec<T, A>where + I: SliceIndex<[T]>, + A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a, T, C, const N: usize> IntoArrays<&'a [[T; N]]> for &'a Vec<C>where + C: ArrayCast<Array = [T; N]>,

source§

fn into_arrays(self) -> &'a [[T; N]]

Cast this collection of colors into a collection of arrays.
source§

impl<'a, T, C, const N: usize> IntoArrays<&'a mut [[T; N]]> for &'a mut Vec<C>where + C: ArrayCast<Array = [T; N]>,

source§

fn into_arrays(self) -> &'a mut [[T; N]]

Cast this collection of colors into a collection of arrays.
source§

impl<T, C, const N: usize> IntoArrays<Vec<[T; N]>> for Vec<C>where + C: ArrayCast<Array = [T; N]>,

source§

fn into_arrays(self) -> Vec<[T; N]>

Cast this collection of colors into a collection of arrays.
source§

impl<'a, T, C> IntoComponents<&'a [T]> for &'a Vec<C>where + T: 'a, + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

source§

fn into_components(self) -> &'a [T]

Cast this collection of colors into a collection of color components.
source§

impl<'a, T, C> IntoComponents<&'a mut [T]> for &'a mut Vec<C>where + T: 'a, + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

source§

fn into_components(self) -> &'a mut [T]

Cast this collection of colors into a collection of color components.
source§

impl<T, C> IntoComponents<Vec<T>> for Vec<C>where + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

source§

fn into_components(self) -> Vec<T>

Cast this collection of colors into a collection of color components.
source§

impl<'de, T, E> IntoDeserializer<'de, E> for Vec<T>where + T: IntoDeserializer<'de, E>, + E: Error,

§

type Deserializer = SeqDeserializer<<Vec<T> as IntoIterator>::IntoIter, E>

The type of the deserializer being converted into.
source§

fn into_deserializer(self) -> <Vec<T> as IntoDeserializer<'de, E>>::Deserializer

Convert this value into a deserializer.
source§

impl<'a, T, A> IntoIterator for &'a Vec<T, A>where + A: Allocator,

§

type Item = &'a T

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <&'a Vec<T, A> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T, A> IntoIterator for &'a mut Vec<T, A>where + A: Allocator,

§

type Item = &'a mut T

The type of the elements being iterated over.
§

type IntoIter = IterMut<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <&'a mut Vec<T, A> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<T, A> IntoIterator for Vec<T, A>where + A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of +the vector (from start to end). The vector cannot be used after calling +this.

+
Examples
+
let v = vec!["a".to_string(), "b".to_string()];
+let mut v_iter = v.into_iter();
+
+let first_element: Option<String> = v_iter.next();
+
+assert_eq!(first_element, Some("a".to_string()));
+assert_eq!(v_iter.next(), Some("b".to_string()));
+assert_eq!(v_iter.next(), None);
+
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
source§

impl<'a, C> IntoUints<&'a [<C as UintCast>::Uint]> for &'a Vec<C>where + C: UintCast,

source§

fn into_uints(self) -> &'a [<C as UintCast>::Uint]

Cast this collection of colors into a collection of unsigned integers.
source§

impl<'a, C> IntoUints<&'a mut [<C as UintCast>::Uint]> for &'a mut Vec<C>where + C: UintCast,

source§

fn into_uints(self) -> &'a mut [<C as UintCast>::Uint]

Cast this collection of colors into a collection of unsigned integers.
source§

impl<C> IntoUints<Vec<<C as UintCast>::Uint>> for Vec<C>where + C: UintCast,

source§

fn into_uints(self) -> Vec<<C as UintCast>::Uint>

Cast this collection of colors into a collection of unsigned integers.
source§

impl<T, A> Ord for Vec<T, A>where + T: Ord, + A: Allocator,

Implements ordering of vectors, lexicographically.

+
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>where + A: Allocator, + T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used +by ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>where + A: Allocator, + T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used +by ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>where + A: Allocator, + T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used +by ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>where + A: Allocator, + T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used +by ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>where + A: Allocator, + T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used +by ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
1.46.0 · source§

impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where + A: Allocator, + T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
source§

fn ne(&self, other: &Vec<U, A>) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
1.46.0 · source§

impl<T, U, A> PartialEq<Vec<U, A>> for &mut [T]where + A: Allocator, + T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
source§

fn ne(&self, other: &Vec<U, A>) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
1.48.0 · source§

impl<T, U, A> PartialEq<Vec<U, A>> for [T]where + A: Allocator, + T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
source§

fn ne(&self, other: &Vec<U, A>) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>where + A1: Allocator, + A2: Allocator, + T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>where + T: PartialOrd, + A1: Allocator, + A2: Allocator,

Implements comparison of vectors, lexicographically.

+
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl<T> Serialize for Vec<T>where + T: Serialize,

source§

fn serialize<S>( + &self, + serializer: S +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'a, T, C, const N: usize> TryComponentsAs<[C]> for Vec<T>where + C: ArrayCast<Array = [T; N]>,

§

type Error = SliceCastError

The error for when try_components_as fails to cast.
source§

fn try_components_as( + &self +) -> Result<&[C], <Vec<T> as TryComponentsAs<[C]>>::Error>

Try to cast this collection of color components into a reference to a +collection of colors. Read more
source§

impl<'a, T, C, const N: usize> TryComponentsAsMut<[C]> for Vec<T>where + C: ArrayCast<Array = [T; N]>,

§

type Error = SliceCastError

The error for when try_components_as_mut fails to cast.
source§

fn try_components_as_mut( + &mut self +) -> Result<&mut [C], <Vec<T> as TryComponentsAsMut<[C]>>::Error>

Try to cast this collection of color components into a mutable reference +to a collection of colors. Read more
1.66.0 · source§

impl<T, const N: usize> TryFrom<Vec<T>> for Box<[T; N]>

source§

fn try_from( + vec: Vec<T> +) -> Result<Box<[T; N]>, <Box<[T; N]> as TryFrom<Vec<T>>>::Error>

Attempts to convert a Vec<T> into a Box<[T; N]>.

+

Like Vec::into_boxed_slice, this is in-place if vec.capacity() == N, +but will require a reallocation otherwise.

+
Errors
+

Returns the original Vec<T> in the Err variant if +boxed_slice.len() does not equal N.

+
Examples
+

This can be used with vec! to create an array on the heap:

+ +
let state: Box<[f32; 100]> = vec![1.0; 100].try_into().unwrap();
+assert_eq!(state.len(), 100);
+
§

type Error = Vec<T>

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

impl<'a, T, C> TryFromComponents<&'a Vec<T>> for &'a [C]where + T: 'a, + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

§

type Error = SliceCastError

The error for when try_from_components fails to cast.
source§

fn try_from_components( + components: &'a Vec<T> +) -> Result<&'a [C], <&'a [C] as TryFromComponents<&'a Vec<T>>>::Error>

Try to cast a collection of color components into an collection of +colors. Read more
source§

impl<'a, T, C> TryFromComponents<&'a mut Vec<T>> for &'a mut [C]where + T: 'a, + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

§

type Error = SliceCastError

The error for when try_from_components fails to cast.
source§

fn try_from_components( + components: &'a mut Vec<T> +) -> Result<&'a mut [C], <&'a mut [C] as TryFromComponents<&'a mut Vec<T>>>::Error>

Try to cast a collection of color components into an collection of +colors. Read more
source§

impl<T, C> TryFromComponents<Vec<T>> for Vec<C>where + C: ArrayCast, + <C as ArrayCast>::Array: ArrayExt<Item = T>,

§

type Error = VecCastError<T>

The error for when try_from_components fails to cast.
source§

fn try_from_components( + components: Vec<T> +) -> Result<Vec<C>, <Vec<C> as TryFromComponents<Vec<T>>>::Error>

Try to cast a collection of color components into an collection of +colors. Read more
source§

impl<'a, C> UintsAs<[C]> for Vec<<C as UintCast>::Uint>where + C: UintCast,

source§

fn uints_as(&self) -> &[C]

Cast this collection of unsigned integers into a collection of colors.
source§

impl<'a, C> UintsAsMut<[C]> for Vec<<C as UintCast>::Uint>where + C: UintCast,

source§

fn uints_as_mut(&mut self) -> &mut [C]

Cast this collection of unsigned integers into a mutable collection of colors.
§

impl<T> Validate for Vec<T>where + T: Validate,

§

fn validate<P, R>(&self, root: &Root, path: P, report: &mut R)where + P: Fn() -> Path, + R: FnMut(&dyn Fn() -> Path, Error),

Validates the invariants required for the library to function safely.
source§

impl<A> Write for Vec<u8, A>where + A: Allocator,

Write is implemented for Vec<u8> by appending to the vector. +The vector will grow as needed.

+
source§

fn write(&mut self, buf: &[u8]) -> Result<usize, Error>

Write a buffer into this writer, returning how many bytes were written. Read more
source§

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes from a slice of buffers. Read more
source§

fn is_write_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored +implementation. Read more
source§

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

Attempts to write an entire buffer into this writer. Read more
source§

fn flush(&mut self) -> Result<(), Error>

Flush this output stream, ensuring that all intermediately buffered +contents reach their destination. Read more
source§

fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>

🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
source§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error +encountered. Read more
source§

fn by_ref(&mut self) -> &mut Selfwhere + Self: Sized,

Creates a “by reference” adapter for this instance of Write. Read more
source§

impl<T, A> Eq for Vec<T, A>where + T: Eq, + A: Allocator,

Auto Trait Implementations§

§

impl<T, A> RefUnwindSafe for Vec<T, A>where + A: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<T, A> Send for Vec<T, A>where + A: Send, + T: Send,

§

impl<T, A> Sync for Vec<T, A>where + A: Sync, + T: Sync,

§

impl<T, A> Unpin for Vec<T, A>where + A: Unpin, + T: Unpin,

§

impl<T, A> UnwindSafe for Vec<T, A>where + A: UnwindSafe, + T: UnwindSafe,

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<W> WriteBytesExt for Wwhere + W: Write + ?Sized,

§

fn write_u8(&mut self, n: u8) -> Result<(), Error>

Writes an unsigned 8 bit integer to the underlying writer. Read more
§

fn write_i8(&mut self, n: i8) -> Result<(), Error>

Writes a signed 8 bit integer to the underlying writer. Read more
§

fn write_u16<T>(&mut self, n: u16) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 16 bit integer to the underlying writer. Read more
§

fn write_i16<T>(&mut self, n: i16) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 16 bit integer to the underlying writer. Read more
§

fn write_u24<T>(&mut self, n: u32) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 24 bit integer to the underlying writer. Read more
§

fn write_i24<T>(&mut self, n: i32) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 24 bit integer to the underlying writer. Read more
§

fn write_u32<T>(&mut self, n: u32) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 32 bit integer to the underlying writer. Read more
§

fn write_i32<T>(&mut self, n: i32) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 32 bit integer to the underlying writer. Read more
§

fn write_u48<T>(&mut self, n: u64) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 48 bit integer to the underlying writer. Read more
§

fn write_i48<T>(&mut self, n: i64) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 48 bit integer to the underlying writer. Read more
§

fn write_u64<T>(&mut self, n: u64) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 64 bit integer to the underlying writer. Read more
§

fn write_i64<T>(&mut self, n: i64) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 64 bit integer to the underlying writer. Read more
§

fn write_u128<T>(&mut self, n: u128) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned 128 bit integer to the underlying writer.
§

fn write_i128<T>(&mut self, n: i128) -> Result<(), Error>where + T: ByteOrder,

Writes a signed 128 bit integer to the underlying writer.
§

fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned n-bytes integer to the underlying writer. Read more
§

fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error>where + T: ByteOrder,

Writes a signed n-bytes integer to the underlying writer. Read more
§

fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error>where + T: ByteOrder,

Writes an unsigned n-bytes integer to the underlying writer. Read more
§

fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error>where + T: ByteOrder,

Writes a signed n-bytes integer to the underlying writer. Read more
§

fn write_f32<T>(&mut self, n: f32) -> Result<(), Error>where + T: ByteOrder,

Writes a IEEE754 single-precision (4 bytes) floating point number to +the underlying writer. Read more
§

fn write_f64<T>(&mut self, n: f64) -> Result<(), Error>where + T: ByteOrder,

Writes a IEEE754 double-precision (8 bytes) floating point number to +the underlying writer. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

source§

impl<T> NumBytes for Twhere + T: Debug + AsRef<[u8]> + AsMut<[u8]> + PartialEq + Eq + PartialOrd + Ord + Hash + Borrow<[u8]> + BorrowMut<[u8]> + ?Sized,

source§

impl<T> Scalar for Twhere + T: 'static + Clone + PartialEq + Debug,

\ No newline at end of file diff --git a/clovers/textures/enum.Texture.html b/clovers/textures/enum.Texture.html new file mode 100644 index 00000000..41bd78e1 --- /dev/null +++ b/clovers/textures/enum.Texture.html @@ -0,0 +1,58 @@ +Texture in clovers::textures - Rust
pub enum Texture {
+    SolidColor(SolidColor),
+    SpatialChecker(SpatialChecker),
+    SurfaceChecker(SurfaceChecker),
+}
Expand description

A texture enum.

+

Variants§

§

SolidColor(SolidColor)

SolidColor texture

+
§

SpatialChecker(SpatialChecker)

SpatialChecker texture

+
§

SurfaceChecker(SurfaceChecker)

SurfaceChecker texture

+

Trait Implementations§

source§

impl Clone for Texture

source§

fn clone(&self) -> Texture

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Texture

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Texture

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Texture

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<SolidColor> for Texture

source§

fn from(v: SolidColor) -> Texture

Converts to this type from the input type.
source§

impl From<SpatialChecker> for Texture

source§

fn from(v: SpatialChecker) -> Texture

Converts to this type from the input type.
source§

impl From<SurfaceChecker> for Texture

source§

fn from(v: SurfaceChecker) -> Texture

Converts to this type from the input type.
source§

impl Serialize for Texture

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<SolidColor> for Texture

§

type Error = &'static str

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

fn try_into(self) -> Result<SolidColor, <Self as TryInto<SolidColor>>::Error>

Performs the conversion.
source§

impl TryInto<SpatialChecker> for Texture

§

type Error = &'static str

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

fn try_into( + self +) -> Result<SpatialChecker, <Self as TryInto<SpatialChecker>>::Error>

Performs the conversion.
source§

impl TryInto<SurfaceChecker> for Texture

§

type Error = &'static str

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

fn try_into( + self +) -> Result<SurfaceChecker, <Self as TryInto<SurfaceChecker>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/textures/index.html b/clovers/textures/index.html new file mode 100644 index 00000000..a1dccad8 --- /dev/null +++ b/clovers/textures/index.html @@ -0,0 +1,2 @@ +clovers::textures - Rust

Module clovers::textures

source ·
Expand description

Textures enable different surface textures for colorizing objects in various ways.

+

Re-exports

Modules

Enums

\ No newline at end of file diff --git a/clovers/textures/sidebar-items.js b/clovers/textures/sidebar-items.js new file mode 100644 index 00000000..10089bda --- /dev/null +++ b/clovers/textures/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Texture"],"mod":["solid_color","spatial_checker","surface_checker"]}; \ No newline at end of file diff --git a/clovers/textures/solid_color/index.html b/clovers/textures/solid_color/index.html new file mode 100644 index 00000000..809d135f --- /dev/null +++ b/clovers/textures/solid_color/index.html @@ -0,0 +1,2 @@ +clovers::textures::solid_color - Rust
Expand description

A solid color texture.

+

Structs

  • A solid color texture. Simplest possible Texture: returns a solid color at any surface coordinate or spatial position.
\ No newline at end of file diff --git a/clovers/textures/solid_color/sidebar-items.js b/clovers/textures/solid_color/sidebar-items.js new file mode 100644 index 00000000..9211b809 --- /dev/null +++ b/clovers/textures/solid_color/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["SolidColor"]}; \ No newline at end of file diff --git a/clovers/textures/solid_color/struct.SolidColor.html b/clovers/textures/solid_color/struct.SolidColor.html new file mode 100644 index 00000000..e4045f69 --- /dev/null +++ b/clovers/textures/solid_color/struct.SolidColor.html @@ -0,0 +1,51 @@ +SolidColor in clovers::textures::solid_color - Rust
pub struct SolidColor {
+    pub color: Srgb,
+}
Expand description

A solid color texture. Simplest possible Texture: returns a solid color at any surface coordinate or spatial position.

+

Fields§

§color: Srgb

The color of the Texture.

+

Implementations§

source§

impl SolidColor

source

pub fn new(color: Srgb) -> Self

Creates a new solid color texture with the specified color.

+

Trait Implementations§

source§

impl Clone for SolidColor

source§

fn clone(&self) -> SolidColor

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SolidColor

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SolidColor

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for SolidColor

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<SolidColor> for Texture

source§

fn from(v: SolidColor) -> Texture

Converts to this type from the input type.
source§

impl Serialize for SolidColor

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<SolidColor> for Texture

§

type Error = &'static str

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

fn try_into(self) -> Result<SolidColor, <Self as TryInto<SolidColor>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/textures/spatial_checker/index.html b/clovers/textures/spatial_checker/index.html new file mode 100644 index 00000000..d98bd985 --- /dev/null +++ b/clovers/textures/spatial_checker/index.html @@ -0,0 +1,2 @@ +clovers::textures::spatial_checker - Rust
Expand description

Checkered texture based on the world coordinates.

+

Structs

  • A standard checkered texture based on spatial 3D texturing.
\ No newline at end of file diff --git a/clovers/textures/spatial_checker/sidebar-items.js b/clovers/textures/spatial_checker/sidebar-items.js new file mode 100644 index 00000000..f8abef7d --- /dev/null +++ b/clovers/textures/spatial_checker/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["SpatialChecker"]}; \ No newline at end of file diff --git a/clovers/textures/spatial_checker/struct.SpatialChecker.html b/clovers/textures/spatial_checker/struct.SpatialChecker.html new file mode 100644 index 00000000..6610d1b4 --- /dev/null +++ b/clovers/textures/spatial_checker/struct.SpatialChecker.html @@ -0,0 +1,57 @@ +SpatialChecker in clovers::textures::spatial_checker - Rust
pub struct SpatialChecker {
+    pub even: Srgb,
+    pub odd: Srgb,
+    pub density: Float,
+}
Expand description

A standard checkered texture based on spatial 3D texturing.

+

Fields§

§even: Srgb

Uniform color for the even-numbered checkers of the texture.

+
§odd: Srgb

Uniform color for the odd-numbered checkers of the texture.

+
§density: Float

Controls the density of the checkered pattern. Default value is 1.0, which corresponds to filling a 1.0 unit cube in the coordinate system with one color of the pattern. Even values preferred - odd values may create a visually thicker stripe due to two stripes with same color being next to each other.

+

Implementations§

source§

impl SpatialChecker

source

pub fn new(color1: Srgb, color2: Srgb, density: Float) -> Self

Create a new SpatialChecker object with the specified colors and density.

+

Trait Implementations§

source§

impl Clone for SpatialChecker

source§

fn clone(&self) -> SpatialChecker

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SpatialChecker

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SpatialChecker

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<SpatialChecker> for Texture

source§

fn from(v: SpatialChecker) -> Texture

Converts to this type from the input type.
source§

impl Serialize for SpatialChecker

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<SpatialChecker> for Texture

§

type Error = &'static str

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

fn try_into( + self +) -> Result<SpatialChecker, <Self as TryInto<SpatialChecker>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/textures/surface_checker/index.html b/clovers/textures/surface_checker/index.html new file mode 100644 index 00000000..6a44d278 --- /dev/null +++ b/clovers/textures/surface_checker/index.html @@ -0,0 +1,2 @@ +clovers::textures::surface_checker - Rust
Expand description

Checkered texture based on the surface coordinates of an object.

+

Structs

  • A standard checkered texture based on 2D surface UV coordinates.
\ No newline at end of file diff --git a/clovers/textures/surface_checker/sidebar-items.js b/clovers/textures/surface_checker/sidebar-items.js new file mode 100644 index 00000000..ccbeabdd --- /dev/null +++ b/clovers/textures/surface_checker/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["SurfaceChecker"]}; \ No newline at end of file diff --git a/clovers/textures/surface_checker/struct.SurfaceChecker.html b/clovers/textures/surface_checker/struct.SurfaceChecker.html new file mode 100644 index 00000000..df157d04 --- /dev/null +++ b/clovers/textures/surface_checker/struct.SurfaceChecker.html @@ -0,0 +1,50 @@ +SurfaceChecker in clovers::textures::surface_checker - Rust
pub struct SurfaceChecker { /* private fields */ }
Expand description

A standard checkered texture based on 2D surface UV coordinates.

+

Implementations§

source§

impl SurfaceChecker

source

pub fn new(color1: Srgb, color2: Srgb, density: Float) -> Self

Create a new SurfaceChecker object with the specified colors and density.

+

Trait Implementations§

source§

impl Clone for SurfaceChecker

source§

fn clone(&self) -> SurfaceChecker

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SurfaceChecker

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SurfaceChecker

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<SurfaceChecker> for Texture

source§

fn from(v: SurfaceChecker) -> Texture

Converts to this type from the input type.
source§

impl Serialize for SurfaceChecker

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryInto<SurfaceChecker> for Texture

§

type Error = &'static str

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

fn try_into( + self +) -> Result<SurfaceChecker, <Self as TryInto<SurfaceChecker>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/clovers/type.Float.html b/clovers/type.Float.html new file mode 100644 index 00000000..5196faa5 --- /dev/null +++ b/clovers/type.Float.html @@ -0,0 +1,2 @@ +Float in clovers - Rust

Type Alias clovers::Float

source ·
pub type Float = f32;
Expand description

Internal type alias: this allows the crate to easily switch between float precision without modifying a lot of files.

+
\ No newline at end of file diff --git a/clovers/type.Vec2.html b/clovers/type.Vec2.html new file mode 100644 index 00000000..1ecf5727 --- /dev/null +++ b/clovers/type.Vec2.html @@ -0,0 +1,24 @@ +Vec2 in clovers - Rust

Type Alias clovers::Vec2

source ·
pub type Vec2 = Vector2<Float>;
Expand description

Internal type alias: a nalgebra Vector2 which is a vector with two dimensions, containing two of our internal Float types

+

Aliased Type§

struct Vec2 {
+    pub data: ArrayStorage<f32, 2, 1>,
+    /* private fields */
+}

Fields§

§data: ArrayStorage<f32, 2, 1>

The data storage that contains all the matrix components. Disappointed?

+

Well, if you came here to see how you can access the matrix components, +you may be in luck: you can access the individual components of all vectors with compile-time +dimensions <= 6 using field notation like this: +vec.x, vec.y, vec.z, vec.w, vec.a, vec.b. Reference and assignation work too:

+ +
let mut vec = Vector3::new(1.0, 2.0, 3.0);
+vec.x = 10.0;
+vec.y += 30.0;
+assert_eq!(vec.x, 10.0);
+assert_eq!(vec.y + 100.0, 132.0);
+

Similarly, for matrices with compile-time dimensions <= 6, you can use field notation +like this: mat.m11, mat.m42, etc. The first digit identifies the row to address +and the second digit identifies the column to address. So mat.m13 identifies the component +at the first row and third column (note that the count of rows and columns start at 1 instead +of 0 here. This is so we match the mathematical notation).

+

For all matrices and vectors, independently from their size, individual components can +be accessed and modified using indexing: vec[20], mat[(20, 19)]. Here the indexing +starts at 0 as you would expect.

+
\ No newline at end of file diff --git a/clovers/type.Vec3.html b/clovers/type.Vec3.html new file mode 100644 index 00000000..17477a94 --- /dev/null +++ b/clovers/type.Vec3.html @@ -0,0 +1,24 @@ +Vec3 in clovers - Rust

Type Alias clovers::Vec3

source ·
pub type Vec3 = Vector3<Float>;
Expand description

Internal type alias: a nalgebra Vector3 which is a vector with three dimensions, containing three of our internal Float types

+

Aliased Type§

struct Vec3 {
+    pub data: ArrayStorage<f32, 3, 1>,
+    /* private fields */
+}

Fields§

§data: ArrayStorage<f32, 3, 1>

The data storage that contains all the matrix components. Disappointed?

+

Well, if you came here to see how you can access the matrix components, +you may be in luck: you can access the individual components of all vectors with compile-time +dimensions <= 6 using field notation like this: +vec.x, vec.y, vec.z, vec.w, vec.a, vec.b. Reference and assignation work too:

+ +
let mut vec = Vector3::new(1.0, 2.0, 3.0);
+vec.x = 10.0;
+vec.y += 30.0;
+assert_eq!(vec.x, 10.0);
+assert_eq!(vec.y + 100.0, 132.0);
+

Similarly, for matrices with compile-time dimensions <= 6, you can use field notation +like this: mat.m11, mat.m42, etc. The first digit identifies the row to address +and the second digit identifies the column to address. So mat.m13 identifies the component +at the first row and third column (note that the count of rows and columns start at 1 instead +of 0 here. This is so we match the mathematical notation).

+

For all matrices and vectors, independently from their size, individual components can +be accessed and modified using indexing: vec[20], mat[(20, 19)]. Here the indexing +starts at 0 as you would expect.

+
\ No newline at end of file diff --git a/clovers/type.Vec4.html b/clovers/type.Vec4.html new file mode 100644 index 00000000..f0f39d55 --- /dev/null +++ b/clovers/type.Vec4.html @@ -0,0 +1,24 @@ +Vec4 in clovers - Rust

Type Alias clovers::Vec4

source ·
pub type Vec4 = Vector4<Float>;
Expand description

Internal type alias: a nalgebra Vector4 which is a vector with four dimensions, containing four of our internal Float types

+

Aliased Type§

struct Vec4 {
+    pub data: ArrayStorage<f32, 4, 1>,
+    /* private fields */
+}

Fields§

§data: ArrayStorage<f32, 4, 1>

The data storage that contains all the matrix components. Disappointed?

+

Well, if you came here to see how you can access the matrix components, +you may be in luck: you can access the individual components of all vectors with compile-time +dimensions <= 6 using field notation like this: +vec.x, vec.y, vec.z, vec.w, vec.a, vec.b. Reference and assignation work too:

+ +
let mut vec = Vector3::new(1.0, 2.0, 3.0);
+vec.x = 10.0;
+vec.y += 30.0;
+assert_eq!(vec.x, 10.0);
+assert_eq!(vec.y + 100.0, 132.0);
+

Similarly, for matrices with compile-time dimensions <= 6, you can use field notation +like this: mat.m11, mat.m42, etc. The first digit identifies the row to address +and the second digit identifies the column to address. So mat.m13 identifies the component +at the first row and third column (note that the count of rows and columns start at 1 instead +of 0 here. This is so we match the mathematical notation).

+

For all matrices and vectors, independently from their size, individual components can +be accessed and modified using indexing: vec[20], mat[(20, 19)]. Here the indexing +starts at 0 as you would expect.

+
\ No newline at end of file diff --git a/clovers/wavelength/constant.MAX_WAVELENGTH.html b/clovers/wavelength/constant.MAX_WAVELENGTH.html new file mode 100644 index 00000000..8c9f7ade --- /dev/null +++ b/clovers/wavelength/constant.MAX_WAVELENGTH.html @@ -0,0 +1,2 @@ +MAX_WAVELENGTH in clovers::wavelength - Rust
pub const MAX_WAVELENGTH: Wavelength = 780;
Expand description

The upper bound for the wavelenghts, exclusive

+
\ No newline at end of file diff --git a/clovers/wavelength/constant.MIN_WAVELENGTH.html b/clovers/wavelength/constant.MIN_WAVELENGTH.html new file mode 100644 index 00000000..c9064ae1 --- /dev/null +++ b/clovers/wavelength/constant.MIN_WAVELENGTH.html @@ -0,0 +1,2 @@ +MIN_WAVELENGTH in clovers::wavelength - Rust
pub const MIN_WAVELENGTH: Wavelength = 380;
Expand description

The lower bound for the wavelengths, inclusive

+
\ No newline at end of file diff --git a/clovers/wavelength/constant.SPECTRUM.html b/clovers/wavelength/constant.SPECTRUM.html new file mode 100644 index 00000000..a01f7b37 --- /dev/null +++ b/clovers/wavelength/constant.SPECTRUM.html @@ -0,0 +1,2 @@ +SPECTRUM in clovers::wavelength - Rust

Constant clovers::wavelength::SPECTRUM

source ·
pub const SPECTRUM: Range<Wavelength>;
Expand description

The range of wavelenghts used, inclusive low, exclusive high

+
\ No newline at end of file diff --git a/clovers/wavelength/constant.SPECTRUM_SIZE.html b/clovers/wavelength/constant.SPECTRUM_SIZE.html new file mode 100644 index 00000000..38183d92 --- /dev/null +++ b/clovers/wavelength/constant.SPECTRUM_SIZE.html @@ -0,0 +1,2 @@ +SPECTRUM_SIZE in clovers::wavelength - Rust
pub const SPECTRUM_SIZE: usize = _; // 400usize
Expand description

The length of the wavelength spectrum used

+
\ No newline at end of file diff --git a/clovers/wavelength/constant.WAVELENGTH_PROBABILITY.html b/clovers/wavelength/constant.WAVELENGTH_PROBABILITY.html new file mode 100644 index 00000000..a87a7efd --- /dev/null +++ b/clovers/wavelength/constant.WAVELENGTH_PROBABILITY.html @@ -0,0 +1,2 @@ +WAVELENGTH_PROBABILITY in clovers::wavelength - Rust
pub const WAVELENGTH_PROBABILITY: Float = _; // 0.00249999994f32
Expand description

The probability of picking a specific wavelength

+
\ No newline at end of file diff --git a/clovers/wavelength/constant.WAVE_SAMPLE_COUNT.html b/clovers/wavelength/constant.WAVE_SAMPLE_COUNT.html new file mode 100644 index 00000000..6f2902e4 --- /dev/null +++ b/clovers/wavelength/constant.WAVE_SAMPLE_COUNT.html @@ -0,0 +1,2 @@ +WAVE_SAMPLE_COUNT in clovers::wavelength - Rust
pub const WAVE_SAMPLE_COUNT: usize = 4;
Expand description

The count of wavelenghts used per ray in Hero Wavelength Sampling

+
\ No newline at end of file diff --git a/clovers/wavelength/fn.random_wavelength.html b/clovers/wavelength/fn.random_wavelength.html new file mode 100644 index 00000000..f6ad6a11 --- /dev/null +++ b/clovers/wavelength/fn.random_wavelength.html @@ -0,0 +1,2 @@ +random_wavelength in clovers::wavelength - Rust
pub fn random_wavelength(rng: &mut SmallRng) -> Wavelength
Expand description

Return a random wavelength, sampled uniformly from the visible spectrum.

+
\ No newline at end of file diff --git a/clovers/wavelength/fn.rotate_wavelength.html b/clovers/wavelength/fn.rotate_wavelength.html new file mode 100644 index 00000000..bd4c881b --- /dev/null +++ b/clovers/wavelength/fn.rotate_wavelength.html @@ -0,0 +1,2 @@ +rotate_wavelength in clovers::wavelength - Rust
pub fn rotate_wavelength(hero: Wavelength) -> [Wavelength; 4]
Expand description

Given a hero wavelength, create additional equidistant wavelengths in the visible spectrum. Returns an array of wavelengths, with the original hero wavelength as the first one.

+
\ No newline at end of file diff --git a/clovers/wavelength/fn.wavelength_into_xyz.html b/clovers/wavelength/fn.wavelength_into_xyz.html new file mode 100644 index 00000000..3ad5d6d8 --- /dev/null +++ b/clovers/wavelength/fn.wavelength_into_xyz.html @@ -0,0 +1,2 @@ +wavelength_into_xyz in clovers::wavelength - Rust
pub fn wavelength_into_xyz(lambda: Wavelength) -> Xyz<E>
Expand description
\ No newline at end of file diff --git a/clovers/wavelength/index.html b/clovers/wavelength/index.html new file mode 100644 index 00000000..644b309c --- /dev/null +++ b/clovers/wavelength/index.html @@ -0,0 +1,2 @@ +clovers::wavelength - Rust

Module clovers::wavelength

source ·
Expand description

The fundamental building blocks of spectral rendering.

+

Constants

Functions

Type Aliases

\ No newline at end of file diff --git a/clovers/wavelength/sidebar-items.js b/clovers/wavelength/sidebar-items.js new file mode 100644 index 00000000..4818be17 --- /dev/null +++ b/clovers/wavelength/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["MAX_WAVELENGTH","MIN_WAVELENGTH","SPECTRUM","SPECTRUM_SIZE","WAVELENGTH_PROBABILITY","WAVE_SAMPLE_COUNT"],"fn":["random_wavelength","rotate_wavelength","wavelength_into_xyz"],"type":["Wavelength"]}; \ No newline at end of file diff --git a/clovers/wavelength/type.Wavelength.html b/clovers/wavelength/type.Wavelength.html new file mode 100644 index 00000000..0320a294 --- /dev/null +++ b/clovers/wavelength/type.Wavelength.html @@ -0,0 +1,2 @@ +Wavelength in clovers::wavelength - Rust

Type Alias clovers::wavelength::Wavelength

source ·
pub type Wavelength = usize;
Expand description

Wavelength in nanometers

+
\ No newline at end of file diff --git a/clovers_cli/all.html b/clovers_cli/all.html new file mode 100644 index 00000000..03414131 --- /dev/null +++ b/clovers_cli/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Structs

Functions

\ No newline at end of file diff --git a/clovers_cli/draw_cpu/fn.draw.html b/clovers_cli/draw_cpu/fn.draw.html new file mode 100644 index 00000000..7939d4d9 --- /dev/null +++ b/clovers_cli/draw_cpu/fn.draw.html @@ -0,0 +1,2 @@ +draw in clovers_cli::draw_cpu - Rust

Function clovers_cli::draw_cpu::draw

source ·
pub fn draw(opts: RenderOpts, scene: &Scene<'_>) -> Vec<Srgb<u8>>
Expand description

The main drawing function, returns a Vec<Srgb> as a pixelbuffer.

+
\ No newline at end of file diff --git a/clovers_cli/draw_cpu/fn.index_to_params.html b/clovers_cli/draw_cpu/fn.index_to_params.html new file mode 100644 index 00000000..9965bd4a --- /dev/null +++ b/clovers_cli/draw_cpu/fn.index_to_params.html @@ -0,0 +1,4 @@ +index_to_params in clovers_cli::draw_cpu - Rust
fn index_to_params(
+    opts: &RenderOpts,
+    index: usize
+) -> (Float, Float, Float, Float)
\ No newline at end of file diff --git a/clovers_cli/draw_cpu/fn.progress_bar.html b/clovers_cli/draw_cpu/fn.progress_bar.html new file mode 100644 index 00000000..c3ae3ec4 --- /dev/null +++ b/clovers_cli/draw_cpu/fn.progress_bar.html @@ -0,0 +1 @@ +progress_bar in clovers_cli::draw_cpu - Rust
fn progress_bar(opts: &RenderOpts) -> ProgressBar
\ No newline at end of file diff --git a/clovers_cli/draw_cpu/fn.render_pixel.html b/clovers_cli/draw_cpu/fn.render_pixel.html new file mode 100644 index 00000000..a9427253 --- /dev/null +++ b/clovers_cli/draw_cpu/fn.render_pixel.html @@ -0,0 +1,6 @@ +render_pixel in clovers_cli::draw_cpu - Rust
fn render_pixel(
+    scene: &Scene<'_>,
+    opts: &RenderOpts,
+    index: usize,
+    rng: &mut SmallRng
+) -> Srgb<u8>
\ No newline at end of file diff --git a/clovers_cli/draw_cpu/fn.render_pixel_normalmap.html b/clovers_cli/draw_cpu/fn.render_pixel_normalmap.html new file mode 100644 index 00000000..89e6a992 --- /dev/null +++ b/clovers_cli/draw_cpu/fn.render_pixel_normalmap.html @@ -0,0 +1,6 @@ +render_pixel_normalmap in clovers_cli::draw_cpu - Rust
fn render_pixel_normalmap(
+    scene: &Scene<'_>,
+    opts: &RenderOpts,
+    index: usize,
+    rng: &mut SmallRng
+) -> Srgb<u8>
\ No newline at end of file diff --git a/clovers_cli/draw_cpu/fn.sample.html b/clovers_cli/draw_cpu/fn.sample.html new file mode 100644 index 00000000..14bd403e --- /dev/null +++ b/clovers_cli/draw_cpu/fn.sample.html @@ -0,0 +1,10 @@ +sample in clovers_cli::draw_cpu - Rust

Function clovers_cli::draw_cpu::sample

source ·
fn sample(
+    scene: &Scene<'_>,
+    x: Float,
+    y: Float,
+    width: Float,
+    height: Float,
+    rng: &mut SmallRng,
+    max_depth: u32
+) -> Option<LinSrgb>
Expand description

Get a single sample for a single pixel in the scene. Has slight jitter for antialiasing when multisampling.

+
\ No newline at end of file diff --git a/clovers_cli/draw_cpu/fn.sample_normalmap.html b/clovers_cli/draw_cpu/fn.sample_normalmap.html new file mode 100644 index 00000000..61801221 --- /dev/null +++ b/clovers_cli/draw_cpu/fn.sample_normalmap.html @@ -0,0 +1,8 @@ +sample_normalmap in clovers_cli::draw_cpu - Rust
fn sample_normalmap(
+    scene: &Scene<'_>,
+    x: Float,
+    y: Float,
+    width: Float,
+    height: Float,
+    rng: &mut SmallRng
+) -> LinSrgb
\ No newline at end of file diff --git a/clovers_cli/draw_cpu/index.html b/clovers_cli/draw_cpu/index.html new file mode 100644 index 00000000..09204139 --- /dev/null +++ b/clovers_cli/draw_cpu/index.html @@ -0,0 +1 @@ +clovers_cli::draw_cpu - Rust

Module clovers_cli::draw_cpu

source ·

Functions

\ No newline at end of file diff --git a/clovers_cli/draw_cpu/sidebar-items.js b/clovers_cli/draw_cpu/sidebar-items.js new file mode 100644 index 00000000..1d2cc134 --- /dev/null +++ b/clovers_cli/draw_cpu/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["draw","index_to_params","progress_bar","render_pixel","render_pixel_normalmap","sample","sample_normalmap"]}; \ No newline at end of file diff --git a/clovers_cli/fn.main.html b/clovers_cli/fn.main.html new file mode 100644 index 00000000..1759563d --- /dev/null +++ b/clovers_cli/fn.main.html @@ -0,0 +1 @@ +main in clovers_cli - Rust

Function clovers_cli::main

source ·
pub(crate) fn main() -> Result<(), Box<dyn Error>>
\ No newline at end of file diff --git a/clovers_cli/index.html b/clovers_cli/index.html new file mode 100644 index 00000000..d1b5ee9b --- /dev/null +++ b/clovers_cli/index.html @@ -0,0 +1,4 @@ +clovers_cli - Rust

Crate clovers_cli

source ·
Expand description

Command Line Interface for the raytracing renderer.

+

CPU-based rendering is fully functional. GPU-based rendering is at early experimentation stage only.

+

Modules

Structs

Functions

\ No newline at end of file diff --git a/clovers_cli/json_scene/fn.initialize.html b/clovers_cli/json_scene/fn.initialize.html new file mode 100644 index 00000000..3d7febaa --- /dev/null +++ b/clovers_cli/json_scene/fn.initialize.html @@ -0,0 +1,5 @@ +initialize in clovers_cli::json_scene - Rust
pub(crate) fn initialize<'scene>(
+    path: &Path,
+    width: u32,
+    height: u32
+) -> Result<Scene<'scene>, Box<dyn Error>>
\ No newline at end of file diff --git a/clovers_cli/json_scene/index.html b/clovers_cli/json_scene/index.html new file mode 100644 index 00000000..34879e21 --- /dev/null +++ b/clovers_cli/json_scene/index.html @@ -0,0 +1 @@ +clovers_cli::json_scene - Rust

Module clovers_cli::json_scene

source ·

Functions

\ No newline at end of file diff --git a/clovers_cli/json_scene/sidebar-items.js b/clovers_cli/json_scene/sidebar-items.js new file mode 100644 index 00000000..78da0bb9 --- /dev/null +++ b/clovers_cli/json_scene/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["initialize"]}; \ No newline at end of file diff --git a/clovers_cli/sidebar-items.js b/clovers_cli/sidebar-items.js new file mode 100644 index 00000000..f8b1e960 --- /dev/null +++ b/clovers_cli/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["main"],"mod":["draw_cpu","json_scene"],"struct":["Opts"]}; \ No newline at end of file diff --git a/clovers_cli/struct.Opts.html b/clovers_cli/struct.Opts.html new file mode 100644 index 00000000..64ab656e --- /dev/null +++ b/clovers_cli/struct.Opts.html @@ -0,0 +1,79 @@ +Opts in clovers_cli - Rust

Struct clovers_cli::Opts

source ·
pub(crate) struct Opts {
+    pub(crate) input: String,
+    pub(crate) output: Option<String>,
+    pub(crate) width: u32,
+    pub(crate) height: u32,
+    pub(crate) samples: u32,
+    pub(crate) max_depth: u32,
+    pub(crate) quiet: bool,
+    pub(crate) gpu: bool,
+    pub(crate) debug: bool,
+    pub(crate) normalmap: bool,
+}

Fields§

§input: String

Input filename / location

+
§output: Option<String>

Output filename / location. [default: renders/timestamp.png]

+
§width: u32

Width of the image in pixels

+
§height: u32

Height of the image in pixels

+
§samples: u32

Number of samples to generate per each pixel

+
§max_depth: u32

Maximum evaluated bounce depth for each ray

+
§quiet: bool

Suppress most of the text output

+
§gpu: bool

Use the GPU draw process instead of CPU

+
§debug: bool

Enable some debug logging

+
§normalmap: bool

Render a normal map only. Experimental feature.

+

Trait Implementations§

source§

impl Args for Opts

source§

fn group_id() -> Option<Id>

Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self. Read more
source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can update self. Read more
source§

impl CommandFactory for Opts

source§

fn command<'b>() -> Command

Build a [Command] that can instantiate Self. Read more
source§

fn command_for_update<'b>() -> Command

Build a [Command] that can update self. Read more
source§

impl FromArgMatches for Opts

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( + __clap_arg_matches: &mut ArgMatches +) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( + &mut self, + __clap_arg_matches: &ArgMatches +) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut( + &mut self, + __clap_arg_matches: &mut ArgMatches +) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Parser for Opts

§

fn parse() -> Self

Parse from std::env::args_os(), [exit][Error::exit] on error.
§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
§

fn parse_from<I, T>(itr: I) -> Selfwhere + I: IntoIterator<Item = T>, + T: Into<OsString> + Clone,

Parse from iterator, [exit][Error::exit] on error.
§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>where + I: IntoIterator<Item = T>, + T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
§

fn update_from<I, T>(&mut self, itr: I)where + I: IntoIterator<Item = T>, + T: Into<OsString> + Clone,

Update from iterator, [exit][Error::exit] on error.
§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>where + I: IntoIterator<Item = T>, + T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl RefUnwindSafe for Opts

§

impl Send for Opts

§

impl Sync for Opts

§

impl Unpin for Opts

§

impl UnwindSafe for Opts

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere + T: Real + Zero + Arithmetics + Clone, + Swp: WhitePoint<T>, + Dwp: WhitePoint<T>, + D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> Dwhere + M: TransformMatrix<T>,

Convert the source color to the destination color using the specified +method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford +method by default.
source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for Twhere + C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for Twhere + C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, C> ComponentsFrom<C> for Twhere + C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for Twhere + U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + 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> IntoAngle<U> for Twhere + U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<T, U> IntoColor<U> for Twhere + U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for Twhere + U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, +rounding and clamping.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere + SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its +superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T, C> TryComponentsInto<C> for Twhere + C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of +colors. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

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 Twhere + U: TryFrom<T>,

§

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.
source§

impl<T, U> TryIntoColor<U> for Twhere + U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined +range, otherwise an OutOfBounds error is returned which contains +the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for Uwhere + C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for Uwhere + C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/crates.js b/crates.js new file mode 100644 index 00000000..bf08c69f --- /dev/null +++ b/crates.js @@ -0,0 +1 @@ +window.ALL_CRATES = ["clovers","clovers_cli"]; \ No newline at end of file diff --git a/help.html b/help.html new file mode 100644 index 00000000..a15caf0d --- /dev/null +++ b/help.html @@ -0,0 +1 @@ +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/search-index.js b/search-index.js new file mode 100644 index 00000000..452355f7 --- /dev/null +++ b/search-index.js @@ -0,0 +1,6 @@ +var searchIndex = JSON.parse('{\ +"clovers":{"doc":"clovers - ray tracing in rust!","t":"DRRRGRDDGGGALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLALLLALLLLLLLLLLLLLLLLLLLLLALLLLLMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMALLLALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLAMLLLLLLLLLLLLLLLLLLLLLLLLLMALLAALLALLLLLLLLMAALLLLLLLLLLLLLLLLLLLLLMALLLLLLLLLLLALLLLLLLALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLAMLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMDLLLLLMLLLLLLLLLLLLLLLLMMLLLLLLLLLLLDDLLMLLLLLLLLLLLLLLLLLLMLLLLLLLLLMLLLLLLLLLLLLMMMMLMLLMMLLLLLLLLLLLLLLLLMLLLLMMMMLLMFNNNDNNNDENNNNNNNLLLLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLMFLLLLLLLLLLLLLLLLLLMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLLLLLMLLLDLLLLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLLLLLLLNNNNNNNEEIENNDNDNLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLALLLLLLAAALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLAAMMAMMKLKLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLMLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFFNNNNEDNNNNNNNLLLLLLLLLLALLLLLLALLLLLLLLLLLLALLLLLLLLLLLLAFMMAALLAALLLLLLAALLLLLLLLLLLLLLLLDDMLLLLLLLLLLLLLLLLMMLLLLLLLLLLLLLLLLLLLLLLLMMLMLLLLLLLLLLLLLLLLLLLLLLLDDLLLLLLLLLLMLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLMLMLLLLLLLLLLLLLLLLLLLLLLDDDMMLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDDMLLLLLLLLLLLMMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMLMMMLMMLLLLLLLLLLLLLLLLLLLLLLDDMLLMLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLMMLMMMMLLLLLLLLLLLLLLLLLMMLLLLMMLLMDDLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLLLLLLLLLLLLLLLDDLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLMMLLLLLLLLLLLLLLLLLLLLLLLDDMLLLLLLLLLLMMLLLLLLLLLLLLLLLLLFLLLLLLLLLLLLMMMMMMLLLLLLLLLLLLLLLLLLLLLLLDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMLLLLLLLLLLLLLLLLLLLLLLLDDMLLMLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLMMLMMMMLLLLLLLLLLLLLLLLLMMLLLLMMLLMDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLMLMDNDNDNEDNDNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFFFFDLLLLLLLLMLLLLLLLLLLLLLMMLLLLLLLLLLLMDDLLLLLLMLLLLMLLLLLLLLLLLLLLLMFLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLAAFLLLLLLLLLLRLLRLLLLLLLLLLMMLLLLLLLLLLLLMMFRDRRDRRRRRRRRFFFFLLLLLLLLLLLLLLLLLLMLLMFNNNELLLLLLLLLLLLLLLLLLLLLLLLLAAALLLLLLLLLLLLLLDLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLLMLMLLLLLLLLLLLLMLLLLLLLLLLLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLRRRRRRGFFF","n":["Box","EPSILON_CONSTANT_MEDIUM","EPSILON_RECT_THICKNESS","EPSILON_SHADOW_ACNE","Float","PI","RenderOpts","Vec","Vec2","Vec3","Vec4","aabb","adapt_into_using","adapt_into_using","adapt_into_using","allocator","allocator","append","apply_to","arrays_as","arrays_as","arrays_as_mut","arrays_as_mut","arrays_from","arrays_from","arrays_from","arrays_into","arrays_into","arrays_into","as_arrays","as_arrays","as_arrays_mut","as_arrays_mut","as_components","as_components","as_components_mut","as_components_mut","as_fd","as_mut","as_mut","as_mut","as_mut_ptr","as_mut_slice","as_ptr","as_raw_fd","as_ref","as_ref","as_ref","as_rngcore","as_slice","as_uints","as_uints","as_uints_mut","as_uints_mut","assume_init","assume_init","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","bvhnode","call","call_mut","call_once","camera","capacity","cause","clear","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_from","clone_from","clone_from","clone_into","clone_into","clone_into","clone_span","cmp","cmp","colorize","components_from","components_from","components_from","consume","current_span","data","data","data","dedup","dedup_by","dedup_by_key","default","default","default","default","default","default","default","deref","deref","deref_mut","deref_mut","description","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","downcast","downcast","downcast","downcast_raw","downcast_unchecked","downcast_unchecked","downcast_unchecked","drain","drop","drop","drop_span","enabled","enter","eq","eq","eq","eq","eq","eq","eq","event","event_enabled","exit","extend","extend","extend_from_slice","extend_from_within","extend_one","extend_one","extend_reserve","extend_reserve","extract_if","fill_buf","fill_bytes","finish","flush","flush","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_angle","from_angle","from_angle","from_arrays","from_arrays","from_color","from_color","from_color_unclamped","from_color_unclamped","from_iter","from_iter","from_raw","from_raw_in","from_raw_parts","from_raw_parts_in","from_stimulus","from_stimulus","from_stimulus","from_subset","from_subset","from_subset","from_uints","from_uints","ge","gt","hash","hash","height","hitable","index","index_mut","insert","interval","into","into","into","into_angle","into_angle","into_angle","into_arrays","into_arrays","into_arrays","into_arrays","into_arrays","into_arrays","into_boxed_slice","into_boxed_slice","into_color","into_color","into_color","into_color_unclamped","into_color_unclamped","into_color_unclamped","into_components","into_components","into_components","into_components","into_components","into_components","into_deserializer","into_flattened","into_future","into_inner","into_iter","into_iter","into_iter","into_iter","into_pin","into_raw","into_raw_parts","into_raw_parts_with_alloc","into_raw_with_allocator","into_searcher","into_stimulus","into_stimulus","into_stimulus","into_uints","into_uints","into_uints","into_uints","into_uints","into_uints","is_contained_in","is_empty","is_empty","is_in_subset","is_in_subset","is_in_subset","is_prefix_of","is_read_vectored","is_suffix_of","is_write_vectored","is_write_vectored","last","le","leak","leak","len","len","lt","materials","max_depth","max_level_hint","ne","ne","ne","ne","ne","ne","ne","new","new","new_in","new_in","new_span","new_uninit","new_uninit_in","new_uninit_slice","new_uninit_slice_in","new_zeroed","new_zeroed_in","new_zeroed_slice","new_zeroed_slice_in","next","next_back","next_u32","next_u64","normalmap","normals","nth","nth_back","objects","onb","partial_cmp","partial_cmp","pdf","pin","pin_in","poll","poll_next","pop","provide","push","push_within_capacity","quiet","random","ray","read","read_buf","read_exact","read_line","read_to_end","read_to_string","read_until","read_vectored","record","record","record_debug","record_follows_from","register_callsite","remove","reserve","reserve_exact","resize","resize_with","resume","retain","retain_mut","samples","scenes","seek","serialize","serialize","serialize","set_len","shrink_to","shrink_to_fit","size_hint","size_hint","source","spare_capacity_mut","spectrum","splice","split_at_spare_mut","split_off","stream_position","strip_prefix_of","strip_suffix_of","swap_remove","textures","to_owned","to_owned","to_owned","to_string","to_subset","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","to_subset_unchecked","truncate","try_close","try_components_as","try_components_as","try_components_as_mut","try_components_as_mut","try_components_into","try_components_into","try_components_into","try_fill_bytes","try_from","try_from","try_from","try_from","try_from","try_from_components","try_from_components","try_into","try_into","try_into","try_into_color","try_into_color","try_into_color","try_new","try_new_in","try_new_uninit","try_new_uninit_in","try_new_uninit_slice","try_new_zeroed","try_new_zeroed_in","try_new_zeroed_slice","try_reserve","try_reserve_exact","type_id","type_id","type_id","uints_as","uints_as","uints_as_mut","uints_as_mut","uints_from","uints_from","uints_from","uints_into","uints_into","uints_into","validate","validate","vzip","vzip","vzip","wavelength","width","with_capacity","with_capacity_in","write","write","write","write","write_all","write_all","write_fmt","write_i128","write_i16","write_i32","write_i64","write_i8","write_isize","write_length_prefix","write_str","write_u128","write_u16","write_u32","write_u64","write_u8","write_usize","write_vectored","write_vectored","AABB","adapt_into_using","add","arrays_from","arrays_into","axis","borrow","borrow_mut","clone","clone_into","components_from","deserialize","eq","fmt","from","from_angle","from_stimulus","from_subset","hit","hit_new","hit_old","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","new_from_coords","pad","serialize","surrounding_box","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","x","y","z","BVHNode","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","bounding_box","clone","clone_into","components_from","count","fmt","from","from_angle","from_list","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","left","right","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","Camera","CameraInit","adapt_into_using","adapt_into_using","aperture","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","components_from","components_from","deserialize","deserialize","fmt","fmt","focus_distance","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","get_ray","horizontal","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","lens_radius","look_at","look_from","lower_left_corner","new","origin","serialize","serialize","time_0","time_1","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","u","uints_from","uints_from","uints_into","uints_into","up","v","vertical","vertical_fov","vzip","vzip","w","colorize","BVHNode","Boxy","ConstantMedium","Empty","Empty","GLTF","GLTFTriangle","HitRecord","Hitable","MovingSphere","Quad","RotateY","STL","Sphere","Translate","Triangle","adapt_into_using","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_from","arrays_into","arrays_into","arrays_into","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","components_from","components_from","components_from","distance","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_angle","from_angle","from_angle","from_stimulus","from_stimulus","from_stimulus","from_subset","from_subset","from_subset","front_face","get_orientation","into","into","into","into_angle","into_angle","into_angle","into_color","into_color","into_color","into_color_unclamped","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","into_stimulus","is_in_subset","is_in_subset","is_in_subset","material","normal","position","set_face_normal","to_owned","to_owned","to_subset","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_components_into","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into_color","try_into_color","try_into_color","type_id","type_id","type_id","u","uints_from","uints_from","uints_from","uints_into","uints_into","uints_into","v","vzip","vzip","vzip","Interval","adapt_into_using","add","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","deserialize","eq","expand","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","max","min","new","new_from_intervals","serialize","size","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","ConeLight","Dielectric","Diffuse","DiffuseLight","Dispersive","Isotropic","Lambertian","Material","MaterialInit","MaterialTrait","MaterialType","Metal","Owned","ScatterRecord","Shared","SharedMaterial","Specular","adapt_into_using","adapt_into_using","adapt_into_using","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_from","arrays_from","arrays_from","arrays_into","arrays_into","arrays_into","arrays_into","arrays_into","attenuation","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","components_from","components_from","components_from","components_from","components_from","cone_light","default","default","default","deserialize","deserialize","deserialize","dielectric","diffuse_light","dispersive","emit","emit","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from_angle","from_angle","from_angle","from_angle","from_angle","from_stimulus","from_stimulus","from_stimulus","from_stimulus","from_stimulus","from_subset","from_subset","from_subset","from_subset","from_subset","gltf","into","into","into","into","into","into_angle","into_angle","into_angle","into_angle","into_angle","into_color","into_color","into_color","into_color","into_color","into_color_unclamped","into_color_unclamped","into_color_unclamped","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","into_stimulus","into_stimulus","into_stimulus","is_in_subset","is_in_subset","is_in_subset","is_in_subset","is_in_subset","isotropic","lambertian","material","material_type","metal","name","pdf_ptr","scatter","scatter","scattering_pdf","scattering_pdf","serialize","serialize","serialize","specular_ray","to_owned","to_owned","to_owned","to_owned","to_owned","to_subset","to_subset","to_subset","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","to_subset_unchecked","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_components_into","try_components_into","try_components_into","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into_color","try_into_color","try_into_color","try_into_color","try_into_color","type_id","type_id","type_id","type_id","type_id","uints_from","uints_from","uints_from","uints_from","uints_from","uints_into","uints_into","uints_into","uints_into","uints_into","vzip","vzip","vzip","vzip","vzip","ConeLight","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","default","deserialize","emit","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","scatter","scattering_pdf","serialize","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","Dielectric","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","color","components_from","default","deserialize","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","refractive_index","scatter","scattering_pdf","serialize","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","DiffuseLight","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","default","deserialize","emit","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","scatter","scattering_pdf","serialize","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","Dispersive","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","cauchy_a","cauchy_b","clone","clone_into","components_from","default","deserialize","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","refractive_index","scatter","scattering_pdf","serialize","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","GLTFMaterial","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","default","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","scatter","scattering_pdf","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","Isotropic","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","default","deserialize","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","scatter","scattering_pdf","serialize","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","Lambertian","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","default","deserialize","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","scatter","scattering_pdf","serialize","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","Metal","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","deserialize","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","scatter","scattering_pdf","serialize","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","normal_map","normal_to_color","Boxy","ConstantMedium","GLTF","MovingSphere","Object","ObjectList","ObjectList","Quad","RotateY","STL","Sphere","Translate","Triangle","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","boxy","clone","clone","clone_into","clone_into","components_from","components_from","constant_medium","deserialize","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","gltf","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","moving_sphere","object_to_hitable","objects","priority","quad","rotate","serialize","serialize","sphere","stl","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","translate","triangle","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","uints_from","uints_from","uints_into","uints_into","vzip","vzip","Boxy","BoxyInit","aabb","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","components_from","components_from","corner_0","corner_1","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","material","material","new","priority","serialize","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","uints_from","uints_from","uints_into","uints_into","vzip","vzip","ConstantMedium","ConstantMediumInit","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","boundary","clone","clone","clone_into","clone_into","components_from","components_from","density","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","new","priority","serialize","texture","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","uints_from","uints_from","uints_into","uints_into","vzip","vzip","GLTF","GLTFInit","GLTFTriangle","aabb","aabb","adapt_into_using","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_from","arrays_into","arrays_into","arrays_into","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","bvhnode","clone","clone","clone","clone_into","clone_into","clone_into","components_from","components_from","components_from","deserialize","fmt","fmt","fmt","from","from","from","from_angle","from_angle","from_angle","from_stimulus","from_stimulus","from_stimulus","from_subset","from_subset","from_subset","into","into","into","into_angle","into_angle","into_angle","into_color","into_color","into_color","into_color_unclamped","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","into_stimulus","is_in_subset","is_in_subset","is_in_subset","material","new","new","path","priority","serialize","to_owned","to_owned","to_owned","to_subset","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_components_into","try_from","try_from","try_from","try_into","try_into","try_into","try_into_color","try_into_color","try_into_color","type_id","type_id","type_id","uints_from","uints_from","uints_from","uints_into","uints_into","uints_into","vzip","vzip","vzip","MovingSphere","MovingSphereInit","aabb","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","center","center_0","center_0","center_1","center_1","clone","clone","clone_into","clone_into","components_from","components_from","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","get_uv","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","material","material","new","priority","radius","radius","serialize","time_0","time_1","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","uints_from","uints_from","uints_into","uints_into","vzip","vzip","Quad","QuadInit","aabb","adapt_into_using","adapt_into_using","area","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","components_from","components_from","d","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","material","material","new","normal","priority","q","q","serialize","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","u","u","uints_from","uints_from","uints_into","uints_into","v","v","vzip","vzip","w","RotateInit","RotateY","adapt_into_using","adapt_into_using","angle","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","components_from","components_from","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","new","object","priority","serialize","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","uints_from","uints_from","uints_into","uints_into","vzip","vzip","Sphere","SphereInit","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","center","clone","clone","clone_into","clone_into","components_from","components_from","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","get_uv","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","material","new","priority","radius","serialize","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","uints_from","uints_from","uints_into","uints_into","vzip","vzip","STL","STLInit","aabb","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","bvhnode","center","clone","clone","clone_into","clone_into","components_from","components_from","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","initialize_stl","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","material","material","path","priority","rotation","scale","serialize","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","uints_from","uints_from","uints_into","uints_into","vzip","vzip","Translate","TranslateInit","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","components_from","components_from","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","new","object","offset","priority","serialize","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","uints_from","uints_from","uints_into","uints_into","vzip","vzip","Triangle","TriangleInit","aabb","adapt_into_using","adapt_into_using","area","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","components_from","components_from","d","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_coordinates","from_stimulus","from_stimulus","from_subset","from_subset","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","material","material","new","normal","priority","q","q","serialize","to_owned","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","u","u","uints_from","uints_from","uints_into","uints_into","v","v","vzip","vzip","w","ONB","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","build_from_w","clone","clone_into","components_from","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","local","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","u","uints_from","uints_into","v","vzip","w","CosinePDF","CosinePDF","HitablePDF","HitablePDF","MixturePDF","MixturePDF","PDF","SpherePDF","SpherePDF","ZeroPDF","ZeroPDF","adapt_into_using","adapt_into_using","adapt_into_using","adapt_into_using","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_from","arrays_from","arrays_from","arrays_from","arrays_into","arrays_into","arrays_into","arrays_into","arrays_into","arrays_into","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","components_from","components_from","components_from","components_from","components_from","components_from","default","default","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from_angle","from_angle","from_angle","from_angle","from_angle","from_angle","from_stimulus","from_stimulus","from_stimulus","from_stimulus","from_stimulus","from_stimulus","from_subset","from_subset","from_subset","from_subset","from_subset","from_subset","into","into","into","into","into","into","into_angle","into_angle","into_angle","into_angle","into_angle","into_angle","into_color","into_color","into_color","into_color","into_color","into_color","into_color_unclamped","into_color_unclamped","into_color_unclamped","into_color_unclamped","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","into_stimulus","into_stimulus","into_stimulus","into_stimulus","is_in_subset","is_in_subset","is_in_subset","is_in_subset","is_in_subset","is_in_subset","new","new","new","new","new","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_subset","to_subset","to_subset","to_subset","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","to_subset_unchecked","to_subset_unchecked","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_components_into","try_components_into","try_components_into","try_components_into","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into_color","try_into_color","try_into_color","try_into_color","try_into_color","try_into_color","type_id","type_id","type_id","type_id","type_id","type_id","uints_from","uints_from","uints_from","uints_from","uints_from","uints_from","uints_into","uints_into","uints_into","uints_into","uints_into","uints_into","vzip","vzip","vzip","vzip","vzip","vzip","random_cosine_direction","random_in_unit_disk","random_on_hemisphere","random_unit_vector","Ray","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","direction","eq","evaluate","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","origin","time","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","wavelength","Scene","SceneFile","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_into","arrays_into","background_color","borrow","borrow","borrow_mut","borrow_mut","camera","clone","clone_into","components_from","components_from","deserialize","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","hitables","initialize","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","new","priority_hitables","serialize","to_owned","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","uints_from","uints_from","uints_into","uints_into","vzip","vzip","spectra_xyz_5nm_380_780_097","spectrum_grid","spectrum_xyz_to_p","adapt_into_using","adapt_into_using","arrays_from","arrays_from","arrays_into","arrays_into","borrow","borrow","borrow_mut","borrow_mut","cmf_wavelength","components_from","components_from","equal_energy_reflectance","fmt","fmt","from","from","from_angle","from_angle","from_stimulus","from_stimulus","from_subset","from_subset","idx","inside","into","into","into_angle","into_angle","into_color","into_color","into_color_unclamped","into_color_unclamped","into_stimulus","into_stimulus","is_in_subset","is_in_subset","num_points","spectrum","spectrum_apply_3x2","spectrum_bin_size","spectrum_data_point_t","spectrum_data_points","spectrum_grid","spectrum_grid_cell_t","spectrum_grid_height","spectrum_grid_height_f","spectrum_grid_width","spectrum_grid_width_f","spectrum_num_samples","spectrum_num_samples_f","spectrum_sample_max","spectrum_sample_min","spectrum_uv_to_xy","spectrum_xy_to_uv","spectrum_xy_to_xystar","spectrum_xystar_to_xy","to_subset","to_subset","to_subset_unchecked","to_subset_unchecked","try_components_into","try_components_into","try_from","try_from","try_into","try_into","try_into_color","try_into_color","type_id","type_id","uints_from","uints_from","uints_into","uints_into","uv","vzip","vzip","xystar","xyz_from_spectrum","SolidColor","SpatialChecker","SurfaceChecker","Texture","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","default","deserialize","fmt","from","from","from","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","serialize","solid_color","spatial_checker","surface_checker","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into","try_into","try_into","try_into_color","type_id","uints_from","uints_into","vzip","SolidColor","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","color","components_from","default","deserialize","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","serialize","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","SpatialChecker","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","density","deserialize","even","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","odd","serialize","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","SurfaceChecker","adapt_into_using","arrays_from","arrays_into","borrow","borrow_mut","clone","clone_into","components_from","deserialize","fmt","from","from_angle","from_stimulus","from_subset","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","new","serialize","to_owned","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","vzip","MAX_WAVELENGTH","MIN_WAVELENGTH","SPECTRUM","SPECTRUM_SIZE","WAVELENGTH_PROBABILITY","WAVE_SAMPLE_COUNT","Wavelength","random_wavelength","rotate_wavelength","wavelength_into_xyz"],"q":[[0,"clovers"],[530,"clovers::aabb"],[576,"clovers::bvhnode"],[612,"clovers::camera"],[696,"clovers::colorize"],[697,"clovers::hitable"],[835,"clovers::interval"],[876,"clovers::materials"],[1086,"clovers::materials::cone_light"],[1124,"clovers::materials::dielectric"],[1163,"clovers::materials::diffuse_light"],[1201,"clovers::materials::dispersive"],[1241,"clovers::materials::gltf"],[1276,"clovers::materials::isotropic"],[1313,"clovers::materials::lambertian"],[1350,"clovers::materials::metal"],[1386,"clovers::normals"],[1388,"clovers::objects"],[1478,"clovers::objects::boxy"],[1549,"clovers::objects::constant_medium"],[1618,"clovers::objects::gltf"],[1721,"clovers::objects::moving_sphere"],[1800,"clovers::objects::quad"],[1879,"clovers::objects::rotate"],[1947,"clovers::objects::sphere"],[2017,"clovers::objects::stl"],[2091,"clovers::objects::translate"],[2159,"clovers::objects::triangle"],[2239,"clovers::onb"],[2275,"clovers::pdf"],[2483,"clovers::random"],[2487,"clovers::ray"],[2524,"clovers::scenes"],[2591,"clovers::spectrum"],[2594,"clovers::spectrum::spectra_xyz_5nm_380_780_097"],[2675,"clovers::textures"],[2721,"clovers::textures::solid_color"],[2757,"clovers::textures::spatial_checker"],[2794,"clovers::textures::surface_checker"],[2828,"clovers::wavelength"],[2838,"palette::chromatic_adaptation"],[2839,"core::marker"],[2840,"core::alloc"],[2841,"palette::blend::pre_alpha"],[2842,"palette::cast::array"],[2843,"std::os::fd::owned"],[2844,"std::os::fd::owned"],[2845,"rand_core"],[2846,"palette::cast::uint"],[2847,"core::mem::maybe_uninit"],[2848,"core::marker"],[2849,"core::ops::function"],[2850,"core::option"],[2851,"core::clone"],[2852,"serde_json::raw"],[2853,"std::ffi::os_str"],[2854,"std::path"],[2855,"core::ffi::c_str"],[2856,"tracing_core::span"],[2857,"tracing_core::subscriber"],[2858,"core::cmp"],[2859,"core::cmp"],[2860,"tracing_core::span"],[2861,"core::result"],[2862,"serde::de"],[2863,"serde::de"],[2864,"core::any"],[2865,"core::ops::range"],[2866,"tracing_core::metadata"],[2867,"tracing_core::event"],[2868,"core::marker"],[2869,"alloc::vec::extract_if"],[2870,"std::io::error"],[2871,"core::hash"],[2872,"std::io"],[2873,"core::fmt"],[2874,"palette::oklab"],[2875,"palette::blend"],[2876,"palette::xyz"],[2877,"palette::oklch"],[2878,"palette::rgb::rgb"],[2879,"palette::hsl"],[2880,"palette::luv"],[2881,"palette::hsv"],[2882,"palette::luma::luma"],[2883,"palette::lch"],[2884,"palette::okhsl"],[2885,"palette::okhsv"],[2886,"palette::hwb"],[2887,"palette::cast::packed"],[2888,"palette::hsluv"],[2889,"alloc::ffi::c_str"],[2890,"alloc::string"],[2891,"std::path"],[2892,"palette::alpha::alpha"],[2893,"palette::yxy"],[2894,"palette::lab"],[2895,"palette::okhwb"],[2896,"alloc::collections::binary_heap"],[2897,"nalgebra::base::vec_storage"],[2898,"nalgebra::base::dimension"],[2899,"alloc::collections::vec_deque"],[2900,"palette::convert::from_into_color"],[2901,"palette::convert::from_into_color_unclamped"],[2902,"core::cmp"],[2903,"serde::de"],[2904,"core::str::pattern"],[2905,"core::iter::traits::exact_size"],[2906,"std::io"],[2907,"tracing_core::metadata"],[2908,"core::task::wake"],[2909,"core::task::poll"],[2910,"core::future::future"],[2911,"core::marker"],[2912,"core::error"],[2913,"std::io"],[2914,"tracing_core::field"],[2915,"core::ops::coroutine"],[2916,"serde::ser"],[2917,"rand_core::error"],[2918,"palette::convert::try_from_into_color"],[2919,"core::alloc"],[2920,"gltf_json::root"],[2921,"gltf_json::validation"],[2922,"core::fmt"],[2923,"palette::white_point"],[2924,"palette::rgb"],[2925,"palette::rgb"],[2926,"gltf::image"],[2927,"core::convert"]],"d":["A pointer type that uniquely owns a heap allocation of …","Internal const: epsilon used in the hit calculation of a …","Internal const: epsilon used for having a finitely-sized …","Internal const: epsilon used for avoiding “shadow acne”…","Internal type alias: this allows the crate to easily …","Internal helper: re-exports the pi constant as our …","Rendering options struct","A contiguous growable array type, written as Vec<T>, short …","Internal type alias: a nalgebra Vector2 which is a vector …","Internal type alias: a nalgebra Vector3 which is a vector …","Internal type alias: a nalgebra Vector4 which is a vector …","Axis-aligned bounding box.","","","","Returns a reference to the underlying allocator.","Returns a reference to the underlying allocator.","Moves all the elements of other into self, leaving other …","","","","","","","","","","","","","","","","","","","","","","","","Returns an unsafe mutable pointer to the vector’s …","Extracts a mutable slice of the entire vector.","Returns a raw pointer to the vector’s buffer, or a …","","","","","","Extracts a slice containing the entire vector.","","","","","Converts to Box<[T], A>.","Converts to Box<T, A>.","","","","","","","","","","","Bounding Volume Hierarchy Node.","","","","Camera. Used for creating Rays towards the scene, with …","Returns the total number of elements the vector can hold …","","Clears the vector, removing all values.","","","","","Returns a new box with a clone() of this box’s contents.","","","","","Copies source’s contents into self without creating a …","","","","","","","","","An opinionated colorize method. Given a Ray and a Scene, …","","","","","","The data storage that contains all the matrix components. …","The data storage that contains all the matrix components. …","The data storage that contains all the matrix components. …","Removes consecutive repeated elements in the vector …","Removes all but the first of consecutive elements in the …","Removes all but the first of consecutive elements in the …","","","","","Creates a Box<T>, with the Default value for T.","","Creates an empty Vec<T>.","","","","","","","","","","","","","","","Attempt to downcast the box to a concrete type.","Attempt to downcast the box to a concrete type.","Attempt to downcast the box to a concrete type.","","Downcasts the box to a concrete type.","Downcasts the box to a concrete type.","Downcasts the box to a concrete type.","Removes the specified range from the vector in bulk, …","","","","","","","","","","","","","","","","","","Clones and appends all elements in a slice to the Vec.","Copies elements from src range to the end of the vector.","","","","","Creates an iterator which uses a closure to determine if …","","","","","","","","","","","Converts a Cow<'_, str> into a Box<str>","","Converts a Cow into a box of dyn Error + Send + Sync.","Converts a [T; N] into a Box<[T]>","Converts a Cow<'a, CStr> into a Box<CStr>, by copying the …","Converts a Box<str> into a Box<[u8]>","","","","","","","","","","","","","","","Converts a Cow<'a, OsStr> into a Box<OsStr>, by copying …","","","","","","Converts a CString into a Box<CStr> without copying or …","Copies the string into a newly allocated Box<OsStr>.","","Converts a &str into a Box<str>","Converts the given String to a boxed str slice that is …","Converts a PathBuf into a Box<Path>.","Converts a type of Error + Send + Sync into a box of dyn …","Converts a str into a box of dyn Error + Send + Sync.","","Converts a &[T] into a Box<[T]>","","","Converts an OsString into a Box<OsStr> without copying or …","Converts a T into a Box<T>","Creates a boxed Path from a reference.","Convert a vector into a boxed slice.","","","","","Creates a boxed Path from a clone-on-write pointer.","Converts a String into a box of dyn Error.","Converts a str into a box of dyn Error.","","","Converts a &CStr into a Box<CStr>, by copying the contents …","Converts a Cow<'_, [T]> into a Box<[T]>","Converts a Cow into a box of dyn Error.","Converts a String into a box of dyn Error + Send + Sync.","Converts a type of Error into a box of dyn Error.","Returns the argument unchanged.","","","","","","","","","","","","","Returns the argument unchanged.","Allocate a Vec<T> and fill it by cloning s’s items.","","Converts the given String to a vector Vec that holds …","Allocate a Vec<T> and fill it by cloning s’s items.","Converts a BinaryHeap<T> into a Vec<T>.","Converts a CString into a Vec<u8>.","Returns the argument unchanged.","Convert a clone-on-write slice into a vector.","Convert a boxed slice into a vector by transferring …","Allocate a Vec<u8> and fill it with a UTF-8 string.","Allocate a Vec<T> and fill it by cloning s’s items.","Allocate a Vec<T> and move s’s items into it.","","Allocate a Vec<T> and fill it by cloning s’s items.","Turn a VecDeque<T> into a Vec<T>.","","","","","","Convert all colors in place, without reallocating.","Convert all colors in place, without reallocating.","Convert all colors in place, without reallocating.","Convert all colors in place, without reallocating.","","","Constructs a box from a raw pointer.","Constructs a box from a raw pointer in the given allocator.","Creates a Vec<T> directly from a pointer, a capacity, and …","Creates a Vec<T, A> directly from a pointer, a capacity, a …","","","","","","","","","","","","","Height of the render in pixels","An abstraction for things that can be hit by Rays.","","","Inserts an element at position index within the vector, …","Interval helper adapted from the book","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","Converts a Box<T> into a Box<[T]>","Converts the vector into Box<[T]>.","","","","","","","","","","","","","","Takes a Vec<[T; N]> and flattens it into a Vec<T>.","","Consumes the Box, returning the wrapped value.","","Creates a consuming iterator, that is, one that moves each …","","","Converts a Box<T> into a Pin<Box<T>>. If T does not …","Consumes the Box, returning a wrapped raw pointer.","Decomposes a Vec<T> into its raw components.","Decomposes a Vec<T> into its raw components.","Consumes the Box, returning a wrapped raw pointer and the …","","","","","","","","","","","","","Returns true if the vector contains no elements.","","","","","","","","","","","Consumes and leaks the Box, returning a mutable reference, …","Consumes and leaks the Vec, returning a mutable reference …","","Returns the number of elements in the vector, also …","","Materials enable different behaviors of light on objects.","Maximum ray bounce depth. Higher number implies higher …","","","","","","","","","Allocates memory on the heap and then places x into it.","Constructs a new, empty Vec<T>.","Allocates memory in the given allocator then places x into …","Constructs a new, empty Vec<T, A>.","","Constructs a new box with uninitialized contents.","Constructs a new box with uninitialized contents in the …","Constructs a new boxed slice with uninitialized contents.","Constructs a new boxed slice with uninitialized contents …","Constructs a new Box with uninitialized contents, with the …","Constructs a new Box with uninitialized contents, with the …","Constructs a new boxed slice with uninitialized contents, …","Constructs a new boxed slice with uninitialized contents …","","","","","Experimental render mode: return a normal map only instead …","Alternative render method to colorize.","","","Various literal objects and meta-object utilities for …","Orthonormal bases","","","Probability density functions","Constructs a new Pin<Box<T>>. If T does not implement Unpin…","Constructs a new Pin<Box<T, A>>. If T does not implement …","","","Removes the last element from a vector and returns it, or …","","Appends an element to the back of a collection.","Appends an element if there is sufficient spare capacity, …","Optionally, suppress CLI output","Various internal helper functions for getting specific …","The very core of the ray tracing rendering itself: the Ray","","","","","","","","","","","","","","Removes and returns the element at position index within …","Reserves capacity for at least additional more elements to …","Reserves the minimum capacity for at least additional more …","Resizes the Vec in-place so that len is equal to new_len.","Resizes the Vec in-place so that len is equal to new_len.","","Retains only the elements specified by the predicate.","Retains only the elements specified by the predicate, …","Samples per pixel to render for multisampling. Higher …","A collection of objects, camera, and other things …","","","","","Forces the length of the vector to new_len.","Shrinks the capacity of the vector with a lower bound.","Shrinks the capacity of the vector as much as possible.","","","","Returns the remaining spare capacity of the vector as a …","Utilities for Physically Meaningful Rendering using …","Creates a splicing iterator that replaces the specified …","Returns vector content as a slice of T, along with the …","Splits the collection into two at the given index.","","","","Removes an element from the vector and returns it.","Textures enable different surface textures for colorizing …","","","","","","","","","","","Shortens the vector, keeping the first len elements and …","","","","","","","","","","","Attempts to convert a Vec<T> into a Box<[T; N]>.","Attempts to convert a Box<[T]> into a Box<[T; N]>.","","","","","","","","","","","Allocates memory on the heap then places x into it, …","Allocates memory in the given allocator then places x into …","Constructs a new box with uninitialized contents on the …","Constructs a new box with uninitialized contents in the …","Constructs a new boxed slice with uninitialized contents. …","Constructs a new Box with uninitialized contents, with the …","Constructs a new Box with uninitialized contents, with the …","Constructs a new boxed slice with uninitialized contents, …","Tries to reserve capacity for at least additional more …","Tries to reserve the minimum capacity for at least …","","","","","","","","","","","","","","","","","","","The fundamental building blocks of spectral rendering.","Width of the render in pixels","Constructs a new, empty Vec<T> with at least the specified …","Constructs a new, empty Vec<T, A> with at least the …","","","Writes the value and converts to Box<T, A>.","","","","","","","","","","","","","","","","","","","","","Axis-aligned bounding box Defined by two opposing corners, …","","","","","Returns the interval of the given axis.","","","","","","","","","Returns the argument unchanged.","","","","Given a Ray, returns whether the ray hits the bounding box …","Given a Ray, returns whether the ray hits the bounding box …","Given a Ray, returns whether the ray hits the bounding box …","Calls U::from(self).","","","","","","Creates a new axis-aligned bounding box from three …","Creates a new axis-aligned bounding box from two …","Make sure we don’t have a zero-thickness AABB, padding …","","Given two axis-aligned bounding boxes, return a new AABB …","","","","","","","","","","","","The bounding interval on the X axis","The bounding interval on the Y axis","The bounding interval on the Z axis","Bounding Volume Hierarchy Node.","","","","","","Bounding box containing both of the child nodes","","","","Returns the count of the nodes in the tree","","Returns the argument unchanged.","","Create a new BVHNode tree from a given list of Objects","","","Calls U::from(self).","","","","","","Left child of the BVHNode","Right child of the BVHNode","","","","","","","","","","","","The main Camera object used in the ray tracing.","Represents the fields that can be described in a Scene …","","","Describes the size of the aperture of the camera.","","","","","","","","","","","","","","","","","","","Describes the distance at which the camera has been …","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Generates a new Ray from the camera, at a random location …","Defines the horizontal axis for the camera.","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Defines the lens radius for the camera. TODO: understand …","Describes where the camera is looking at","Describes where the camera is","Coordinate of the lower left corner of the camera.","Creates a new Camera with the given parameters.","Defines the origin of the camera.","","","Defines the earliest starting time for the camera, used …","Defines the latest ending time for the camera, used when …","","","","","","","","","","","","","","","","","U","","","","","Describes the subjective “up” direction for the camera …","V","Defines the vertical axis for the camera.","Describes the vertical field of view for the camera","","","W","The main coloring function. Sends a Ray to the Scene, sees …","","","","","","","","Represents a ray-object intersection, with plenty of data …","An abstraction for things that can be hit by Rays.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Distance from the ray origin to the hitpoint","","","","Returns the argument unchanged.","","","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","","","","","","","","","Is the hitpoint at the front of the surface","Returns a tuple of (front_face, normal). Used in lieu of …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","Reference to the material at the hitpoint","Surface normal from the hitpoint","3D coordinate of the hitpoint","Helper function for getting normals pointing at the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","U surface coordinate of the hitpoint","","","","","","","V surface coordinate of the hitpoint","","","","An interval structure.","","","","","","","","","","","","Returns an interval expanded with delta at both ends","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Largest value of the interval. Must be kept in order","Smallest value of the interval. Must be kept in order ","Constructs a new interval","Constructs a new interval from two intervals","","Returns the size of the interval","","","","","","","","","","","","ConeLight material","Dielectric material","A matte material that does not reflect rays","DiffuseLight material","Dispersive material","Isotropic material","Lambertian material","A material enum. TODO: for ideal clean abstraction, this …","Initialization structure for a Material. Either contains a …","Trait for materials. Requires three function …","Enum for the types of materials: Diffuse and Specular …","Metal material","Owned material structure","A record of an scattering event of a Ray on a Material.","Name of the shared material","A Material that can be referred to by name for reuse …","A shiny material that reflects some rays","","","","","","","","","","","","","","","","Current color to take into account when following the …","","","","","","","","","","","","","","","","","","","","","","","","","","A cone light material.","","","","","","","A dielectric material. This resembles glass and other …","A diffuse light material.","Dispersive material. Based on Cauchy’s equation","Returns the emissivity of the material at the given …","Returns the emissivity of the material at the given …","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","","","","","","","Wrapper for GLTF materials.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","Isotropic material.","Lambertian material. This is the default material with a …","The shared material itself","The material type that was scattered on","A metal material.","Name of the shared material","Probability density function to use with the ScatterRecord.","Given a ray and a hitrecord, return the possible …","Given a ray and a hitrecord, return the possible …","TODO: explain","TODO: explain","","","","Direction of a generated specular ray","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A cone light material. The material emits light if the …","","","","","","","","","Creates a new ConeLight with white light at intensity 100.0…","","Emission function for ConeLight. If the given HitRecord …","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Creates a new ConeLight material with the given Texture.","Scatter method for the ConeLight material. Always returns …","Scattering probability density function for the ConeLight …","","","","","","","","","","","","","A dielectric material. This resembles glass and other …","","","","","","","","Color of the material. Used for colorizing the rays. …","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Creates a new Dielectric material with the given …","Refractive index of the material. Used for calculating the …","Scatter method for the Dielectric material. Given a ray …","Scattering probability density function for Dielectric …","","","","","","","","","","","","","A diffuse light material. On this material, rays never …","","","","","","","","","Creates a new DiffuseLight with white light at intensity …","","Emission function for DiffuseLight. If the given HitRecord …","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Creates a new DiffuseLight material with the given Texture.","Scatter method for the DiffuseLight material. Always …","Scattering probability density function for the …","","","","","","","","","","","","","A dispersive glass material.","","","","","","Cauchy coefficient A of the material","Cauchy coefficient B of the material","","","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Creates a new Dispersive material with the given Cauchy …","Calculates the refractive index of the material for the …","","","","","","","","","","","","","","","GLTF Material wrapper type","","","","","","","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Initialize a new GLTF material wrapper","","","","","","","","","","","","","","Isotropic material. Used in ConstantMedium. TODO: …","","","","","","","","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Creates a new Isotropic material with an albedo of the …","Returns a ScatterRecord based on the HitRecord coordinates …","Returns the scattering probability density function for …","","","","","","","","","","","","","Lambertian material. This is the default material with a …","","","","","","","","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Creates a new instance of the Lambertian material with an …","Returns None, if ray is absorbed. Otherwise, returns a …","Returns the scattering probability density function for …","","","","","","","","","","","","","A metal material. The amount of reflection can be adjusted …","","","","","","","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Creates a new Metal material with the albedo of the given …","Scatter function for the Metal material. Metal always …","Scattering probability density function for Metal. Always …","","","","","","","","","","","","","Rendering function for getting a normal map in tangent …","Given a surface normal, return a color based on normal …","Boxy object initializer","ConstantMedium object initializer","GLTF object initializer","MovingSphere object initializer","An object enum. TODO: for ideal clean abstraction, this …","A list of objects. Allows multiple objects to be used e.g. …","ObjectList object initializer","Quad object initializer","RotateY object initializer","STL object initializer","Sphere object initializer","Translate object initializer","Triangle object initializer","","","","","","","","","","","A box or a cuboid object: a parallelepiped with six …","","","","","","","ConstantMedium object. This should probably be a Material …","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","GLTF format support for the renderer","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","A moving sphere object.","Initializes an Object into a Hitable.","The encased Object list","Priority","A quadrilateral object.","Utility object for rotating another object.","","","A sphere object.","STL utilities","","","","","","","Utility object for translating i.e. moving another object.","A triangle object. Almost exact copy of Quad, with an …","","","","","","","","","","","","","","","","","A box or a cuboid object: a parallelepiped with six …","BoxyInit structure describes the necessary data for …","Axis-aligned bounding box","","","","","","","","","","","","","","","","","First corner for the box","Second, opposing corner for the box","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Material used for the box","The material of the box","Initializes a new instance of a box, given two opposing …","Used for multiple importance sampling","","","","","","","","","","","","","","","","","","","","","","","","ConstantMedium object. This should probably be a Material …","ConstantMediumInit structure describes the necessary data …","","","","","","","","","","","The boundary object for the constant medium. This …","","","","","","","Density of the fog. TODO: example good value range?","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Creates a new ConstantMedium with a known size, shape and …","Used for multiple importance sampling","","Texture used for the colorization of the fog.","","","","","","","","","","","","","","","","","","","","","","","Internal GLTF object representation after initialization.","GLTF initialization structure","Internal GLTF object representation after initialization.","Axis-aligned bounding box of the object","Axis-aligned bounding box of the object","","","","","","","","","","","","","","","","Bounding Volume Hierarchy tree for the object","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","Material of the object","Create a new STL object with the given initialization …","Initialize a new GLTF object","Path of the .gltf file","Used for multiple importance sampling","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A moving sphere object. This is represented by one radius, …","SphereInit structure describes the necessary data for …","Axis-aligned bounding box","","","","","","","","","","","Returns the interpolated center of the moving sphere at …","Center point of the sphere at time_0","Center point of the sphere at time_0","Center point of the sphere at time_1","Center point of the sphere at time_1","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Returns the U,V surface coordinates of a hitpoint","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Material of the sphere.","Material of the sphere","Creates a new MovingSphere object. See the struct …","Used for multiple importance sampling","Radius of the sphere.","Radius of the sphere","","Time 0","Time 1","","","","","","","","","","","","","","","","","","","","","","","Quadrilateral shape. This can be an arbitrary …","Initialization structure for a Quad object.","Bounding box of the surface","","","Area of the surface","","","","","","","","","","","","","","","What is this? // TODO: understand, explain","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Material of the surface","Material of the surface","Creates a new quad","Normal vector of the surface","Used for multiple importance sampling","Corner point","Corner point","","","","","","","","","","","","","","","","","","Vector describing the u side","Vector describing the u side","","","","","Vector describing the v side","Vector describing the v side","","","What is this? // TODO: understand, explain","RotateInit structure describes the necessary data for …","RotateY object. It wraps the given Object and has adjusted …","","","Angle to rotate the object, in degrees","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Creates a new RotateY object. It wraps the given Object …","The encased Object to rotate","Used for multiple importance sampling","","","","","","","","","","","","","","","","","","","","","","","","A sphere object.","SphereInit structure describes the necessary data for …","","","","","","","","","","","Center of the sphere.","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Returns the U,V surface coordinates of a hitpoint","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Material of the sphere.","Creates a new Sphere object with the given center, radius …","Used for multiple importance sampling","Radius of the sphere.","","","","","","","","","","","","","","","","","","","","","","","","Internal STL object representation after initialization. …","STL structure. This gets converted into an internal …","Axis-aligned bounding box of the object","","","","","","","","","","","Bounding Volume Hierarchy tree for the object","Location of the object in the rendered scene","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Initializes an STL","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Material for the object","Material to use for the .stl object","Path of the .stl file","Used for multiple importance sampling","Rotation of the object. Described as three angles, roll, …","Scaling factor for the object","","","","","","","","","","","","","","","","","","","","","","","","Translate object. It wraps the given Object and has …","TranslateInit structure describes the necessary data for …","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Creates a new Translate object. It wraps the given Object …","The encased Object to translate i.e. move","The vector describing the movement of the object","Used for multiple importance sampling","","","","","","","","","","","","","","","","","","","","","","","","Triangle shape. Heavily based on Quad and may contain …","Initialization structure for a triangle primitive","Bounding box of the surface","","","Area of the surface","","","","","","","","","","","","","","","What is this? // TODO: understand, explain","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Creates a new triangle from three Cartesian space …","","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Material of the surface","Material of the surface","Creates a new triangle from a coordinate point and two …","Normal vector of the surface","Used for multiple importance sampling","Corner point","Corner point","","","","","","","","","","","","","","","","","","Vector describing the u side","Vector describing the u side","","","","","Vector describing the v side","Vector describing the v side","","","What is this? // TODO: understand, explain","An orthonormal basis structure.","","","","","","Builds a new ONB structure given a normal vector.","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Returns the ONB-projected version of the provided vector?","","","","","","","","","U","","","V","","W","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Internal helper.","Internal helper.","Internal helper.","Internal helper.","A Ray has an origin and a direction, as well as an instant …","","","","","","","","","The direction of the ray.","","Evaluates the position (coordinate) at which the ray is at …","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","The origin of the ray.","The time instant at which the ray exists.","","","","","","","","","","","","Wavelength of the ray","A representation of the scene that is being rendered.","A serialized representation of a Scene.","","","","","","","The background color to use when the rays do not hit …","","","","","The camera object used for rendering the scene.","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Bounding-volume hierarchy of Hitable objects in the scene. …","Initializes a new Scene instance by parsing the contents …","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","Creates a new Scene with the given parameters.","A BVHNode tree of prioritized objects - e.g. glass items …","","","","","","","","","","","","","","","","","","","","","","","Hand-converted from spectra_xyz_5nm_380_780_0.97.h in the …","Hand-converted from spectrum_grid.h in the supplemental …","Evaluate the spectrum at the given wavelength for the …","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","SolidColor texture","SpatialChecker texture","SurfaceChecker texture","A texture enum.","","","","","","","","","","","","Returns the argument unchanged.","","","","","","","Calls U::from(self).","","","","","","","A solid color texture.","Checkered texture based on the world coordinates.","Checkered texture based on the surface coordinates of an …","","","","","","","","","","","","","","","A solid color texture. Simplest possible Texture: returns …","","","","","","","","The color of the Texture.","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Creates a new solid color texture with the specified color.","","","","","","","","","","","","","A standard checkered texture based on spatial 3D texturing.","","","","","","","","","Controls the density of the checkered pattern. Default …","","Uniform color for the even-numbered checkers of the …","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Create a new SpatialChecker object with the specified …","Uniform color for the odd-numbered checkers of the texture.","","","","","","","","","","","","","A standard checkered texture based on 2D surface UV …","","","","","","","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","","","","","","Create a new SurfaceChecker object with the specified …","","","","","","","","","","","","","The upper bound for the wavelenghts, exclusive","The lower bound for the wavelengths, inclusive","The range of wavelenghts used, inclusive low, exclusive …","The length of the wavelength spectrum used","The probability of picking a specific wavelength","The count of wavelenghts used per ray in Hero Wavelength …","Wavelength in nanometers","Return a random wavelength, sampled uniformly from the …","Given a hero wavelength, create additional equidistant …","Helper function adapted from …"],"i":[0,0,0,0,0,0,0,0,0,0,0,0,2,31,5,2,5,5,2,2,5,2,5,2,31,5,2,31,5,2,5,2,5,2,5,2,5,2,2,5,5,5,5,5,2,2,5,5,2,5,2,5,2,5,2,2,2,2,31,5,5,2,2,31,5,5,0,2,2,2,0,5,2,5,2,2,2,2,2,2,2,31,5,2,2,5,2,31,5,2,2,5,0,2,31,5,2,2,217,149,218,5,5,5,2,2,2,2,2,2,5,2,5,2,5,2,2,2,2,2,2,2,2,31,5,2,2,2,2,2,2,2,5,2,5,2,2,2,2,5,5,5,5,5,5,2,2,2,5,5,5,5,5,5,5,5,5,2,2,2,2,5,2,2,2,31,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,31,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,2,31,5,2,5,2,5,2,5,2,5,2,2,5,5,2,31,5,2,31,5,2,5,2,2,2,5,31,0,5,5,5,0,2,31,5,2,31,5,2,2,2,5,5,5,2,5,2,31,5,2,31,5,2,2,2,5,5,5,5,5,2,2,2,5,5,5,2,2,5,5,2,2,2,31,5,2,2,2,5,5,5,2,2,5,2,31,5,2,2,2,2,5,2,2,2,5,2,5,2,0,31,2,2,5,5,5,5,5,5,2,5,2,5,2,2,2,2,2,2,2,2,2,2,2,2,2,31,0,2,2,0,0,2,5,0,2,2,2,2,5,2,5,5,31,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,5,5,2,5,5,31,0,2,2,31,5,5,5,5,2,2,2,5,0,5,5,5,2,2,2,5,0,2,31,5,2,2,31,5,2,31,5,5,2,2,5,2,5,2,31,5,2,2,2,2,31,5,2,5,2,31,5,2,31,5,2,2,2,2,2,2,2,2,5,5,2,31,5,2,5,2,5,2,31,5,2,31,5,2,5,2,31,5,0,31,5,5,2,2,2,5,2,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,0,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,0,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,0,0,154,155,155,154,155,154,155,154,155,154,155,154,155,154,155,154,155,154,155,154,155,155,154,155,154,155,154,155,154,155,154,154,154,155,154,155,154,155,154,155,154,155,154,155,154,155,155,154,154,154,154,155,154,154,154,155,154,155,154,155,154,155,154,155,154,155,154,155,154,155,154,154,155,154,155,155,154,154,155,154,155,154,0,92,92,92,0,92,92,92,0,0,92,92,92,92,92,92,92,160,92,159,160,92,159,160,92,159,160,92,159,160,92,159,92,159,92,159,160,92,159,160,160,92,159,160,92,92,92,92,92,92,92,92,92,92,92,92,92,92,159,160,92,159,160,92,159,160,92,159,160,0,160,92,159,160,92,159,160,92,159,160,92,159,160,92,159,160,92,159,160,160,160,160,92,159,160,92,159,160,92,159,160,92,159,160,92,159,160,92,92,92,92,92,92,92,92,92,92,92,92,92,92,159,160,92,159,160,92,159,160,160,92,159,160,92,159,160,160,92,159,0,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,174,174,175,174,174,174,174,0,0,0,0,174,172,0,172,0,175,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,0,172,173,174,172,173,174,0,0,0,219,174,172,173,174,175,176,172,173,174,174,174,174,174,174,174,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,0,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,0,0,173,176,0,173,176,219,174,219,174,172,173,174,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,174,174,174,174,174,174,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,172,173,174,175,176,0,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,0,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,0,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,0,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,0,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,0,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,0,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,0,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,0,0,193,193,193,193,0,0,193,193,193,193,193,193,193,192,193,192,193,192,193,192,193,192,193,0,192,193,192,193,192,193,0,192,193,192,193,192,193,192,193,192,193,192,193,0,192,193,192,193,192,193,192,193,192,193,192,193,0,0,192,192,0,0,192,193,0,0,192,193,192,193,192,193,0,0,192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193,0,0,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,194,194,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,169,194,194,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,194,169,0,0,195,165,195,165,195,165,195,165,195,165,195,195,165,195,165,195,165,195,195,195,165,195,165,195,165,195,165,195,165,195,165,195,165,195,165,195,165,195,165,195,165,165,195,195,195,195,165,195,165,195,165,195,165,195,165,195,165,195,165,195,165,195,165,195,165,195,165,0,0,0,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,166,91,166,170,91,166,170,91,166,170,91,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,170,166,170,91,91,91,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,91,166,170,0,0,167,196,167,196,167,196,167,196,167,196,167,167,196,167,196,167,196,167,196,167,196,167,196,196,167,196,167,196,167,196,167,196,167,167,196,167,196,167,196,167,196,167,196,167,196,167,196,167,167,196,196,167,196,167,167,196,167,196,167,196,167,196,167,196,167,196,167,196,167,196,167,196,167,196,167,196,167,0,0,164,197,164,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,164,197,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,164,164,197,197,164,197,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,197,164,164,0,0,198,168,198,198,168,198,168,198,168,198,168,198,168,198,168,198,168,198,198,168,198,168,198,168,198,168,198,168,198,168,198,168,198,168,198,168,198,168,198,168,168,198,198,198,198,168,198,168,198,168,198,168,198,168,198,168,198,168,198,168,198,168,198,168,198,168,0,0,199,171,199,171,199,171,199,171,199,171,199,199,171,199,171,199,171,199,199,171,199,171,199,171,199,171,199,171,171,199,171,199,171,199,171,199,171,199,171,199,171,199,171,199,199,199,199,171,199,171,199,171,199,171,199,171,199,171,199,171,199,171,199,171,199,171,199,171,0,0,163,163,200,163,200,163,200,163,200,163,200,163,200,163,200,163,200,163,200,200,163,200,163,200,163,200,163,200,163,200,0,163,200,163,200,163,200,163,200,163,200,163,200,163,200,200,200,200,200,200,163,200,163,200,163,200,163,200,163,200,163,200,163,200,163,200,163,200,163,200,163,200,0,0,201,162,201,162,201,162,201,162,201,162,201,162,201,162,201,162,201,201,162,201,162,201,162,201,162,201,162,201,162,201,162,201,162,201,162,201,162,201,162,162,201,201,201,201,201,162,201,162,201,162,201,162,201,162,201,162,201,162,201,162,201,162,201,162,201,162,0,0,161,202,161,161,202,161,202,161,202,161,202,161,202,161,202,161,202,161,161,202,202,161,202,161,202,161,161,202,161,202,161,202,161,202,161,202,161,202,161,202,161,202,161,202,161,161,161,202,202,161,202,202,161,202,161,202,161,202,161,202,161,202,161,202,161,202,161,202,161,202,161,202,161,202,161,202,161,161,0,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,0,204,0,204,0,204,0,0,204,0,204,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,208,209,204,205,206,207,208,209,204,204,204,204,204,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,204,204,204,204,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,204,205,206,207,208,209,0,0,0,0,0,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,0,0,157,210,157,210,157,210,157,157,210,157,210,157,210,210,157,210,210,157,210,157,210,157,210,157,210,157,210,157,0,157,210,157,210,157,210,157,210,157,210,157,210,157,157,210,210,157,210,157,210,157,210,157,210,157,210,157,210,157,210,157,210,157,210,157,210,0,0,0,211,212,211,212,211,212,211,212,211,212,0,211,212,0,211,212,211,212,211,212,211,212,211,212,211,211,211,212,211,212,211,212,211,212,211,212,211,212,211,212,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,211,212,211,212,211,212,211,212,211,212,211,212,211,212,211,212,211,212,212,211,212,212,0,185,185,185,0,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,0,0,0,185,185,185,185,185,185,185,185,185,185,185,185,185,185,0,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,0,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,0,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,0,0,0,0,0,0,0,0,0,0],"f":[0,0,0,0,0,0,0,0,0,0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[[2,[-1,-2]]],-2,3,4],[[[5,[-1,-2]]],-2,[],4],[[[5,[-1,-2]],[5,[-1,-2]]],6,[],4],[[-1,[7,[-2]],[7,[-2]]],[[7,[-2]]],[],[]],[[[2,[[9,[[8,[-1]]]]]]],[[9,[-2]]],[],10],[[[5,[[8,[-1]]]]],[[9,[-2]]],[],10],[[[2,[[9,[[8,[-1]]]]]]],[[9,[-2]]],[],10],[[[5,[[8,[-1]]]]],[[9,[-2]]],[],10],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[[9,[-1]]]]],[[9,[[8,[-2]]]]],10,[]],[[[5,[-1]]],[[9,[[8,[-2]]]]],10,[]],[[[2,[[9,[-1]]]]],[[9,[[8,[-2]]]]],10,[]],[[[5,[-1]]],[[9,[[8,[-2]]]]],10,[]],[[[2,[[9,[-1]]]]],[[9,[-2]]],10,[]],[[[5,[-1]]],[[9,[-2]]],10,[]],[[[2,[[9,[-1]]]]],[[9,[-2]]],10,[]],[[[5,[-1]]],[[9,[-2]]],10,[]],[[[2,[-1]]],11,12],[[[2,[-1,-2]]],-1,3,4],[[[5,[-1,-2]]],[[9,[-1]]],[],4],[[[5,[-1,-2]]],[[5,[-1,-2]]],[],4],[[[5,[-1,-2]]],[],[],4],[[[5,[-1,-2]]],[[9,[-1]]],[],4],[[[5,[-1,-2]]],[],[],4],[[[2,[-1]]],13,14],[[[2,[-1,-2]]],-1,3,4],[[[5,[-1,-2]]],[[5,[-1,-2]]],[],4],[[[5,[-1,-2]]],[[9,[-1]]],[],4],[-1,15,[]],[[[5,[-1,-2]]],[[9,[-1]]],[],4],[[[2,[[9,[-1]]]]],9,16],[[[5,[-1]]],9,16],[[[2,[[9,[-1]]]]],9,16],[[[5,[-1]]],9,16],[[[2,[[9,[[17,[-1]]]],-2]]],[[2,[[9,[-1]],-2]]],[],4],[[[2,[[17,[-1]],-2]]],[[2,[-1,-2]]],[],4],[-1,-2,[],[]],[[[2,[-1,-2]]],-1,3,4],[-1,-2,[],[]],[[[5,[-1,-2]]],[[9,[-1]]],[],4],[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[-1,-2]]],-1,3,4],[-1,-2,[],[]],[-1,-2,[],[]],[[[5,[-1,-2]]],[[9,[-1]]],[],4],0,[[[2,[-2,-3]],-1],[],18,[[19,[-1]],3],4],[[[2,[-2,-3]],-1],[],18,[[20,[-1]],3],4],[[[2,[-2,-3]],-1],[],18,[[21,[-1]],3],4],0,[[[5,[-1,-2]]],22,[],4],[[[2,[-1]]],[[24,[23]]],23],[[[5,[-1,-2]]],6,[],4],[[[2,[[9,[-1]],-2]]],[[2,[[9,[-1]],-2]]],25,[4,25]],[[[2,[26]]],[[2,[26]]]],[[[2,[27]]],[[2,[27]]]],[[[2,[28]]],[[2,[28]]]],[[[2,[-1,-2]]],[[2,[-1,-2]]],25,[4,25]],[[[2,[29]]],[[2,[29]]]],[[[2,[30]]],[[2,[30]]]],[31,31],[[[5,[-1,-2]]],[[5,[-1,-2]]],25,[4,25]],[[[2,[-1,-2]],[2,[-1,-2]]],6,25,[4,25]],[[[2,[[9,[-1]],-2]],[2,[[9,[-1]],-2]]],6,25,[4,25]],[[[5,[-1,-2]],[5,[-1,-2]]],6,25,[4,25]],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[[[2,[-1]],32],32,[33,3]],[[[2,[-1,-2]],[2,[-1,-2]]],34,[35,3],4],[[[5,[-1,-2]],[5,[-1,-2]]],34,35,4],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[-1]],22],6,[36,3]],[[[2,[-1]]],37,[33,3]],0,0,0,[[[5,[-1,-2]]],6,38,4],[[[5,[-1,-2]],-3],6,[],4,20],[[[5,[-1,-2]],-3],6,[],4,20],[[],[[2,[29]]]],[[],[[2,[30]]]],[[],[[2,[26]]]],[[],[[2,[[9,[-1]]]]],[]],[[],[[2,[-1]]],39],[[],[[2,[27]]]],[[],[[5,[-1]]],[]],[[[2,[-1,-2]]],-1,3,4],[[[5,[-1,-2]]],[[9,[-1]]],[],4],[[[2,[-1,-2]]],-1,3,4],[[[5,[-1,-2]]],[[9,[-1]]],[],4],[[[2,[-1]]],30,23],[-1,[[40,[[2,[27]]]]],41],[-1,[[40,[[2,[26]]]]],41],[-1,[[40,[[2,[-2]]]]],41,42],[-1,[[40,[[2,[30]]]]],41],[-1,[[40,[[2,[[9,[-2]]]]]]],41,42],[-1,[[40,[[2,[28]]]]],41],[-1,[[40,[[2,[29]]]]],41],[-1,[[40,[31]]],41],[-1,[[40,[[5,[-2]]]]],41,42],[[[2,[43,-1]]],[[40,[[2,[-2,-1]],[2,[43,-1]]]]],4,43],[[[2,[43,-1]]],[[40,[[2,[-2,-1]],[2,[43,-1]]]]],4,43],[[[2,[43,-1]]],[[40,[[2,[-2,-1]],[2,[43,-1]]]]],4,43],[[[2,[-1]],44],[[24,[6]]],[33,3]],[[[2,[43,-1]]],[[2,[-2,-1]]],4,43],[[[2,[43,-1]]],[[2,[-2,-1]]],4,43],[[[2,[43,-1]]],[[2,[-2,-1]]],4,43],[[[5,[-1,-2]],-3],[[45,[-1,-2]]],[],4,[[46,[22]]]],[[[2,[-1,-2]]],6,3,4],[[[5,[-1,-2]]],6,[],4],[[[2,[-1]],32],6,[33,3]],[[[2,[-1]],47],48,[33,3]],[[[2,[-1]],32],6,[33,3]],[[[2,[-1,-2]],[2,[-1,-2]]],48,[38,3],4],[[[5,[-2,-3]],[5,[-1,-4]]],48,[],[[38,[-1]]],4,4],[[[5,[-2,-3]],[8,[-1]]],48,[],[[38,[-1]]],4],[[[5,[-2,-3]],[9,[-1]]],48,[],[[38,[-1]]],4],[[[5,[-2,-3]],[9,[-1]]],48,[],[[38,[-1]]],4],[[[5,[-2,-3]],[8,[-1]]],48,[],[[38,[-1]]],4],[[[5,[-2,-3]],[9,[-1]]],48,[],[[38,[-1]]],4],[[[2,[-1]],49],6,[33,3]],[[[2,[-1]],49],48,[33,3]],[[[2,[-1]],32],6,[33,3]],[[[5,[-1,-2]],-3],6,50,4,51],[[[5,[-1,-2]],-3],6,[],4,51],[[[5,[-1,-2]],[9,[-1]]],6,25,4],[[[5,[-1,-2]],-3],6,25,4,[[46,[22]]]],[[[5,[-1,-2]],-1],6,50,4],[[[5,[-1,-2]],-1],6,[],4],[[[5,[-1,-2]],22],6,50,4],[[[5,[-1,-2]],22],6,[],4],[[[5,[-1,-2]],-3],[[52,[-1,-3,-2]]],[],4,20],[[[2,[-1]]],[[40,[[9,[53]],54]]],[36,3]],[[[2,[-1]],[9,[53]]],6,[15,3]],[[[2,[-1,-2]]],55,[56,3],4],[[[2,[-1]]],[[40,[6,54]]],[57,3]],[[[5,[53,-1]]],[[40,[6,54]]],4],[[[2,[-1,-2]],58],[[40,[6,59]]],[60,3],4],[[[2,[-1,-2]],58],[[40,[6,59]]],[61,3],4],[[[2,[-1,-2]],58],[[40,[6,59]]],3,4],[[31,58],62],[[[5,[-1,-2]],58],[[40,[6,59]]],60,4],[[[63,[30]]],[[2,[30]]]],[[[2,[[8,[-1]]]]],[[2,[[64,[-1]]]]],[]],[[[63,[30]]],[[2,[23]]]],[[[8,[-1]]],[[2,[[9,[-1]]]]],[]],[[[63,[29]]],[[2,[29]]]],[[[2,[30,-1]]],[[2,[[9,[53]],-1]]],4],[[[2,[[7,[-1]]]]],[[2,[8]]],65],[[[2,[[8,[-1]]]]],[[2,[[66,[-2,-1]]]]],[],[]],[[[2,[26]]],[[2,[30]]]],[[[2,[[67,[-1]]]]],[[2,[[8,[-1]]]]],[]],[[[2,[8]]],[[2,[[7,[-1]]]]],65],[[[2,[[68,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[2,[[69,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[2,[[8,[-1]]]]],[[2,[[70,[-2,-1]]]]],[],[]],[[[2,[[71,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[2,[[72,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[2,[[8,[-1]]]]],[[2,[[71,[-2,-1]]]]],[],[]],[[[2,[[8,[-1]]]]],[[2,[[73,[-2,-1]]]]],[],[]],[[[2,[[8,[-1]]]]],[[2,[[74,[-1]]]]],[]],[[[2,[[75,[-1]]]]],[[2,[[8,[-1]]]]],[]],[[[63,[27]]],[[2,[27]]]],[[[2,[[8,[-1]]]]],[[2,[[72,[-2,-1]]]]],[],[]],[[[2,[[8,[-1]]]]],[[2,[[67,[-1]]]]],[]],[[[2,[[76,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[2,[[8,[-1]]]]],[[2,[[77,[-2,[8,[-1]]]]]]],[],[]],[[[2,[[78,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[79,[[2,[29]]]],[27,[[2,[27]]]],[[[2,[[8,[-1]]]]],[[2,[[69,[-2,-1]]]]],[],[]],[30,[[2,[30]]]],[80,[[2,[30]]]],[81,[[2,[28]]]],[-1,[[2,[23]]],[23,82,83]],[30,[[2,[23]]]],[[[2,[[8,[-1]]]]],[[2,[[78,[-2,-1]]]]],[],[]],[[[9,[-1]]],[[2,[[9,[-1]]]]],25],[[[2,[[8,[-1]]]]],[[2,[[75,[-1]]]]],[]],[[[2,[[74,[-1]]]]],[[2,[[8,[-1]]]]],[]],[84,[[2,[27]]]],[-1,[[2,[-1]]],[]],[28,[[2,[28]]]],[[[5,[-1,-2]]],[[2,[[9,[-1]],-2]]],[],4],[[[2,[[64,[-1]]]]],[[2,[[8,[-1]]]]],[]],[[[2,[[8,[-1]]]]],[[2,[[76,[-2,-1]]]]],[],[]],[[[2,[[8,[-1]]]]],[[2,[[85,[-2,-1]]]]],[],[]],[[[2,[[86,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[63,[28]]],[[2,[28]]]],[80,[[2,[23]]]],[30,[[2,[23]]]],[[[2,[[8,[-1]]]]],[[2,[[87,[-2,-1]]]]],[],[]],[[[2,[[8,[-1]]]]],[[2,[[88,[-2,-1]]]]],[],[]],[29,[[2,[29]]]],[[[63,[[9,[-1]]]]],[[2,[[9,[-1]]]]],25],[[[63,[30]]],[[2,[23]]]],[80,[[2,[23]]]],[-1,[[2,[23]]],23],[-1,-1,[]],[[[2,[[77,[-1,[8,[-2]]]]]]],[[2,[[8,[-2]]]]],[],[]],[89,-1,[]],[[[2,[[8,[-1]]]]],[[2,[[90,[-1]]]]],[]],[[[2,[[87,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[2,[[8,[-1]]]]],[[2,[[86,[-2,-1]]]]],[],[]],[[[2,[[66,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[2,[[90,[-1]]]]],[[2,[[8,[-1]]]]],[]],[[[2,[[88,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[2,[[8,[-1]]]]],[[2,[[68,[-2,-1]]]]],[],[]],[[[2,[[85,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[2,[[73,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[[[2,[[70,[-1,-2]]]]],[[2,[[8,[-2]]]]],[],[]],[-1,-1,[]],[[[8,[-1]]],[[5,[-1]]],25],[91,[[5,[92]]]],[80,[[5,[53]]]],[[[9,[-1]]],[[5,[-1]]],25],[[[93,[-1,-2]]],[[5,[-1,-2]]],[],4],[79,[[5,[53]]]],[-1,-1,[]],[[[63,[[9,[-1]]]]],[[5,[-1]]],[]],[[[2,[[9,[-1]],-2]]],[[5,[-1,-2]]],[],4],[30,[[5,[53]]]],[[[9,[-1]]],[[5,[-1]]],25],[[[8,[-1]]],[[5,[-1]]],[]],[[[94,[-1,-2,-3]]],[[5,[-1]]],[],95,95],[[[8,[-1]]],[[5,[-1]]],25],[[[96,[-1,-2]]],[[5,[-1,-2]]],[],4],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[[2,[[9,[[8,[-1]]]]]]],[[2,[[9,[-2]]]]],[],10],[[[5,[[8,[-1]]]]],[[5,[-2]]],[],10],[[[2,[[9,[-1]]]]],[[2,[[9,[-2]]]]],10,[10,[97,[-1]]]],[[[5,[-1]]],[[5,[-2]]],10,[10,[97,[-1]]]],[[[2,[[9,[-1]]]]],[[2,[[9,[-2]]]]],10,[10,[98,[-1]]]],[[[5,[-1]]],[[5,[-2]]],10,[10,[98,[-1]]]],[-1,[[2,[[9,[-2]]]]],51,[]],[-1,[[5,[-2]]],51,[]],[[],[[2,[-1]]],3],[-1,[[2,[-2,-1]]],4,3],[[22,22],[[5,[-1]]],[]],[[22,22,-1],[[5,[-2,-1]]],4,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[9]]],[[2,[[9,[-1]]]]],16],[5,[[5,[-1]]],16],[[[2,[-1,-2]],[2,[-1,-2]]],48,[99,3],4],[[[2,[-1,-2]],[2,[-1,-2]]],48,[99,3],4],[[[2,[-1,-2]],-3],6,[100,3],4,56],[[[5,[-1,-2]],-3],6,100,4,56],0,0,[[[5,[-1,-2]],-3],[],[],4,[[101,[[9,[-1]]]]]],[[[5,[-1,-2]],-3],[],[],4,[[101,[[9,[-1]]]]]],[[[5,[-1,-2]],22,-1],6,[],4],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[[9,[-1]]]]],[[2,[[9,[[8,[-2]]]]]]],10,[]],[[[2,[[9,[-1]]]]],[[9,[[8,[-2]]]]],10,[]],[[[2,[[9,[-1]]]]],[[9,[[8,[-2]]]]],10,[]],[[[5,[-1]]],[[5,[[8,[-2]]]]],10,[]],[[[5,[-1]]],[[9,[[8,[-2]]]]],10,[]],[[[5,[-1]]],[[9,[[8,[-2]]]]],10,[]],[[[2,[-1,-2]]],[[2,[[9,[-1]],-2]]],[],4],[[[5,[-1,-2]]],[[2,[[9,[-1]],-2]]],[],4],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[[9,[-1]]]]],[[9,[-2]]],10,[]],[[[2,[[9,[-1]]]]],[[2,[[9,[-2]]]]],10,[]],[[[2,[[9,[-1]]]]],[[9,[-2]]],10,[]],[[[5,[-1]]],[[9,[-2]]],10,[]],[[[5,[-1]]],[[9,[-2]]],10,[]],[[[5,[-1]]],[[5,[-2]]],10,[]],[[[5,[-2]]],[],102,[[103,[-1]]]],[[[5,[[8,[-1]],-2]]],[[5,[-1,-2]]],[],4],[-1,[],[]],[[[2,[-1,-2]]],-1,[],4],[-1,-2,[],[]],[[[5,[-1,-2]]],[],[],4],[[[5,[-1,-2]]],[],[],4],[[[5,[-1,-2]]],[],[],4],[[[2,[-1,-2]]],[[104,[[2,[-1,-2]]]]],3,4],[[[2,[-1,-2]]],[],3,4],[[[5,[-1,-2]]],[[6,[22,22]]],[],4],[[[5,[-1,-2]]],[[6,[22,22,-2]]],[],4],[[[2,[-1,-2]]],[[6,[-2]]],3,4],[[-1,30],[[105,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[[9,[-1]]]]],[[2,[9]]],16],[[[2,[[9,[-1]]]]],9,16],[[[2,[[9,[-1]]]]],9,16],[[[5,[-1]]],9,16],[[[5,[-1]]],9,16],[[[5,[-1]]],5,16],[[-1,30],48,[]],[[[2,[-1,-2]]],48,[106,3],4],[[[5,[-1,-2]]],48,[],4],[-1,48,[]],[-1,48,[]],[-1,48,[]],[[-1,30],48,[]],[[[2,[-1]]],48,[107,3]],[[-1,30],48,[]],[[[2,[-1]]],48,[57,3]],[[[5,[53,-1]]],48,4],[[[2,[-1,-2]]],24,[108,3],4],[[[2,[-1,-2]],[2,[-1,-2]]],48,[99,3],4],[[[2,[-1,-2]]],-1,3,4],[[[5,[-1,-2]]],[[9,[-1]]],[],4],[[[2,[-1,-2]]],22,[106,3],4],[[[5,[-1,-2]]],22,[],4],[[[2,[-1,-2]],[2,[-1,-2]]],48,[99,3],4],0,0,[[[2,[-1]]],[[24,[109]]],[33,3]],[[[2,[-1,-2]],[2,[-1,-2]]],48,[38,3],4],[[[5,[-2,-3]],[9,[-1]]],48,[],[[38,[-1]]],4],[[[5,[-2,-3]],[8,[-1]]],48,[],[[38,[-1]]],4],[[[5,[-2,-3]],[9,[-1]]],48,[],[[38,[-1]]],4],[[[5,[-2,-3]],[5,[-1,-4]]],48,[],[[38,[-1]]],4,4],[[[5,[-2,-3]],[9,[-1]]],48,[],[[38,[-1]]],4],[[[5,[-2,-3]],[8,[-1]]],48,[],[[38,[-1]]],4],[-1,[[2,[-1]]],[]],[[],[[5,[-1]]],[]],[[-1,-2],[[2,[-1,-2]]],[],[4,4]],[-1,[[5,[-2,-1]]],4,[]],[[[2,[-1]],110],32,[33,3]],[[],[[2,[[17,[-1]]]]],[]],[-1,[[2,[[17,[-2]],-1]]],[4,4],[]],[22,[[2,[[9,[[17,[-1]]]]]]],[]],[[22,-1],[[2,[[9,[[17,[-2]]]],-1]]],4,[]],[[],[[2,[[17,[-1]]]]],[]],[-1,[[2,[[17,[-2]],-1]]],[4,4],[]],[22,[[2,[[9,[[17,[-1]]]]]]],[]],[[22,-1],[[2,[[9,[[17,[-2]]]],-1]]],4,[]],[[[2,[-1,-2]]],24,[108,3],4],[[[2,[-1,-2]]],24,[111,3],4],[[[2,[-1]]],112,[15,3]],[[[2,[-1]]],55,[15,3]],0,0,[[[2,[-1,-2]],22],24,[108,3],4],[[[2,[-1,-2]],22],24,[111,3],4],0,0,[[[2,[-1,-2]],[2,[-1,-2]]],[[24,[34]]],[99,3],4],[[[5,[-1,-2]],[5,[-1,-3]]],[[24,[34]]],99,4,4],0,[-1,[[104,[[2,[-1]]]]],[]],[[-1,-2],[[104,[[2,[-1,-2]]]]],[],[4,4]],[[[104,[[2,[-1,-2]]]],113],114,[115,116,3],4],[[[104,[[2,[-1]]]],113],[[114,[24]]],[117,116,3]],[[[5,[-1,-2]]],[[24,[-1]]],[],4],[[[2,[-1]],118],6,23],[[[5,[-1,-2]],-1],6,[],4],[[[5,[-1,-2]],-1],[[40,[6,-1]]],[],4],0,0,0,[[[2,[-1]],[9,[53]]],[[40,[22,54]]],[107,3]],[[[2,[-1]],119],[[40,[6,54]]],[107,3]],[[[2,[-1]],[9,[53]]],[[40,[6,54]]],[107,3]],[[[2,[-1]],80],[[40,[22,54]]],[36,3]],[[[2,[-1]],[5,[53]]],[[40,[22,54]]],[107,3]],[[[2,[-1]],80],[[40,[22,54]]],[107,3]],[[[2,[-1]],53,[5,[53]]],[[40,[22,54]]],[36,3]],[[[2,[-1]],[9,[120]]],[[40,[22,54]]],[107,3]],[[[2,[-1]],32,121],6,[33,3]],[[[2,[-1]],122,123],6,[124,3]],[[-1,122,60],6,[]],[[[2,[-1]],32,32],6,[33,3]],[[[2,[-1]],47],125,[33,3]],[[[5,[-1,-2]],22],-1,[],4],[[[5,[-1,-2]],22],6,[],4],[[[5,[-1,-2]],22],6,[],4],[[[5,[-1,-2]],22,-1],6,25,4],[[[5,[-1,-2]],22,-3],6,[],4,20],[[[104,[[2,[-2,-3]]]],-1],126,[],[[127,[-1]],116,3],4],[[[5,[-1,-2]],-3],6,[],4,20],[[[5,[-1,-2]],-3],6,[],4,20],0,0,[[[2,[-1]],128],[[40,[55,54]]],[129,3]],[[[2,[-1]],-2],40,[130,3],131],[[31,-1],40,131],[[[5,[-1]],-2],40,130,131],[[[5,[-1,-2]],22],6,[],4],[[[5,[-1,-2]],22],6,[],4],[[[5,[-1,-2]]],6,[],4],[[[2,[-1]]],[[6,[22,[24,[22]]]]],[117,116,3]],[[[2,[-1,-2]]],[[6,[22,[24,[22]]]]],[108,3],4],[[[2,[-1]]],[[24,[23]]],23],[[[5,[-1,-2]]],[[9,[[17,[-1]]]]],[],4],0,[[[5,[-1,-2]],-3,-4],[[132,[-2]]],[],4,[[46,[22]]],51],[[[5,[-1,-2]]],[[6,[[9,[-1]],[9,[[17,[-1]]]]]]],[],4],[[[5,[-1,-2]],22],[[5,[-1,-2]]],[],[25,4]],[[[2,[-1]]],[[40,[55,54]]],[129,3]],[[-1,30],[[24,[30]]],[]],[[-1,30],[[24,[30]]],[]],[[[5,[-1,-2]],22],-1,[],4],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,80,[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[5,[-1,-2]],22],6,[],4],[[[2,[-1]],32],48,[33,3]],[[[2,[[9,[-1]]]]],[[40,[[9,[-2]]]]],[],10],[[[5,[-1]]],[[40,[[9,[-2]]]]],[],10],[[[2,[[9,[-1]]]]],[[40,[[9,[-2]]]]],[],10],[[[5,[-1]]],[[40,[[9,[-2]]]]],[],10],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[[[2,[-1]],[9,[53]]],[[40,[6,133]]],[15,3]],[-1,[[40,[-2]]],[],[]],[[[5,[-1]]],[[40,[[2,[[8,[-1]]]]]]],[]],[[[2,[[9,[-1]]]]],[[40,[[2,[[8,[-1]]]]]]],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[[[2,[[9,[-1]]]]],[[40,[[2,[[9,[-2]]]]]]],[],10],[[[5,[-1]]],[[40,[[5,[-2]]]]],[],10],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[[2,[-1]],135]]],[]],[[-1,-2],[[40,[[2,[-1,-2]],135]]],[],[4,4]],[[],[[40,[[2,[[17,[-1]]]],135]]],[]],[-1,[[40,[[2,[[17,[-2]],-1]],135]]],[4,4],[]],[22,[[40,[[2,[[9,[[17,[-1]]]]]],135]]],[]],[[],[[40,[[2,[[17,[-1]]]],135]]],[]],[-1,[[40,[[2,[[17,[-2]],-1]],135]]],[4,4],[]],[22,[[40,[[2,[[9,[[17,[-1]]]]]],135]]],[]],[[[5,[-1,-2]],22],[[40,[6,136]]],[],4],[[[5,[-1,-2]],22],[[40,[6,136]]],[],4],[-1,44,[]],[-1,44,[]],[-1,44,[]],[[[2,[9]]],[[9,[-1]]],16],[5,[[9,[-1]]],16],[[[2,[9]]],[[9,[-1]]],16],[5,[[9,[-1]]],16],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[26]],137,-1,-2],6,19,20],[[[5,[-1]],137,-2,-3],6,138,19,20],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[22,[[5,[-1]]],[]],[[22,-1],[[5,[-2,-1]]],4,[]],[[[2,[-1]],[9,[53]]],[[40,[22,54]]],[57,3]],[[[2,[-1,-2]],[9,[53]]],6,[56,3],4],[[[2,[[17,[-1]],-2]],-1],[[2,[-1,-2]]],[],4],[[[5,[53,-1]],[9,[53]]],[[40,[22,54]]],4],[[[2,[-1]],[9,[53]]],[[40,[6,54]]],[57,3]],[[[5,[53,-1]],[9,[53]]],[[40,[6,54]]],4],[[[2,[-1]],139],[[40,[6,54]]],[57,3]],[[[2,[-1,-2]],140],6,[56,3],4],[[[2,[-1,-2]],141],6,[56,3],4],[[[2,[-1,-2]],13],6,[56,3],4],[[[2,[-1,-2]],142],6,[56,3],4],[[[2,[-1,-2]],143],6,[56,3],4],[[[2,[-1,-2]],144],6,[56,3],4],[[[2,[-1,-2]],22],6,[56,3],4],[[[2,[-1,-2]],30],6,[56,3],4],[[[2,[-1,-2]],145],6,[56,3],4],[[[2,[-1,-2]],146],6,[56,3],4],[[[2,[-1,-2]],112],6,[56,3],4],[[[2,[-1,-2]],55],6,[56,3],4],[[[2,[-1,-2]],53],6,[56,3],4],[[[2,[-1,-2]],22],6,[56,3],4],[[[2,[-1]],[9,[147]]],[[40,[22,54]]],[57,3]],[[[5,[53,-1]],[9,[147]]],[[40,[22,54]]],4],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[148,149]],[-1,-2,[],[]],[-1,-2,[],[]],[[148,22],150],[-1,-2,[],[]],[-1,-2,[],[]],[148,148],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,[[40,[148]]],41],[[148,148],48],[[148,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[[148,151,152,152],48],[[148,151,152,152],48],[[148,151,152,152],48],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[[150,150,150],148],[[149,149],148],[148,6],[[148,-1],40,131],[[148,148],148],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[153,153],[[-1,-2],6,[],[]],[-1,-2,[],[]],[153,22],[[153,58],62],[-1,-1,[]],[-1,-1,[]],[[[5,[92]],152,152],153],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],0,0,[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[154,154],[155,155],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[154]]],41],[-1,[[40,[155]]],41],[[154,58],62],[[155,58],62],0,[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[154,152,152,156],151],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],0,0,0,0,[[149,149,149,152,152,152,152,152,152],154],0,[[154,-1],40,131],[[155,-1],40,131],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],0,[[151,157,112,112,156],[[66,[158]]]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[92,92],[159,159],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[160,58],62],[[92,58],62],[[159,58],62],[-1,-1,[]],[153,92],[161,92],[162,92],[163,92],[164,92],[165,92],[166,92],[167,92],[168,92],[159,92],[169,92],[170,92],[-1,-1,[]],[171,92],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[151,149],[[6,[48,149]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],0,0,0,[[160,151,149],6],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[92,[[40,[162]]]],[92,[[40,[153]]]],[92,[[40,[166]]]],[92,[[40,[171]]]],[92,[[40,[165]]]],[92,[[40,[170]]]],[92,[[40,[164]]]],[92,[[40,[167]]]],[92,[[40,[169]]]],[92,[[40,[161]]]],[-1,[[40,[-2]]],[],[]],[92,[[40,[159]]]],[92,[[40,[168]]]],[92,[[40,[163]]]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[150,152]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[150,150],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,[[40,[150]]],41],[[150,150],48],[[150,152],150],[[150,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],0,0,[[152,152],150],[[150,150],150],[[150,-1],40,131],[150,152],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[172,172],[173,173],[174,174],[175,175],[176,176],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[],172],[[],173],[[],174],[-1,[[40,[172]]],41],[-1,[[40,[173]]],41],[-1,[[40,[174]]],41],0,0,0,[[-1,151,160,152,152,149],177,[]],[[174,151,160,152,152,149],177],[[172,58],62],[[173,58],62],[[174,58],62],[[175,58],62],[[176,58],62],[-1,-1,[]],[-1,-1,[]],[178,174],[179,174],[-1,-1,[]],[180,174],[181,174],[182,174],[183,174],[184,174],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],0,0,0,0,0,0,0,[[-1,151,160,156],[[24,[176]]],[]],[[174,151,160,156],[[24,[176]]]],[[-1,160,151,156],[[24,[152]]],[]],[[174,160,151,156],[[24,[152]]]],[[172,-1],40,131],[[173,-1],40,131],[[174,-1],40,131],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[174,[[40,[181]]]],[174,[[40,[183]]]],[174,[[40,[182]]]],[174,[[40,[184]]]],[174,[[40,[179]]]],[174,[[40,[178]]]],[174,[[40,[180]]]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[183,183],[[-1,-2],6,[],[]],[-1,-2,[],[]],[[],183],[-1,[[40,[183]]],41],[[183,151,160,152,152,149],177],[[183,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[[152,185],183],[[183,151,160,156],[[24,[176]]]],[[183,160,151,156],[[24,[152]]]],[[183,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[179,179],[[-1,-2],6,[],[]],0,[-1,-2,[],[]],[[],179],[-1,[[40,[179]]],41],[[179,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[[152,186],179],0,[[179,151,160,156],[[24,[176]]]],[[179,160,151,156],[[24,[152]]]],[[179,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[184,184],[[-1,-2],6,[],[]],[-1,-2,[],[]],[[],184],[-1,[[40,[184]]],41],[[184,151,160,152,152,149],177],[[184,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[185,184],[[184,151,160,156],[[24,[176]]]],[[184,160,151,156],[[24,[152]]]],[[184,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[181,181],[[-1,-2],6,[],[]],[-1,-2,[],[]],[[],181],[-1,[[40,[181]]],41],[[181,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[[152,152],181],[[181,187],152],[[181,151,160,156],[[24,[176]]]],[[181,160,151,156],[[24,[152]]]],[[181,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[188,188],[[-1,-2],6,[],[]],[-1,-2,[],[]],[[],188],[[188,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[[189,[8,[[8,[152]]]],[24,[[8,[[8,[152]]]]]],[24,[[8,[[8,[152]]]]]],[9,[190]]],188],[[188,151,160,156],[[24,[176]]]],[[188,160,151,156],[[24,[152]]]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[178,178],[[-1,-2],6,[],[]],[-1,-2,[],[]],[[],178],[-1,[[40,[178]]],41],[[178,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[185,178],[[178,151,160,156],[[24,[176]]]],[[178,160,151,156],[[24,[152]]]],[[178,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[182,182],[[-1,-2],6,[],[]],[-1,-2,[],[]],[[],182],[-1,[[40,[182]]],41],[[182,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,182,[[191,[185]]]],[[182,151,160,156],[[24,[176]]]],[[182,160,151,156],[[24,[152]]]],[[182,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[180,180],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,[[40,[180]]],41],[[180,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[[185,152],180],[[180,151,160,156],[[24,[176]]]],[[180,160,151,156],[[24,[152]]]],[[180,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[151,157,156],177],[149,177],0,0,0,0,0,0,0,0,0,0,0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[192,192],[193,193],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,[[40,[192]]],41],[-1,[[40,[193]]],41],[[192,58],62],[[193,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],0,[[193,[9,[173]]],92],0,0,0,0,[[192,-1],40,131],[[193,-1],40,131],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[194,194],[169,169],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[-1,[[40,[194]]],41],[[194,58],62],[[169,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],0,0,[[149,149,174],169],0,[[194,-1],40,131],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[195,195],[165,165],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,[[40,[195]]],41],[[195,58],62],[[165,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],[[[2,[92]],152,185],165],0,[[195,-1],40,131],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[91,91],[166,166],[170,170],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[91]]],41],[[91,58],62],[[166,58],62],[[170,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],0,[[91,152,152],166],[[[8,[149]],188],170],0,0,[[91,-1],40,131],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[167,152],149],0,0,0,0,[196,196],[167,167],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[196]]],41],[[196,58],62],[[167,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[167,149,152],[[6,[152,152]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],0,0,[[149,149,152,152,152,174],167],0,0,0,[[196,-1],40,131],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[197,197],[164,164],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,[[40,[197]]],41],[[197,58],62],[[164,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],0,0,[[149,149,149,174],164],0,0,0,0,[[197,-1],40,131],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[198,198],[168,168],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[198]]],41],[[198,58],62],[[168,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],[[[2,[92]],152],168],0,0,[[198,-1],40,131],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[199,199],[171,171],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[199]]],41],[[199,58],62],[[171,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[171,149,152],[[6,[152,152]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],0,[[149,152,174],171],0,0,[[199,-1],40,131],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[163,163],[200,200],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[200]]],41],[[163,58],62],[[200,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[200,[9,[173]]],163],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],0,0,0,0,0,0,[[200,-1],40,131],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[201,201],[162,162],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[201]]],41],[[201,58],62],[[162,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],[[[2,[92]],149],162],0,0,0,[[201,-1],40,131],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[202,202],[161,161],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,[[40,[202]]],41],[[202,58],62],[[161,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[149,149,149,174],161],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],0,0,[[149,149,149,174],161],0,0,0,0,[[202,-1],40,131],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[149,203],[203,203],[[-1,-2],6,[],[]],[-1,-2,[],[]],[[203,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[[203,149],149],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[204,204],[205,205],[206,206],[207,207],[208,208],[209,209],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[],208],[[],209],[[204,58],62],[[205,58],62],[[206,58],62],[[207,58],62],[[208,58],62],[[209,58],62],[206,204],[207,204],[205,204],[209,204],[-1,-1,[]],[208,204],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],[149,205],[[92,149],206],[[204,204],207],[[],208],[[],209],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[204,[[40,[207]]]],[204,[[40,[209]]]],[204,[[40,[205]]]],[-1,[[40,[-2]]],[],[]],[204,[[40,[208]]]],[204,[[40,[206]]]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[156,149],[156,149],[[149,156],149],[156,149],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[151,151],[[-1,-2],6,[],[]],[-1,-2,[],[]],0,[[151,151],48],[[151,152],149],[[151,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],0,0,[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[210,210],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[210]]],41],[[157,58],62],[[210,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[210,112,112],157],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],[[152,152,154,[5,[92]],[5,[92]],186],157],0,[[210,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[[187,[66,[158]]],152],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],0,[[211,58],62],[[212,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],0,0,[[[8,[213]],[8,[213]],[8,[213]]],6],0,0,0,0,0,0,0,0,0,0,0,0,0,[[[8,[213]],[8,[213]]],6],[[[8,[213]],[8,[213]]],6],[[[8,[213]],[8,[213]]],6],[[[8,[213]],[8,[213]]],6],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],0,[[[8,[213]],[8,[213]]],6],0,0,0,0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[185,185],[[-1,-2],6,[],[]],[-1,-2,[],[]],[[],185],[-1,[[40,[185]]],41],[[185,58],62],[-1,-1,[]],[214,185],[215,185],[216,185],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[[185,-1],40,131],0,0,0,[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[185,[[40,[214]]]],[-1,[[40,[-2]]],[],[]],[185,[[40,[215]]]],[185,[[40,[216]]]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[215,215],[[-1,-2],6,[],[]],0,[-1,-2,[],[]],[[],215],[-1,[[40,[215]]],41],[[215,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[186,215],[[215,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[216,216],[[-1,-2],6,[],[]],[-1,-2,[],[]],0,[-1,[[40,[216]]],41],0,[[216,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[[186,186,152],216],0,[[216,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[214,214],[[-1,-2],6,[],[]],[-1,-2,[],[]],[-1,[[40,[214]]],41],[[214,58],62],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[[186,186,152],214],[[214,-1],40,131],[-1,-2,[],[]],[-1,[[24,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2]]],[],[]],[-1,[[40,[-2,[134,[-2]]]]],[],[]],[-1,44,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,[156,187],[187,[[8,[187]]]],[187,[[66,[158]]]]],"c":[549,550],"p":[[8,"TransformMatrix",2838],[3,"Box",0],[8,"Sized",2839],[8,"Allocator",2840],[3,"Vec",0],[15,"tuple"],[3,"PreAlpha",2841],[15,"array"],[15,"slice"],[8,"ArrayCast",2842],[3,"BorrowedFd",2843],[8,"AsFd",2843],[15,"i32"],[8,"AsRawFd",2844],[8,"RngCore",2845],[8,"UintCast",2846],[19,"MaybeUninit",2847],[8,"Tuple",2839],[8,"Fn",2848],[8,"FnMut",2848],[8,"FnOnce",2848],[15,"usize"],[8,"Error",2849],[4,"Option",2850],[8,"Clone",2851],[3,"RawValue",2852],[3,"OsStr",2853],[3,"Path",2854],[3,"CStr",2855],[15,"str"],[3,"RenderOpts",0],[3,"Id",2856],[8,"Subscriber",2857],[4,"Ordering",2858],[8,"Ord",2858],[8,"BufRead",2859],[3,"Current",2856],[8,"PartialEq",2858],[8,"Default",2860],[4,"Result",2861],[8,"Deserializer",2862],[8,"Deserialize",2862],[8,"Any",2863],[3,"TypeId",2863],[3,"Drain",2864],[8,"RangeBounds",2865],[3,"Metadata",2866],[15,"bool"],[3,"Event",2867],[8,"Copy",2839],[8,"IntoIterator",2868],[3,"ExtractIf",2869],[15,"u8"],[3,"Error",2870],[15,"u64"],[8,"Hasher",2871],[8,"Write",2859],[3,"Formatter",2872],[3,"Error",2872],[8,"Debug",2872],[8,"Display",2872],[6,"Result",2872],[4,"Cow",2873],[3,"Oklab",2874],[8,"Premultiply",2875],[3,"Xyz",2876],[3,"Oklch",2877],[3,"Rgb",2878],[3,"Hsl",2879],[3,"Luv",2880],[3,"Hsv",2881],[3,"Luma",2882],[3,"Lch",2883],[3,"Okhsl",2884],[3,"Okhsv",2885],[3,"Hwb",2886],[3,"Packed",2887],[3,"Hsluv",2888],[3,"CString",2889],[3,"String",2890],[3,"PathBuf",2854],[8,"Send",2839],[8,"Sync",2839],[3,"OsString",2853],[3,"Lchuv",2891],[3,"Alpha",2892],[3,"Yxy",2893],[3,"Lab",2894],[15,"never"],[3,"Okhwb",2895],[3,"GLTFInit",1618],[4,"Hitable",697],[3,"BinaryHeap",2896],[3,"VecStorage",2897],[8,"Dim",2898],[3,"VecDeque",2899],[8,"FromColor",2900],[8,"FromColorUnclamped",2901],[8,"PartialOrd",2858],[8,"Hash",2871],[8,"SliceIndex",2902],[8,"Error",2862],[8,"IntoDeserializer",2862],[3,"Pin",2903],[3,"CharPredicateSearcher",2904],[8,"ExactSizeIterator",2905],[8,"Read",2859],[8,"Iterator",2906],[3,"LevelFilter",2866],[3,"Attributes",2856],[8,"DoubleEndedIterator",2907],[15,"u32"],[3,"Context",2908],[4,"Poll",2909],[8,"Future",2910],[8,"Unpin",2839],[8,"AsyncIterator",2911],[3,"Request",2849],[3,"BorrowedCursor",2912],[3,"IoSliceMut",2859],[3,"Record",2856],[3,"Field",2913],[8,"Visit",2913],[8,"Value",2913],[3,"Interest",2857],[4,"CoroutineState",2914],[8,"Coroutine",2914],[4,"SeekFrom",2859],[8,"Seek",2859],[8,"Serialize",2915],[8,"Serializer",2915],[3,"Splice",2916],[3,"Error",2917],[3,"OutOfBounds",2918],[3,"AllocError",2840],[3,"TryReserveError",2919],[3,"Root",2920],[8,"Validate",2921],[3,"Arguments",2872],[15,"i128"],[15,"i16"],[15,"i64"],[15,"i8"],[15,"isize"],[15,"u128"],[15,"u16"],[3,"IoSlice",2859],[3,"AABB",530],[6,"Vec3",0],[3,"Interval",835],[3,"Ray",2487],[6,"Float",0],[3,"BVHNode",576],[3,"Camera",612],[3,"CameraInit",612],[3,"SmallRng",2922],[3,"Scene",2524],[3,"E",2923],[3,"Empty",697],[3,"HitRecord",697],[3,"Triangle",2159],[3,"Translate",2091],[3,"STL",2017],[3,"Quad",1800],[3,"ConstantMedium",1549],[3,"GLTF",1618],[3,"MovingSphere",1721],[3,"RotateY",1879],[3,"Boxy",1478],[3,"GLTFTriangle",1618],[3,"Sphere",1947],[4,"MaterialInit",876],[3,"SharedMaterial",876],[4,"Material",876],[4,"MaterialType",876],[3,"ScatterRecord",876],[6,"LinSrgb",2924],[3,"Isotropic",1276],[3,"Dielectric",1124],[3,"Metal",1350],[3,"Dispersive",1201],[3,"Lambertian",1313],[3,"ConeLight",1086],[3,"DiffuseLight",1163],[4,"Texture",2675],[6,"Srgb",2924],[6,"Wavelength",2828],[3,"GLTFMaterial",1241],[3,"Material",2925],[3,"Data",2926],[8,"Into",2927],[3,"ObjectList",1388],[4,"Object",1388],[3,"BoxyInit",1478],[3,"ConstantMediumInit",1549],[3,"MovingSphereInit",1721],[3,"QuadInit",1800],[3,"RotateInit",1879],[3,"SphereInit",1947],[3,"STLInit",2017],[3,"TranslateInit",2091],[3,"TriangleInit",2159],[3,"ONB",2239],[4,"PDF",2275],[3,"CosinePDF",2275],[3,"HitablePDF",2275],[3,"MixturePDF",2275],[3,"SpherePDF",2275],[3,"ZeroPDF",2275],[3,"SceneFile",2524],[3,"spectrum_grid_cell_t",2594],[3,"spectrum_data_point_t",2594],[15,"f64"],[3,"SurfaceChecker",2794],[3,"SolidColor",2721],[3,"SpatialChecker",2757],[6,"Vec2",0],[6,"Vec4",0],[8,"MaterialTrait",876]],"b":[[39,"impl-AsMut%3C%5BT%5D%3E-for-Vec%3CT,+A%3E"],[40,"impl-AsMut%3CVec%3CT,+A%3E%3E-for-Vec%3CT,+A%3E"],[46,"impl-AsRef%3CVec%3CT,+A%3E%3E-for-Vec%3CT,+A%3E"],[47,"impl-AsRef%3C%5BT%5D%3E-for-Vec%3CT,+A%3E"],[54,"impl-Box%3C%5BMaybeUninit%3CT%3E%5D,+A%3E"],[55,"impl-Box%3CMaybeUninit%3CT%3E,+A%3E"],[74,"impl-Clone-for-Box%3C%5BT%5D,+A%3E"],[75,"impl-Clone-for-Box%3CRawValue%3E"],[76,"impl-Clone-for-Box%3COsStr%3E"],[77,"impl-Clone-for-Box%3CPath%3E"],[78,"impl-Clone-for-Box%3CT,+A%3E"],[79,"impl-Clone-for-Box%3CCStr%3E"],[80,"impl-Clone-for-Box%3Cstr%3E"],[83,"impl-Clone-for-Box%3CT,+A%3E"],[84,"impl-Clone-for-Box%3C%5BT%5D,+A%3E"],[104,"impl-Default-for-Box%3CCStr%3E"],[105,"impl-Default-for-Box%3Cstr%3E"],[106,"impl-Default-for-Box%3CRawValue%3E"],[107,"impl-Default-for-Box%3C%5BT%5D%3E"],[108,"impl-Default-for-Box%3CT%3E"],[109,"impl-Default-for-Box%3COsStr%3E"],[116,"impl-Deserialize%3C\'de%3E-for-Box%3COsStr%3E"],[117,"impl-Deserialize%3C\'de%3E-for-Box%3CRawValue%3E"],[118,"impl-Deserialize%3C\'de%3E-for-Box%3CT%3E"],[119,"impl-Deserialize%3C\'de%3E-for-Box%3Cstr%3E"],[120,"impl-Deserialize%3C\'de%3E-for-Box%3C%5BT%5D%3E"],[121,"impl-Deserialize%3C\'de%3E-for-Box%3CPath%3E"],[122,"impl-Deserialize%3C\'de%3E-for-Box%3CCStr%3E"],[125,"impl-Box%3Cdyn+Any+%2B+Send,+A%3E"],[126,"impl-Box%3Cdyn+Any,+A%3E"],[127,"impl-Box%3Cdyn+Any+%2B+Send+%2B+Sync,+A%3E"],[129,"impl-Box%3Cdyn+Any,+A%3E"],[130,"impl-Box%3Cdyn+Any+%2B+Send,+A%3E"],[131,"impl-Box%3Cdyn+Any+%2B+Send+%2B+Sync,+A%3E"],[139,"impl-PartialEq%3CVec%3CU,+A2%3E%3E-for-Vec%3CT,+A1%3E"],[140,"impl-PartialEq%3C%26%5BU;+N%5D%3E-for-Vec%3CT,+A%3E"],[141,"impl-PartialEq%3C%26%5BU%5D%3E-for-Vec%3CT,+A%3E"],[142,"impl-PartialEq%3C%26mut+%5BU%5D%3E-for-Vec%3CT,+A%3E"],[143,"impl-PartialEq%3C%5BU;+N%5D%3E-for-Vec%3CT,+A%3E"],[144,"impl-PartialEq%3C%5BU%5D%3E-for-Vec%3CT,+A%3E"],[148,"impl-Extend%3C%26T%3E-for-Vec%3CT,+A%3E"],[149,"impl-Extend%3CT%3E-for-Vec%3CT,+A%3E"],[152,"impl-Extend%3C%26T%3E-for-Vec%3CT,+A%3E"],[153,"impl-Extend%3CT%3E-for-Vec%3CT,+A%3E"],[154,"impl-Extend%3C%26T%3E-for-Vec%3CT,+A%3E"],[155,"impl-Extend%3CT%3E-for-Vec%3CT,+A%3E"],[162,"impl-Debug-for-Box%3CT,+A%3E"],[163,"impl-Display-for-Box%3CT,+A%3E"],[164,"impl-Pointer-for-Box%3CT,+A%3E"],[167,"impl-From%3CCow%3C\'_,+str%3E%3E-for-Box%3Cstr%3E"],[168,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3COklab%3CT%3E%3E"],[169,"impl-From%3CCow%3C\'b,+str%3E%3E-for-Box%3Cdyn+Error+%2B+Send+%2B+Sync%3E"],[170,"impl-From%3C%5BT;+N%5D%3E-for-Box%3C%5BT%5D%3E"],[171,"impl-From%3CCow%3C\'_,+CStr%3E%3E-for-Box%3CCStr%3E"],[172,"impl-From%3CBox%3Cstr,+A%3E%3E-for-Box%3C%5Bu8%5D,+A%3E"],[173,"impl-From%3CBox%3CPreAlpha%3CC%3E%3E%3E-for-Box%3C%5B%3CC+as+Premultiply%3E::Scalar;+N%5D%3E"],[174,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CXyz%3CWp,+T%3E%3E"],[175,"impl-From%3CBox%3CRawValue%3E%3E-for-Box%3Cstr%3E"],[176,"impl-From%3CBox%3COklch%3CT%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[177,"impl-From%3CBox%3C%5B%3CC+as+Premultiply%3E::Scalar;+N%5D%3E%3E-for-Box%3CPreAlpha%3CC%3E%3E"],[178,"impl-From%3CBox%3CRgb%3CS,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[179,"impl-From%3CBox%3CHsl%3CS,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[180,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CLuv%3CWp,+T%3E%3E"],[181,"impl-From%3CBox%3CHsv%3CS,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[182,"impl-From%3CBox%3CLuma%3CS,+T%3E%3E%3E-for-Box%3C%5BT;+1%5D%3E"],[183,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CHsv%3CS,+T%3E%3E"],[184,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CLch%3CWp,+T%3E%3E"],[185,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3COkhsl%3CT%3E%3E"],[186,"impl-From%3CBox%3COkhsv%3CT%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[187,"impl-From%3CCow%3C\'_,+OsStr%3E%3E-for-Box%3COsStr%3E"],[188,"impl-From%3CBox%3C%5BT;+1%5D%3E%3E-for-Box%3CLuma%3CS,+T%3E%3E"],[189,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3COklch%3CT%3E%3E"],[190,"impl-From%3CBox%3CHwb%3CS,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[191,"impl-From%3CBox%3C%5BT;+N%5D%3E%3E-for-Box%3CPacked%3CO,+%5BT;+N%5D%3E%3E"],[192,"impl-From%3CBox%3CHsluv%3CWp,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[193,"impl-From%3CCString%3E-for-Box%3CCStr%3E"],[194,"impl-From%3C%26OsStr%3E-for-Box%3COsStr%3E"],[195,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CHsl%3CS,+T%3E%3E"],[196,"impl-From%3C%26str%3E-for-Box%3Cstr%3E"],[197,"impl-From%3CString%3E-for-Box%3Cstr%3E"],[198,"impl-From%3CPathBuf%3E-for-Box%3CPath%3E"],[199,"impl-From%3CE%3E-for-Box%3Cdyn+Error+%2B+Send+%2B+Sync%3E"],[200,"impl-From%3C%26str%3E-for-Box%3Cdyn+Error+%2B+Send+%2B+Sync%3E"],[201,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CHsluv%3CWp,+T%3E%3E"],[202,"impl-From%3C%26%5BT%5D%3E-for-Box%3C%5BT%5D%3E"],[203,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3COkhsv%3CT%3E%3E"],[204,"impl-From%3CBox%3COkhsl%3CT%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[205,"impl-From%3COsString%3E-for-Box%3COsStr%3E"],[206,"impl-From%3CT%3E-for-Box%3CT%3E"],[207,"impl-From%3C%26Path%3E-for-Box%3CPath%3E"],[208,"impl-From%3CVec%3CT,+A%3E%3E-for-Box%3C%5BT%5D,+A%3E"],[209,"impl-From%3CBox%3COklab%3CT%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[210,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CHwb%3CS,+T%3E%3E"],[211,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CLchuv%3CWp,+T%3E%3E"],[212,"impl-From%3CBox%3CAlpha%3CC,+T%3E%3E%3E-for-Box%3C%5BT;+N%5D%3E"],[213,"impl-From%3CCow%3C\'_,+Path%3E%3E-for-Box%3CPath%3E"],[214,"impl-From%3CString%3E-for-Box%3Cdyn+Error%3E"],[215,"impl-From%3C%26str%3E-for-Box%3Cdyn+Error%3E"],[216,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CYxy%3CWp,+T%3E%3E"],[217,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CLab%3CWp,+T%3E%3E"],[218,"impl-From%3C%26CStr%3E-for-Box%3CCStr%3E"],[219,"impl-From%3CCow%3C\'_,+%5BT%5D%3E%3E-for-Box%3C%5BT%5D%3E"],[220,"impl-From%3CCow%3C\'a,+str%3E%3E-for-Box%3Cdyn+Error%3E"],[221,"impl-From%3CString%3E-for-Box%3Cdyn+Error+%2B+Send+%2B+Sync%3E"],[222,"impl-From%3CE%3E-for-Box%3Cdyn+Error%3E"],[224,"impl-From%3CBox%3CPacked%3CO,+%5BT;+N%5D%3E%3E%3E-for-Box%3C%5BT;+N%5D%3E"],[226,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3COkhwb%3CT%3E%3E"],[227,"impl-From%3CBox%3CYxy%3CWp,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[228,"impl-From%3CBox%3C%5BT;+N%5D%3E%3E-for-Box%3CAlpha%3CC,+T%3E%3E"],[229,"impl-From%3CBox%3CXyz%3CWp,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[230,"impl-From%3CBox%3COkhwb%3CT%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[231,"impl-From%3CBox%3CLab%3CWp,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[232,"impl-From%3CBox%3C%5BT;+3%5D%3E%3E-for-Box%3CRgb%3CS,+T%3E%3E"],[233,"impl-From%3CBox%3CLchuv%3CWp,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[234,"impl-From%3CBox%3CLch%3CWp,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[235,"impl-From%3CBox%3CLuv%3CWp,+T%3E%3E%3E-for-Box%3C%5BT;+3%5D%3E"],[237,"impl-From%3C%26mut+%5BT;+N%5D%3E-for-Vec%3CT%3E"],[238,"impl-From%3CGLTFInit%3E-for-Vec%3CHitable%3C\'scene%3E%3E"],[239,"impl-From%3CString%3E-for-Vec%3Cu8%3E"],[240,"impl-From%3C%26mut+%5BT%5D%3E-for-Vec%3CT%3E"],[241,"impl-From%3CBinaryHeap%3CT,+A%3E%3E-for-Vec%3CT,+A%3E"],[242,"impl-From%3CCString%3E-for-Vec%3Cu8%3E"],[244,"impl-From%3CCow%3C\'a,+%5BT%5D%3E%3E-for-Vec%3CT%3E"],[245,"impl-From%3CBox%3C%5BT%5D,+A%3E%3E-for-Vec%3CT,+A%3E"],[246,"impl-From%3C%26str%3E-for-Vec%3Cu8%3E"],[247,"impl-From%3C%26%5BT%5D%3E-for-Vec%3CT%3E"],[248,"impl-From%3C%5BT;+N%5D%3E-for-Vec%3CT%3E"],[249,"impl-From%3CVecStorage%3CT,+R,+C%3E%3E-for-Vec%3CT%3E"],[250,"impl-From%3C%26%5BT;+N%5D%3E-for-Vec%3CT%3E"],[251,"impl-From%3CVecDeque%3CT,+A%3E%3E-for-Vec%3CT,+A%3E"],[291,"impl-IntoArrays%3CBox%3C%5B%5BT;+N%5D%5D%3E%3E-for-Box%3C%5BC%5D%3E"],[292,"impl-IntoArrays%3C%26%5B%5BT;+N%5D%5D%3E-for-%26Box%3C%5BC%5D%3E"],[293,"impl-IntoArrays%3C%26mut+%5B%5BT;+N%5D%5D%3E-for-%26mut+Box%3C%5BC%5D%3E"],[294,"impl-IntoArrays%3CVec%3C%5BT;+N%5D%3E%3E-for-Vec%3CC%3E"],[295,"impl-IntoArrays%3C%26mut+%5B%5BT;+N%5D%5D%3E-for-%26mut+Vec%3CC%3E"],[296,"impl-IntoArrays%3C%26%5B%5BT;+N%5D%5D%3E-for-%26Vec%3CC%3E"],[305,"impl-IntoComponents%3C%26%5BT%5D%3E-for-%26Box%3C%5BC%5D%3E"],[306,"impl-IntoComponents%3CBox%3C%5BT%5D%3E%3E-for-Box%3C%5BC%5D%3E"],[307,"impl-IntoComponents%3C%26mut+%5BT%5D%3E-for-%26mut+Box%3C%5BC%5D%3E"],[308,"impl-IntoComponents%3C%26mut+%5BT%5D%3E-for-%26mut+Vec%3CC%3E"],[309,"impl-IntoComponents%3C%26%5BT%5D%3E-for-%26Vec%3CC%3E"],[310,"impl-IntoComponents%3CVec%3CT%3E%3E-for-Vec%3CC%3E"],[316,"impl-IntoIterator-for-Vec%3CT,+A%3E"],[317,"impl-IntoIterator-for-%26mut+Vec%3CT,+A%3E"],[318,"impl-IntoIterator-for-%26Vec%3CT,+A%3E"],[328,"impl-IntoUints%3CBox%3C%5B%3CC+as+UintCast%3E::Uint%5D%3E%3E-for-Box%3C%5BC%5D%3E"],[329,"impl-IntoUints%3C%26mut+%5B%3CC+as+UintCast%3E::Uint%5D%3E-for-%26mut+Box%3C%5BC%5D%3E"],[330,"impl-IntoUints%3C%26%5B%3CC+as+UintCast%3E::Uint%5D%3E-for-%26Box%3C%5BC%5D%3E"],[331,"impl-IntoUints%3C%26mut+%5B%3CC+as+UintCast%3E::Uint%5D%3E-for-%26mut+Vec%3CC%3E"],[332,"impl-IntoUints%3C%26%5B%3CC+as+UintCast%3E::Uint%5D%3E-for-%26Vec%3CC%3E"],[333,"impl-IntoUints%3CVec%3C%3CC+as+UintCast%3E::Uint%3E%3E-for-Vec%3CC%3E"],[356,"impl-PartialEq%3C%5BU%5D%3E-for-Vec%3CT,+A%3E"],[357,"impl-PartialEq%3C%26%5BU;+N%5D%3E-for-Vec%3CT,+A%3E"],[358,"impl-PartialEq%3C%26%5BU%5D%3E-for-Vec%3CT,+A%3E"],[359,"impl-PartialEq%3CVec%3CU,+A2%3E%3E-for-Vec%3CT,+A1%3E"],[360,"impl-PartialEq%3C%26mut+%5BU%5D%3E-for-Vec%3CT,+A%3E"],[361,"impl-PartialEq%3C%5BU;+N%5D%3E-for-Vec%3CT,+A%3E"],[407,"impl-Subscriber-for-Box%3CS%3E"],[408,"impl-Value-for-Box%3CT%3E"],[429,"impl-AsyncIterator-for-Box%3CS%3E"],[430,"impl-Iterator-for-Box%3CI,+A%3E"],[463,"impl-TryFrom%3CVec%3CT%3E%3E-for-Box%3C%5BT;+N%5D%3E"],[464,"impl-TryFrom%3CBox%3C%5BT%5D%3E%3E-for-Box%3C%5BT;+N%5D%3E"],[507,"impl-Write-for-Box%3CW%3E"],[508,"impl-Hasher-for-Box%3CT,+A%3E"],[509,"impl-Box%3CMaybeUninit%3CT%3E,+A%3E"],[740,"impl-From%3CBVHNode%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[741,"impl-From%3CTriangle%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[742,"impl-From%3CTranslate%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[743,"impl-From%3CSTL%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[744,"impl-From%3CQuad%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[745,"impl-From%3CConstantMedium%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[746,"impl-From%3CGLTF%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[747,"impl-From%3CMovingSphere%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[748,"impl-From%3CRotateY%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[749,"impl-From%3CEmpty%3E-for-Hitable%3C\'scene%3E"],[750,"impl-From%3CBoxy%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[751,"impl-From%3CGLTFTriangle%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[753,"impl-From%3CSphere%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[803,"impl-TryInto%3CTranslate%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[804,"impl-TryInto%3CBVHNode%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[805,"impl-TryInto%3CGLTF%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[806,"impl-TryInto%3CSphere%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[807,"impl-TryInto%3CConstantMedium%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[808,"impl-TryInto%3CGLTFTriangle%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[809,"impl-TryInto%3CQuad%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[810,"impl-TryInto%3CMovingSphere%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[811,"impl-TryInto%3CBoxy%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[812,"impl-TryInto%3CTriangle%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[814,"impl-TryInto%3CEmpty%3E-for-Hitable%3C\'scene%3E"],[815,"impl-TryInto%3CRotateY%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[816,"impl-TryInto%3CSTL%3C\'scene%3E%3E-for-Hitable%3C\'scene%3E"],[953,"impl-From%3CIsotropic%3E-for-Material"],[954,"impl-From%3CDielectric%3E-for-Material"],[956,"impl-From%3CMetal%3E-for-Material"],[957,"impl-From%3CDispersive%3E-for-Material"],[958,"impl-From%3CLambertian%3E-for-Material"],[959,"impl-From%3CConeLight%3E-for-Material"],[960,"impl-From%3CDiffuseLight%3E-for-Material"],[1051,"impl-TryInto%3CDispersive%3E-for-Material"],[1052,"impl-TryInto%3CConeLight%3E-for-Material"],[1053,"impl-TryInto%3CLambertian%3E-for-Material"],[1054,"impl-TryInto%3CDiffuseLight%3E-for-Material"],[1055,"impl-TryInto%3CDielectric%3E-for-Material"],[1056,"impl-TryInto%3CIsotropic%3E-for-Material"],[1057,"impl-TryInto%3CMetal%3E-for-Material"],[2342,"impl-From%3CHitablePDF%3C\'scene%3E%3E-for-PDF%3C\'scene%3E"],[2343,"impl-From%3CMixturePDF%3C\'scene%3E%3E-for-PDF%3C\'scene%3E"],[2344,"impl-From%3CCosinePDF%3E-for-PDF%3C\'scene%3E"],[2345,"impl-From%3CZeroPDF%3E-for-PDF%3C\'scene%3E"],[2347,"impl-From%3CSpherePDF%3E-for-PDF%3C\'scene%3E"],[2442,"impl-TryInto%3CMixturePDF%3C\'scene%3E%3E-for-PDF%3C\'scene%3E"],[2443,"impl-TryInto%3CZeroPDF%3E-for-PDF%3C\'scene%3E"],[2444,"impl-TryInto%3CCosinePDF%3E-for-PDF%3C\'scene%3E"],[2446,"impl-TryInto%3CSpherePDF%3E-for-PDF%3C\'scene%3E"],[2447,"impl-TryInto%3CHitablePDF%3C\'scene%3E%3E-for-PDF%3C\'scene%3E"],[2691,"impl-From%3CSurfaceChecker%3E-for-Texture"],[2692,"impl-From%3CSolidColor%3E-for-Texture"],[2693,"impl-From%3CSpatialChecker%3E-for-Texture"],[2712,"impl-TryInto%3CSurfaceChecker%3E-for-Texture"],[2714,"impl-TryInto%3CSolidColor%3E-for-Texture"],[2715,"impl-TryInto%3CSpatialChecker%3E-for-Texture"]]},\ +"clovers_cli":{"doc":"Command Line Interface for the raytracing renderer.","t":"DLLLLLLLLLLMLLALLLLLLLMLMLMLLLLLLAFMMMMMLLLLLLLLLLLLMFFFFFFFF","n":["Opts","adapt_into_using","arrays_from","arrays_into","augment_args","augment_args_for_update","borrow","borrow_mut","command","command_for_update","components_from","debug","deref","deref_mut","draw_cpu","drop","from","from_angle","from_arg_matches","from_arg_matches_mut","from_stimulus","from_subset","gpu","group_id","height","init","input","into","into_angle","into_color","into_color_unclamped","into_stimulus","is_in_subset","json_scene","main","max_depth","normalmap","output","quiet","samples","to_subset","to_subset_unchecked","try_components_into","try_from","try_into","try_into_color","type_id","uints_from","uints_into","update_from_arg_matches","update_from_arg_matches_mut","vzip","width","draw","index_to_params","progress_bar","render_pixel","render_pixel_normalmap","sample","sample_normalmap","initialize"],"q":[[0,"clovers_cli"],[53,"clovers_cli::draw_cpu"],[60,"clovers_cli::json_scene"],[61,"palette::chromatic_adaptation"],[62,"clap_builder::builder::command"],[63,"clap_builder::parser::matches::arg_matches"],[64,"clap_builder"],[65,"core::result"],[66,"clap_builder::util::id"],[67,"core::option"],[68,"core::error"],[69,"alloc::boxed"],[70,"palette::convert::try_from_into_color"],[71,"core::any"],[72,"clovers"],[73,"clovers::scenes"],[74,"palette::rgb"],[75,"alloc::vec"],[76,"clovers"],[77,"rand::rngs::small"],[78,"palette::rgb"]],"d":["","","","","","","","","","","","Enable some debug logging","","","","","Returns the argument unchanged.","","","","","","Use the GPU draw process instead of CPU","","Height of the image in pixels","","Input filename / location","Calls U::from(self).","","","","","","","","Maximum evaluated bounce depth for each ray","Render a normal map only. Experimental feature.","Output filename / location. [default: renders/timestamp.png…","Suppress most of the text output","Number of samples to generate per each pixel","","","","","","","","","","","","","Width of the image in pixels","The main drawing function, returns a Vec<Srgb> as a …","","","","","Get a single sample for a single pixel in the scene. Has …","",""],"i":[0,6,6,6,6,6,6,6,6,6,6,6,6,6,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0],"f":[0,[[-1,-3],-4,[],[],[[1,[-2]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[2,2],[2,2],[-1,-2,[],[]],[-1,-2,[],[]],[[],2],[[],2],[-1,-2,[],[]],0,[3,-1,[]],[3,-1,[]],0,[3,4],[-1,-1,[]],[-1,-1,[]],[5,[[8,[6,7]]]],[5,[[8,[6,7]]]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[],[[10,[9]]]],0,[[],3],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,11,[]],0,[[],[[8,[4,[13,[12]]]]]],0,0,0,0,0,[-1,[[10,[-2]]],[],[]],[-1,-2,[],[]],[-1,[[8,[-2]]],[],[]],[-1,[[8,[-2]]],[],[]],[-1,[[8,[-2]]],[],[]],[-1,[[8,[-2,[14,[-2]]]]],[],[]],[-1,15,[]],[-1,-2,[],[]],[-1,-2,[],[]],[[6,5],[[8,[4,7]]]],[[6,5],[[8,[4,7]]]],[-1,-2,[],[]],0,[[16,17],[[20,[[19,[18]]]]]],[[16,3],[[4,[21,21,21,21]]]],[16,22],[[17,16,3,23],[[19,[18]]]],[[17,16,3,23],[[19,[18]]]],[[17,21,21,21,21,23,24],[[10,[25]]]],[[17,21,21,21,21,23],25],[[26,24,24],[[8,[17,[13,[12]]]]]]],"c":[],"p":[[8,"TransformMatrix",61],[3,"Command",62],[15,"usize"],[15,"tuple"],[3,"ArgMatches",63],[3,"Opts",0],[6,"Error",64],[4,"Result",65],[3,"Id",66],[4,"Option",67],[15,"bool"],[8,"Error",68],[3,"Box",69],[3,"OutOfBounds",70],[3,"TypeId",71],[3,"RenderOpts",72],[3,"Scene",73],[15,"u8"],[6,"Srgb",74],[3,"Vec",75],[6,"Float",72],[3,"ProgressBar",76],[3,"SmallRng",77],[15,"u32"],[6,"LinSrgb",74],[3,"Path",78]],"b":[]}\ +}'); +if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; +if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/settings.html b/settings.html new file mode 100644 index 00000000..b6287a07 --- /dev/null +++ b/settings.html @@ -0,0 +1 @@ +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/src-files.js b/src-files.js new file mode 100644 index 00000000..adefff94 --- /dev/null +++ b/src-files.js @@ -0,0 +1,5 @@ +var srcIndex = JSON.parse('{\ +"clovers":["",[["materials",[],["cone_light.rs","dielectric.rs","diffuse_light.rs","dispersive.rs","gltf.rs","isotropic.rs","lambertian.rs","metal.rs"]],["objects",[],["boxy.rs","constant_medium.rs","gltf.rs","moving_sphere.rs","quad.rs","rotate.rs","sphere.rs","stl.rs","translate.rs","triangle.rs"]],["spectrum",[],["spectra_xyz_5nm_380_780_097.rs","spectrum_grid.rs"]],["textures",[],["solid_color.rs","spatial_checker.rs","surface_checker.rs"]]],["aabb.rs","bvhnode.rs","camera.rs","colorize.rs","hitable.rs","interval.rs","lib.rs","materials.rs","normals.rs","objects.rs","onb.rs","pdf.rs","random.rs","ray.rs","scenes.rs","spectrum.rs","textures.rs","wavelength.rs"]],\ +"clovers_cli":["",[],["draw_cpu.rs","json_scene.rs","main.rs"]]\ +}'); +createSrcSidebar(); diff --git a/src/clovers/aabb.rs.html b/src/clovers/aabb.rs.html new file mode 100644 index 00000000..083436aa --- /dev/null +++ b/src/clovers/aabb.rs.html @@ -0,0 +1,339 @@ +aabb.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+
//! Axis-aligned bounding box.
+
+use core::ops::Add;
+
+use crate::{interval::Interval, ray::Ray, Float, Vec3, EPSILON_RECT_THICKNESS};
+
+/// Axis-aligned bounding box Defined by two opposing corners, each of which are a [Vec3].
+///
+/// This is useful for creating bounding volume hierarchies, which is an optimization for reducing the time spent on calculating ray-object intersections.
+#[derive(Clone, Debug, PartialEq)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct AABB {
+    /// The bounding interval on the X axis
+    pub x: Interval,
+    /// The bounding interval on the Y axis
+    pub y: Interval,
+    /// The bounding interval on the Z axis
+    pub z: Interval,
+}
+
+impl AABB {
+    /// Creates a new axis-aligned bounding box from three intervals
+    #[must_use]
+    pub fn new(interval_x: Interval, interval_y: Interval, interval_z: Interval) -> AABB {
+        AABB {
+            x: interval_x,
+            y: interval_y,
+            z: interval_z,
+        }
+    }
+
+    /// Creates a new axis-aligned bounding box from two coordinates. Treats the two points a and b as extrema for the bounding box, so we don't require a particular minimum/maximum coordinate order.
+    #[must_use]
+    pub fn new_from_coords(a: Vec3, b: Vec3) -> AABB {
+        AABB {
+            x: Interval::new(a[0].min(b[0]), a[0].max(b[0])),
+            y: Interval::new(a[1].min(b[1]), a[1].max(b[1])),
+            z: Interval::new(a[2].min(b[2]), a[2].max(b[2])),
+        }
+    }
+
+    /// Given a [Ray], returns whether the ray hits the bounding box or not. Current default method, based on ["An Optimized AABB Hit Method"](https://raytracing.github.io/books/RayTracingTheNextWeek.html)
+    #[must_use]
+    pub fn hit(&self, ray: &Ray, mut tmin: Float, mut tmax: Float) -> bool {
+        // TODO: Create an improved hit method with more robust handling of zeroes. See https://github.com/RayTracing/raytracing.github.io/issues/927
+        // Both methods below are susceptible for NaNs and infinities, and have subtly different edge cases.
+
+        // "My adjusted method" - possibly more zero-resistant?
+        // TODO: validate
+        for axis in 0..3 {
+            // If ray direction component is 0, invd becomes infinity.
+            // Ignore? False positive hit for aabb is probably better than false negative; the actual object can still be hit more accurately
+            let invd = 1.0 / ray.direction[axis];
+            if !invd.is_normal() {
+                continue;
+            }
+            // If the value in parenthesis ends up as zero, 0*inf can be NaN
+            let mut t0: Float = (self.axis(axis).min - ray.origin[axis]) * invd;
+            let mut t1: Float = (self.axis(axis).max - ray.origin[axis]) * invd;
+            if !t0.is_normal() || !t1.is_normal() {
+                continue;
+            }
+            if invd < 0.0 {
+                core::mem::swap(&mut t0, &mut t1);
+            }
+            tmin = if t0 > tmin { t0 } else { tmin };
+            tmax = if t1 < tmax { t1 } else { tmax };
+            if tmax <= tmin {
+                return false;
+            }
+        }
+
+        // If we have not missed on any axis, return true for the hit
+        true
+    }
+
+    /// Given a [Ray], returns whether the ray hits the bounding box or not. Old method from a GitHub issue. Exists mostly for testing purposes.
+    #[must_use]
+    #[deprecated]
+    pub fn hit_old(&self, ray: &Ray, mut tmin: Float, mut tmax: Float) -> bool {
+        // "Old method"
+        for axis in 0..3 {
+            let invd = 1.0 / ray.direction[axis];
+            let mut t0: Float = (self.axis(axis).min - ray.origin[axis]) * invd;
+            let mut t1: Float = (self.axis(axis).max - ray.origin[axis]) * invd;
+            if invd < 0.0 {
+                core::mem::swap(&mut t0, &mut t1);
+            }
+            tmin = if t0 > tmin { t0 } else { tmin };
+            tmax = if t1 < tmax { t1 } else { tmax };
+            if tmax <= tmin {
+                return false;
+            }
+        }
+        true
+    }
+
+    /// Given a [Ray], returns whether the ray hits the bounding box or not. Newer method from a GitHub issue. Exists mostly for testing purposes.
+    #[must_use]
+    #[deprecated]
+    pub fn hit_new(&self, ray: &Ray, mut tmin: Float, mut tmax: Float) -> bool {
+        // "New method"
+        for axis in 0..3 {
+            let a = (self.axis(axis).min - ray.origin[axis]) / ray.direction[axis];
+            let b = (self.axis(axis).max - ray.origin[axis]) / ray.direction[axis];
+            let t0: Float = a.min(b);
+            let t1: Float = a.max(b);
+            tmin = t0.max(tmin);
+            tmax = t1.min(tmax);
+            if tmax <= tmin {
+                return false;
+            }
+        }
+        true
+    }
+
+    /// Given two axis-aligned bounding boxes, return a new [AABB] that contains both.
+    #[must_use]
+    pub fn surrounding_box(box0: &AABB, box1: &AABB) -> AABB {
+        AABB {
+            x: Interval::new_from_intervals(box0.x, box1.x),
+            y: Interval::new_from_intervals(box0.y, box1.y),
+            z: Interval::new_from_intervals(box0.z, box1.z),
+        }
+    }
+
+    /// Make sure we don't have a zero-thickness AABB, padding if necessary.
+    pub fn pad(&mut self) {
+        // TODO: refactor
+        let delta = EPSILON_RECT_THICKNESS;
+        let new_x: Interval = if self.x.size() >= delta {
+            self.x
+        } else {
+            self.x.expand(delta)
+        };
+        let new_y: Interval = if self.y.size() >= delta {
+            self.y
+        } else {
+            self.y.expand(delta)
+        };
+        let new_z: Interval = if self.z.size() >= delta {
+            self.z
+        } else {
+            self.z.expand(delta)
+        };
+
+        *self = AABB::new(new_x, new_y, new_z);
+    }
+
+    /// Returns the interval of the given axis.
+    // TODO: this api is kind of annoying
+    #[must_use]
+    pub fn axis(&self, n: usize) -> Interval {
+        match n {
+            0 => self.x,
+            1 => self.y,
+            2 => self.z,
+            _ => panic!("AABB::axis called with invalid parameter: {n:?}"),
+        }
+    }
+}
+
+impl Add<Vec3> for AABB {
+    type Output = AABB;
+
+    fn add(self, offset: Vec3) -> Self::Output {
+        AABB::new(self.x + offset.x, self.y + offset.y, self.z + offset.z)
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/bvhnode.rs.html b/src/clovers/bvhnode.rs.html new file mode 100644 index 00000000..2e0282df --- /dev/null +++ b/src/clovers/bvhnode.rs.html @@ -0,0 +1,575 @@ +bvhnode.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+
//! Bounding Volume Hierarchy Node.
+
+use core::cmp::Ordering;
+
+use rand::{rngs::SmallRng, Rng};
+
+use crate::{
+    aabb::AABB,
+    hitable::{Empty, HitRecord, Hitable, HitableTrait},
+    ray::Ray,
+    wavelength::Wavelength,
+    Box, Float, Vec, Vec3,
+};
+
+/// Bounding Volume Hierarchy Node.
+///
+/// A node in a tree structure defining a hierarchy of objects in a scene: a node knows its bounding box, and has two children which are also `BVHNode`s. This is used for accelerating the ray-object intersection calculation in the ray tracer. See [Bounding Volume hierarchies](https://raytracing.github.io/books/RayTracingTheNextWeek.html)
+#[derive(Debug, Clone)]
+pub struct BVHNode<'scene> {
+    /// Left child of the BVHNode
+    pub left: Box<Hitable<'scene>>,
+    /// Right child of the BVHNode
+    pub right: Box<Hitable<'scene>>,
+    /// Bounding box containing both of the child nodes
+    pub bounding_box: AABB,
+}
+
+impl<'scene> BVHNode<'scene> {
+    /// Create a new `BVHNode` tree from a given list of [Object](crate::objects::Object)s
+    #[must_use]
+    pub fn from_list(mut hitables: Vec<Hitable>, time_0: Float, time_1: Float) -> BVHNode {
+        // Initialize two child nodes
+        let left: Box<Hitable>;
+        let right: Box<Hitable>;
+
+        let comparators = [box_x_compare, box_y_compare, box_z_compare];
+
+        // What is the axis with the largest span?
+        // TODO: horribly inefficient, improve!
+        let bounding: AABB =
+            vec_bounding_box(&hitables, time_0, time_1).expect("No bounding box for objects");
+        let spans = [
+            bounding.axis(0).size(),
+            bounding.axis(1).size(),
+            bounding.axis(2).size(),
+        ];
+        let largest = f32::max(f32::max(spans[0], spans[1]), spans[2]);
+        #[allow(clippy::float_cmp)] // TODO: better code for picking the largest axis...
+        let axis: usize = spans.iter().position(|&x| x == largest).unwrap();
+        let comparator = comparators[axis];
+
+        // How many objects do we have?
+        let object_span = hitables.len();
+
+        if object_span == 1 {
+            // If we only have one object, add one and an empty object.
+            // TODO: can this hack be removed?
+            left = Box::new(hitables[0].clone());
+            right = Box::new(Hitable::Empty(Empty {}));
+            let bounding_box = left.bounding_box(time_0, time_1).unwrap().clone(); // TODO: remove unwrap
+            return BVHNode {
+                left,
+                right,
+                bounding_box,
+            };
+        } else if object_span == 2 {
+            // If we are comparing two objects, perform the comparison
+            // Insert the child nodes in order
+            match comparator(&hitables[0], &hitables[1]) {
+                Ordering::Less => {
+                    left = Box::new(hitables[0].clone());
+                    right = Box::new(hitables[1].clone());
+                }
+                Ordering::Greater => {
+                    left = Box::new(hitables[1].clone());
+                    right = Box::new(hitables[0].clone());
+                }
+                Ordering::Equal => {
+                    // TODO: what should happen here?
+                    panic!("Equal objects in BVHNode from_list");
+                }
+            }
+        } else if object_span == 3 {
+            // Three objects: create one bare object and one BVHNode with two objects
+            hitables.sort_by(comparator);
+            left = Box::new(hitables[0].clone());
+            right = Box::new(Hitable::BVHNode(BVHNode {
+                left: Box::new(hitables[1].clone()),
+                right: Box::new(hitables[2].clone()),
+                bounding_box: AABB::surrounding_box(
+                    // TODO: no unwrap?
+                    hitables[1].bounding_box(time_0, time_1).unwrap(),
+                    hitables[2].bounding_box(time_0, time_1).unwrap(),
+                ),
+            }));
+        } else {
+            // Otherwise, recurse
+            hitables.sort_by(comparator);
+
+            // Split the vector; divide and conquer
+            let mid = object_span / 2;
+            let hitables_right = hitables.split_off(mid);
+            left = Box::new(Hitable::BVHNode(BVHNode::from_list(
+                hitables, time_0, time_1,
+            )));
+            right = Box::new(Hitable::BVHNode(BVHNode::from_list(
+                hitables_right,
+                time_0,
+                time_1,
+            )));
+        }
+
+        let box_left = left.bounding_box(time_0, time_1);
+        let box_right = right.bounding_box(time_0, time_1);
+
+        // Generate a bounding box and BVHNode if possible
+        if let (Some(box_left), Some(box_right)) = (box_left, box_right) {
+            let bounding_box = AABB::surrounding_box(box_left, box_right);
+
+            BVHNode {
+                left,
+                right,
+                bounding_box,
+            }
+        } else {
+            panic!("No bounding box in bvh_node constructor");
+        }
+    }
+
+    #[must_use]
+    /// Returns the count of the nodes in the tree
+    pub fn count(&self) -> usize {
+        let leftsum = match &*self.left {
+            Hitable::BVHNode(b) => b.count(),
+            _ => 1,
+        };
+        let rightsum = match &*self.right {
+            Hitable::BVHNode(b) => b.count(),
+            _ => 1,
+        };
+
+        leftsum + rightsum
+    }
+}
+
+impl<'scene> HitableTrait for BVHNode<'scene> {
+    /// The main `hit` function for a [`BVHNode`]. Given a [Ray](crate::ray::Ray), and an interval `distance_min` and `distance_max`, returns either `None` or `Some(HitRecord)` based on whether the ray intersects with the encased objects during that interval.
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        // If we do not hit the bounding box of current node, early return None
+        if !self.bounding_box.hit(ray, distance_min, distance_max) {
+            return None;
+        }
+
+        // Otherwise we have hit the bounding box of this node, recurse to child nodes
+        let hit_left = self.left.hit(ray, distance_min, distance_max, rng);
+        let hit_right = self.right.hit(ray, distance_min, distance_max, rng);
+
+        // Did we hit neither of the child nodes, one of them, or both?
+        // Return the closest thing we hit
+        match (&hit_left, &hit_right) {
+            (None, None) => None, // In theory, this case should not be reachable
+            (None, Some(_)) => hit_right,
+            (Some(_), None) => hit_left,
+            (Some(left), Some(right)) => {
+                if left.distance < right.distance {
+                    return hit_left;
+                }
+                hit_right
+            }
+        }
+    }
+
+    /// Returns the axis-aligned bounding box [AABB] of the objects within this [`BVHNode`].
+    #[must_use]
+    fn bounding_box(&self, _t0: Float, _t11: Float) -> Option<&AABB> {
+        Some(&self.bounding_box)
+    }
+
+    /// Returns a probability density function value based on the children
+    #[must_use]
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        match (&*self.left, &*self.right) {
+            (_, Hitable::Empty(_)) => self.left.pdf_value(origin, vector, wavelength, time, rng),
+            (Hitable::Empty(_), _) => self.right.pdf_value(origin, vector, wavelength, time, rng),
+            (_, _) => {
+                (self.left.pdf_value(origin, vector, wavelength, time, rng)
+                    + self.right.pdf_value(origin, vector, wavelength, time, rng))
+                    / 2.0
+            }
+        }
+    }
+
+    /// Returns a random point on the surface of one of the children
+    #[must_use]
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        match (&*self.left, &*self.right) {
+            (_, Hitable::Empty(_)) => self.left.random(origin, rng),
+            (Hitable::Empty(_), _) => self.right.random(origin, rng),
+            (_, _) => {
+                if rng.gen::<bool>() {
+                    self.left.random(origin, rng)
+                } else {
+                    self.right.random(origin, rng)
+                }
+            }
+        }
+    }
+}
+
+fn box_compare(a: &Hitable, b: &Hitable, axis: usize) -> Ordering {
+    // TODO: proper time support?
+    let box_a: Option<&AABB> = a.bounding_box(0.0, 1.0);
+    let box_b: Option<&AABB> = b.bounding_box(0.0, 1.0);
+
+    if let (Some(box_a), Some(box_b)) = (box_a, box_b) {
+        if box_a.axis(axis).min < box_b.axis(axis).min {
+            Ordering::Less
+        } else {
+            // Default to greater, even if equal
+            Ordering::Greater
+        }
+    } else {
+        panic!("No bounding box to compare with.")
+    }
+}
+
+fn box_x_compare(a: &Hitable, b: &Hitable) -> Ordering {
+    box_compare(a, b, 0)
+}
+
+fn box_y_compare(a: &Hitable, b: &Hitable) -> Ordering {
+    box_compare(a, b, 1)
+}
+
+fn box_z_compare(a: &Hitable, b: &Hitable) -> Ordering {
+    box_compare(a, b, 2)
+}
+
+// TODO: inefficient, O(n) *and* gets called at every iteration of BVHNode creation => quadratic behavior
+#[must_use]
+fn vec_bounding_box(vec: &Vec<Hitable>, t0: Float, t1: Float) -> Option<AABB> {
+    if vec.is_empty() {
+        return None;
+    }
+
+    // Mutable AABB that we grow from zero
+    let mut output_box: Option<AABB> = None;
+
+    // Go through all the objects, and expand the AABB
+    for object in vec {
+        // Check if the object has a box
+        let Some(bounding) = object.bounding_box(t0, t1) else {
+            // No box found for the object, early return.
+            // Having even one unbounded object in a list makes the entire list unbounded!
+            return None;
+        };
+
+        // Do we have an output_box already saved?
+        match output_box {
+            // If we do, expand it & recurse
+            Some(old_box) => {
+                output_box = Some(AABB::surrounding_box(&old_box, bounding));
+            }
+            // Otherwise, set output box to be the newly-found box
+            None => {
+                output_box = Some(bounding.clone());
+            }
+        }
+    }
+
+    // Return the final combined output_box
+    output_box
+}
+
\ No newline at end of file diff --git a/src/clovers/camera.rs.html b/src/clovers/camera.rs.html new file mode 100644 index 00000000..e4652d80 --- /dev/null +++ b/src/clovers/camera.rs.html @@ -0,0 +1,243 @@ +camera.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+
//! Camera. Used for creating [Rays](crate::ray::Ray) towards the scene, with directions defined by the camera properties.
+
+#![allow(clippy::too_many_arguments)] // TODO: Camera::new() has a lot of arguments.
+
+use crate::wavelength::random_wavelength;
+use crate::{random::random_in_unit_disk, ray::Ray, Float, Vec3, PI};
+use rand::rngs::SmallRng;
+use rand::Rng;
+
+#[derive(Copy, Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// The main [Camera] object used in the ray tracing.
+pub struct Camera {
+    /// Coordinate of the lower left corner of the camera.
+    pub lower_left_corner: Vec3,
+    /// Defines the horizontal axis for the camera.
+    pub horizontal: Vec3,
+    /// Defines the vertical axis for the camera.
+    pub vertical: Vec3,
+    /// Defines the origin of the camera.
+    pub origin: Vec3,
+    /// Defines the lens radius for the camera. TODO: understand and explain better
+    pub lens_radius: Float,
+    /// Defines the earliest starting time for the camera, used when generating [Rays](Ray).
+    pub time_0: Float,
+    /// Defines the latest ending time for the camera, used when generating [Rays](Ray).
+    pub time_1: Float,
+    // TODO: clarify these odd one-letter variables
+    /// U
+    pub u: Vec3,
+    /// V
+    pub v: Vec3,
+    /// W
+    pub w: Vec3,
+}
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// Represents the fields that can be described in a Scene file. Some other fields the main Camera struct requires (such as `aspect_ratio`) are derived from other info (such as width, height)
+pub struct CameraInit {
+    /// Describes where the camera is
+    pub look_from: Vec3,
+    /// Describes where the camera is looking at
+    pub look_at: Vec3,
+    /// Describes the subjective "up" direction for the camera to define the orientation
+    pub up: Vec3,
+    /// Describes the vertical field of view for the camera
+    pub vertical_fov: Float,
+    /// Describes the size of the aperture of the camera.
+    // TODO: does it really though
+    pub aperture: Float,
+    /// Describes the distance at which the camera has been focused to
+    pub focus_distance: Float,
+}
+
+impl Camera {
+    /// Creates a new [Camera] with the given parameters.
+    #[must_use]
+    pub fn new(
+        look_from: Vec3,
+        look_at: Vec3,
+        up: Vec3,
+        vertical_fov: Float,
+        aspect_ratio: Float,
+        aperture: Float,
+        focus_distance: Float,
+        time_0: Float,
+        time_1: Float,
+    ) -> Self {
+        let lens_radius: Float = aperture / 2.0;
+        let theta: Float = vertical_fov * PI / 180.0;
+        let half_height: Float = (theta / 2.0).tan();
+        let half_width: Float = aspect_ratio * half_height;
+        let origin: Vec3 = look_from;
+        let w: Vec3 = (look_from - look_at).normalize();
+        let u: Vec3 = (up.cross(&w)).normalize();
+        let v: Vec3 = w.cross(&u);
+
+        // TODO: understand this defocus
+        let lower_left_corner: Vec3 = origin
+            - half_width * focus_distance * u
+            - half_height * focus_distance * v
+            - focus_distance * w;
+        let horizontal: Vec3 = 2.0 * half_width * focus_distance * u;
+        let vertical: Vec3 = 2.0 * half_height * focus_distance * v;
+
+        Camera {
+            lower_left_corner,
+            horizontal,
+            vertical,
+            origin,
+            lens_radius,
+            time_0,
+            time_1,
+            u,
+            v,
+            w,
+        }
+    }
+
+    // TODO: fix the mysterious (u,v) vs (s,t) change that came from the tutorial
+    /// Generates a new [Ray] from the camera, at a random location of the aperture, at a random time interval between `time_0`, `time_1` of the camera.
+    #[must_use]
+    pub fn get_ray(self, s: Float, t: Float, rng: &mut SmallRng) -> Ray {
+        // TODO: add a better defocus blur / depth of field implementation
+        let rd: Vec3 = self.lens_radius * random_in_unit_disk(rng);
+        let offset: Vec3 = self.u * rd.x + self.v * rd.y;
+        // Randomized time used for motion blur
+        let time: Float = rng.gen_range(self.time_0..self.time_1);
+        // Random wavelength for spectral rendering
+        let wavelength = random_wavelength(rng);
+        Ray {
+            origin: self.origin + offset,
+            direction: self.lower_left_corner + s * self.horizontal + t * self.vertical
+                - self.origin
+                - offset,
+            time,
+            wavelength,
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/colorize.rs.html b/src/clovers/colorize.rs.html new file mode 100644 index 00000000..25d3308b --- /dev/null +++ b/src/clovers/colorize.rs.html @@ -0,0 +1,271 @@ +colorize.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+
//! An opinionated colorize method. Given a [Ray] and a [Scene], evaluates the ray's path and returns a color.
+
+use crate::{
+    hitable::HitableTrait,
+    materials::MaterialType,
+    pdf::{HitablePDF, MixturePDF, PDFTrait, PDF},
+    ray::Ray,
+    scenes::Scene,
+    spectrum::spectrum_xyz_to_p,
+    wavelength::{wavelength_into_xyz, Wavelength},
+    Float, EPSILON_SHADOW_ACNE,
+};
+use palette::{
+    chromatic_adaptation::AdaptInto, convert::IntoColorUnclamped, white_point::E, Clamp, LinSrgb,
+    Xyz,
+};
+use rand::rngs::SmallRng;
+
+/// The main coloring function. Sends a [`Ray`] to the [`Scene`], sees if it hits anything, and eventually returns a color. Taking into account the [Material](crate::materials::Material) that is hit, the method recurses with various adjustments, with a new [`Ray`] started from the location that was hit.
+#[must_use]
+pub fn colorize(
+    ray: &Ray,
+    scene: &Scene,
+    depth: u32,
+    max_depth: u32,
+    rng: &mut SmallRng,
+) -> Xyz<E> {
+    let bg: Xyz = scene.background_color.into_color_unclamped();
+    let bg: Xyz<E> = bg.adapt_into();
+    // Have we reached the maximum recursion i.e. ray bounce depth?
+    if depth > max_depth {
+        // Ray bounce limit reached, early return background_color
+        return bg;
+    }
+
+    // Send the ray to the scene, and see if it hits anything.
+    // distance_min is set to an epsilon to avoid "shadow acne" that can happen when set to zero
+    let Some(hit_record) = scene
+        .hitables
+        .hit(ray, EPSILON_SHADOW_ACNE, Float::MAX, rng)
+    else {
+        // If the ray hits nothing, early return the background color.
+        return bg;
+    };
+
+    // Get the emitted color from the surface that we just hit
+    // TODO: spectral light sources!
+    let emitted = hit_record.material.emit(
+        ray,
+        &hit_record,
+        hit_record.u,
+        hit_record.v,
+        hit_record.position,
+    );
+    let emitted = adjust_emitted(emitted, ray.wavelength);
+
+    // Do we scatter?
+    let Some(scatter_record) = hit_record.material.scatter(ray, &hit_record, rng) else {
+        // No scatter, early return the emitted color only
+        return emitted;
+    };
+    // We have scattered, and received an attenuation from the material.
+    let attenuation = adjust_attenuation(scatter_record.attenuation, ray.wavelength);
+
+    // Check the material type and recurse accordingly:
+    match scatter_record.material_type {
+        MaterialType::Specular => {
+            // If we hit a specular material, generate a specular ray, and multiply it with the attenuation
+            let specular = colorize(
+                // a scatter_record from a specular material should always have this ray
+                &scatter_record.specular_ray.unwrap(),
+                scene,
+                depth + 1,
+                max_depth,
+                rng,
+            );
+            specular * attenuation
+        }
+        MaterialType::Diffuse => {
+            // Use a probability density function to figure out where to scatter a new ray
+            // TODO: this weighed priority sampling should be adjusted or removed - doesn't feel ideal.
+            let light_ptr = PDF::HitablePDF(HitablePDF::new(
+                &scene.priority_hitables,
+                hit_record.position,
+            ));
+            let mixture_pdf = MixturePDF::new(light_ptr, scatter_record.pdf_ptr);
+            let scatter_ray = Ray {
+                origin: hit_record.position,
+                direction: mixture_pdf.generate(rng),
+                time: ray.time,
+                wavelength: ray.wavelength,
+            };
+            let pdf_val = mixture_pdf.value(scatter_ray.direction, ray.wavelength, ray.time, rng);
+            if pdf_val <= 0.0 {
+                // scattering impossible, prevent division by zero below
+                // for more ctx, see https://github.com/RayTracing/raytracing.github.io/issues/979#issuecomment-1034517236
+                return emitted;
+            }
+
+            // Calculate the PDF weighting for the scatter // TODO: understand the literature for this, and explain
+            let Some(scattering_pdf) =
+                hit_record
+                    .material
+                    .scattering_pdf(&hit_record, &scatter_ray, rng)
+            else {
+                // No scatter, only emit
+                return emitted;
+            };
+
+            // Recurse for the scattering ray
+            let recurse = colorize(&scatter_ray, scene, depth + 1, max_depth, rng);
+            // Tint and weight it according to the PDF
+            let scattered = attenuation * scattering_pdf * recurse / pdf_val;
+            // Ensure positive color
+            // let scattered = scattered.non_negative();
+            // Blend it all together
+            emitted + scattered
+        }
+    }
+}
+
+fn adjust_emitted(emitted: LinSrgb, wavelength: Wavelength) -> Xyz<E> {
+    let tint: Xyz<E> = wavelength_into_xyz(wavelength);
+    let emitted: Xyz = emitted.into_color_unclamped();
+    let emitted: Xyz<E> = emitted.adapt_into();
+    tint * emitted
+}
+
+fn adjust_attenuation(attenuation: LinSrgb, wavelength: Wavelength) -> Xyz<E> {
+    let attenuation: Xyz = attenuation.into_color_unclamped();
+    let attenuation: Xyz<E> = attenuation.adapt_into();
+    let attenuation_factor = spectrum_xyz_to_p(wavelength, attenuation);
+    let attenuation = attenuation * attenuation_factor;
+    attenuation.clamp()
+}
+
\ No newline at end of file diff --git a/src/clovers/hitable.rs.html b/src/clovers/hitable.rs.html new file mode 100644 index 00000000..6738c339 --- /dev/null +++ b/src/clovers/hitable.rs.html @@ -0,0 +1,301 @@ +hitable.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+
//! An abstraction for things that can be hit by [Rays](crate::ray::Ray).
+
+#![allow(missing_docs)] // TODO: Lots of undocumented things for now
+
+#[cfg(feature = "stl")]
+use crate::objects::STL;
+#[cfg(feature = "gl_tf")]
+use crate::objects::{GLTFTriangle, GLTF};
+
+use crate::{
+    aabb::AABB,
+    bvhnode::BVHNode,
+    materials::MaterialTrait,
+    objects::{Boxy, ConstantMedium, MovingSphere, Quad, RotateY, Sphere, Translate, Triangle},
+    ray::Ray,
+    wavelength::Wavelength,
+    Float, Vec3,
+};
+
+use enum_dispatch::enum_dispatch;
+use rand::rngs::SmallRng;
+
+/// Represents a ray-object intersection, with plenty of data about the intersection.
+#[derive(Debug)]
+pub struct HitRecord<'a> {
+    /// Distance from the ray origin to the hitpoint
+    pub distance: Float,
+    /// 3D coordinate of the hitpoint
+    pub position: Vec3,
+    /// Surface normal from the hitpoint
+    pub normal: Vec3,
+    /// U surface coordinate of the hitpoint
+    pub u: Float,
+    /// V surface coordinate of the hitpoint
+    pub v: Float,
+    /// Reference to the material at the hitpoint
+    pub material: &'a dyn MaterialTrait,
+    /// Is the hitpoint at the front of the surface
+    pub front_face: bool,
+}
+
+impl<'a> HitRecord<'a> {
+    /// Helper function for getting normals pointing at the correct direction. TODO: consider removal?
+    pub fn set_face_normal(&mut self, ray: &Ray, outward_normal: Vec3) {
+        self.front_face = ray.direction.dot(&outward_normal) < 0.0;
+        if self.front_face {
+            self.normal = outward_normal;
+        } else {
+            self.normal = -outward_normal;
+        }
+    }
+}
+
+/// An abstraction for things that can be hit by [Rays](crate::ray::Ray).
+#[enum_dispatch(HitableTrait)]
+#[derive(Debug, Clone)]
+pub enum Hitable<'scene> {
+    Boxy(Boxy<'scene>),
+    BVHNode(BVHNode<'scene>),
+    ConstantMedium(ConstantMedium<'scene>),
+    MovingSphere(MovingSphere<'scene>),
+    Quad(Quad<'scene>),
+    RotateY(RotateY<'scene>),
+    Sphere(Sphere<'scene>),
+    #[cfg(feature = "stl")]
+    STL(STL<'scene>),
+    #[cfg(feature = "gl_tf")]
+    GLTF(GLTF<'scene>),
+    Translate(Translate<'scene>),
+    Triangle(Triangle<'scene>),
+    Empty(Empty),
+    #[cfg(feature = "gl_tf")]
+    GLTFTriangle(GLTFTriangle<'scene>),
+}
+
+// TODO: remove horrible hack
+#[derive(Debug, Clone)]
+pub struct Empty {}
+
+impl HitableTrait for Empty {
+    fn hit(
+        &self,
+        _ray: &Ray,
+        _distance_min: Float,
+        _distance_max: Float,
+        _rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        None
+    }
+
+    fn bounding_box(&self, _t0: Float, _t1: Float) -> Option<&AABB> {
+        None
+    }
+
+    fn pdf_value(
+        &self,
+        _origin: Vec3,
+        _vector: Vec3,
+        _wavelength: Wavelength,
+        _time: Float,
+        _rng: &mut SmallRng,
+    ) -> Float {
+        0.0
+    }
+
+    fn random(&self, _origin: Vec3, _rng: &mut SmallRng) -> Vec3 {
+        panic!("Hitable::Empty::random called!")
+    }
+}
+
+#[enum_dispatch]
+pub(crate) trait HitableTrait {
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        rng: &mut SmallRng,
+    ) -> Option<HitRecord>;
+
+    #[must_use]
+    fn bounding_box(&self, t0: Float, t1: Float) -> Option<&AABB>;
+
+    #[must_use]
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float;
+
+    #[must_use]
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3;
+}
+
+/// Returns a tuple of `(front_face, normal)`. Used in lieu of `set_face_normal` in the Ray Tracing for the Rest Of Your Life book.
+#[must_use]
+pub fn get_orientation(ray: &Ray, outward_normal: Vec3) -> (bool, Vec3) {
+    let front_face = ray.direction.dot(&outward_normal) < 0.0;
+    let normal = if front_face {
+        outward_normal
+    } else {
+        -outward_normal
+    };
+
+    (front_face, normal)
+}
+
\ No newline at end of file diff --git a/src/clovers/interval.rs.html b/src/clovers/interval.rs.html new file mode 100644 index 00000000..ac5aec8f --- /dev/null +++ b/src/clovers/interval.rs.html @@ -0,0 +1,113 @@ +interval.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+
//! Interval helper adapted from the book
+
+use core::ops::Add;
+
+use crate::Float;
+
+/// An interval structure.
+#[derive(Copy, Clone, Debug, PartialEq)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct Interval {
+    /// Smallest value of the interval. Must be kept in order  
+    pub min: Float,
+    /// Largest value of the interval. Must be kept in order
+    pub max: Float,
+}
+
+impl Interval {
+    /// Constructs a new interval
+    #[must_use]
+    pub fn new(a: Float, b: Float) -> Self {
+        Interval {
+            min: a.min(b),
+            max: a.max(b),
+        }
+    }
+
+    /// Constructs a new interval from two intervals
+    // TODO: explanation, clarification
+    #[must_use]
+    pub fn new_from_intervals(a: Interval, b: Interval) -> Self {
+        Interval {
+            min: a.min.min(b.min),
+            max: a.max.max(b.max),
+        }
+    }
+
+    /// Returns an interval expanded with delta at both ends
+    #[must_use]
+    pub fn expand(&self, delta: Float) -> Self {
+        Interval::new(self.min - delta, self.max + delta)
+    }
+
+    /// Returns the size of the interval
+    #[must_use]
+    pub fn size(self) -> Float {
+        self.max - self.min
+    }
+}
+
+impl Add<Float> for Interval {
+    type Output = Interval;
+
+    fn add(self, offset: Float) -> Self::Output {
+        Interval::new(self.min + offset, self.max + offset)
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/lib.rs.html b/src/clovers/lib.rs.html new file mode 100644 index 00000000..c1b0fe2c --- /dev/null +++ b/src/clovers/lib.rs.html @@ -0,0 +1,263 @@ +lib.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+
//! # clovers - ray tracing in rust!
+//!
+//! **Note**: This library is experimental & heavily work in progress. Everything can change at a moment's notice. It is probably not a good idea to use this library for anything other than experimentation for now!
+//!
+//! This project uses GitHub for development and issue tracking. [Link to the repository](https://github.com/Walther/clovers).
+//!
+//! # Guiding thoughts
+//! - Keep it clean: prefer good abstractions, avoid deep integration
+//! - Platform agnostic: hopefully runnable by both CPU and GPU, on desktop and `WebAssembly`, etc
+//! - Prefer correctness: no "cheating" optimizations / approximations
+//! - Look for beautiful light <3
+//!
+//! # How it works
+//!
+//! There are a few core stages of using clovers.
+//!
+//! ## Creating and Loading a Scene
+//!
+//! First, you will need a [Scene](scenes::Scene). You can create a scene manually or utilize [serde](https://docs.serde.rs/) to deserialize from a file. Currently, the example binary uses a JSON format.
+//!
+//! - [Scenes](scenes::Scene) have [Objects](objects::Object)
+//! - [Objects](objects::Object) have a [Material](materials::Material)
+//! - [Materials](materials::Material) usually have a [Texture](textures::Texture)
+//! - Materials and Textures may have unique paramteres to adjust
+//!
+//!
+//! ## Rendering the Scene
+//!
+//! clovers is not opinionated on how you want to render your scene. In a usual scenario, you probably want to have some form of a pixel buffer, with knowledge of the `x` and `y` coordinates of your buffer.
+//!
+//! - Rendering is done by creating [`Ray`](ray::Ray)s and seeing what they hit
+//! - A [`Ray`](ray::Ray) has an origin and a direction
+//! - Every [`Object`](objects::Object) has a `hit()` method that takes a [Ray](ray::Ray) and returns an Option<[`HitRecord`](hitable::HitRecord)>
+//! - If you get None, use that information to colorize your pixel with a default color
+//! - If you get Some([`HitRecord`](hitable::HitRecord)), use its details to colorize your pixel
+//! - You most likely also want to recurse: depending on the material, maybe `scatter()` and cast a new [`Ray`](ray::Ray)?
+//!
+//! You most likely want to repeat this process multiple times for each of your pixels: generating multiple samples per pixel results in a higher quality image.
+//!
+//! The library provides an opinionated [`colorize()`](colorize::colorize) function that does the steps mentioned above. Using it is optional - feel free to implement your own methods that utilize the lower-level building blocks for more creative power!
+//!
+//! ## Post processing
+//!
+//! **TODO:** maybe add some post processing utilities?
+//! - denoise support?
+//! - 3D & rendering aware effects?
+//! - etc
+//!
+//! ## Using the result
+//!
+//! At the end, use your pixel buffer - save to an image file, draw a frame in a GUI window, etc.
+
+// Lints
+#![deny(clippy::pedantic)]
+#![deny(explicit_outlives_requirements)]
+#![deny(trivial_casts)]
+#![deny(trivial_numeric_casts)]
+#![deny(unsafe_code)]
+#![deny(unused_lifetimes)]
+#![deny(unused_qualifications)]
+#![deny(missing_debug_implementations)]
+#![deny(missing_docs)]
+// TODO: temporarily allowing some in order to get a majority of clippy::pedantic enabled
+#![allow(clippy::many_single_char_names)] // Lots of places with coordinates etc
+#![allow(clippy::missing_panics_doc)] // TODO: remove panics where feasible later
+#![allow(clippy::module_name_repetitions)]
+// no_std required for gpu accelerated rendering
+#![cfg_attr(not(feature = "std"), no_std)]
+extern crate alloc;
+pub use alloc::boxed::Box;
+pub use alloc::vec::Vec;
+
+// Externals
+use nalgebra::base::{Vector2, Vector3, Vector4};
+
+// Internals
+pub mod aabb;
+pub mod bvhnode;
+pub mod camera;
+pub mod colorize;
+pub mod hitable;
+pub mod interval;
+pub mod materials;
+pub mod normals;
+pub mod objects;
+pub mod onb;
+pub mod pdf;
+pub mod random;
+pub mod ray;
+pub mod scenes;
+pub mod spectrum;
+pub mod textures;
+pub mod wavelength;
+
+/// Rendering options struct
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct RenderOpts {
+    /// Width of the render in pixels
+    pub width: u32,
+    /// Height of the render in pixels
+    pub height: u32,
+    /// Samples per pixel to render for multisampling. Higher number implies higher quality.
+    pub samples: u32,
+    /// Maximum ray bounce depth. Higher number implies higher quality.
+    pub max_depth: u32,
+    /// Optionally, suppress CLI output
+    pub quiet: bool,
+    /// Experimental render mode: return a normal map only instead of doing a full path trace render.
+    pub normalmap: bool,
+}
+
+// Handy aliases for internal use
+
+/// Internal type alias: this allows the crate to easily switch between float precision without modifying a lot of files.
+pub type Float = f32;
+/// Internal helper: re-exports the pi constant as our internal [Float] type. TODO: selectable at run time instead of build time?
+pub const PI: Float = core::f32::consts::PI;
+/// Internal type alias: a nalgebra [Vector2] which is a vector with two dimensions, containing two of our internal [Float] types
+pub type Vec2 = Vector2<Float>;
+/// Internal type alias: a nalgebra [Vector3] which is a vector with three dimensions, containing three of our internal [Float] types
+pub type Vec3 = Vector3<Float>;
+/// Internal type alias: a nalgebra [Vector4] which is a vector with four dimensions, containing four of our internal [Float] types
+pub type Vec4 = Vector4<Float>;
+/// Internal const: epsilon used for avoiding "shadow acne". This is mostly used for the initial minimum distance for ray hits after reflecting or scattering from a surface.
+pub const EPSILON_SHADOW_ACNE: Float = 0.001;
+/// Internal const: epsilon used for having a finitely-sized thickness for the bounding box of an infinitely-thin rectangle. Shouldn't be too small.
+pub const EPSILON_RECT_THICKNESS: Float = 0.000_1;
+/// Internal const: epsilon used in the hit calculation of a [`ConstantMedium`](objects::constant_medium::ConstantMedium).
+// TODO: what would be an appropriate value?
+pub const EPSILON_CONSTANT_MEDIUM: Float = 0.000_1;
+
\ No newline at end of file diff --git a/src/clovers/materials.rs.html b/src/clovers/materials.rs.html new file mode 100644 index 00000000..d6b9aeac --- /dev/null +++ b/src/clovers/materials.rs.html @@ -0,0 +1,319 @@ +materials.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+
//! Materials enable different behaviors of light on objects.
+
+use core::fmt::Debug;
+
+use crate::{hitable::HitRecord, pdf::PDF, ray::Ray, Float, Vec3};
+pub mod cone_light;
+pub mod dielectric;
+pub mod diffuse_light;
+pub mod dispersive;
+#[cfg(feature = "gl_tf")]
+pub mod gltf;
+pub mod isotropic;
+pub mod lambertian;
+pub mod metal;
+
+pub use cone_light::*;
+pub use dielectric::*;
+pub use diffuse_light::*;
+pub use dispersive::*;
+use enum_dispatch::enum_dispatch;
+pub use isotropic::*;
+pub use lambertian::*;
+pub use metal::*;
+use palette::LinSrgb;
+use rand::prelude::SmallRng;
+
+/// Initialization structure for a `Material`. Either contains a `Material` by itself, or a String `name` to be found in a shared material list.
+#[derive(Debug, Clone)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "serde-derive", serde(untagged))]
+pub enum MaterialInit {
+    /// Name of the shared material
+    Shared(String),
+    /// Owned material structure
+    Owned(Material),
+}
+
+impl Default for MaterialInit {
+    fn default() -> Self {
+        Self::Shared(String::new())
+    }
+}
+
+/// A `Material` that can be referred to by name for reuse across multiple `Object`s
+#[derive(Default, Debug, Clone)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct SharedMaterial {
+    /// Name of the shared material
+    pub name: String,
+    /// The shared material itself
+    #[serde(flatten)]
+    pub material: Material,
+}
+
+#[enum_dispatch]
+/// Trait for materials. Requires three function implementations: `scatter`, `scattering_pdf`, and `emit`.
+pub trait MaterialTrait: Debug {
+    /// Given a ray and a hitrecord, return the possible `ScatterRecord`.
+    fn scatter(
+        &self,
+        ray: &Ray,
+        hit_record: &HitRecord,
+        rng: &mut SmallRng,
+    ) -> Option<ScatterRecord>;
+
+    /// TODO: explain
+    fn scattering_pdf(
+        &self,
+        hit_record: &HitRecord,
+        scattered: &Ray,
+        rng: &mut SmallRng,
+    ) -> Option<Float>;
+
+    /// Returns the emissivity of the material at the given position. Defaults to black as most materials don't emit - override when needed.
+    fn emit(
+        &self,
+        _ray: &Ray,
+        _hit_record: &HitRecord,
+        _u: Float,
+        _v: Float,
+        _position: Vec3,
+    ) -> LinSrgb {
+        LinSrgb::new(0.0, 0.0, 0.0)
+    }
+}
+
+#[enum_dispatch(MaterialTrait)]
+#[derive(Debug, Clone)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// A material enum. TODO: for ideal clean abstraction, this should be a trait. However, that comes with some additional considerations, including e.g. performance.
+#[cfg_attr(feature = "serde-derive", serde(tag = "kind"))]
+pub enum Material {
+    /// Dielectric material
+    Dielectric(Dielectric),
+    /// Dispersive material
+    Dispersive(Dispersive),
+    /// Lambertian material
+    Lambertian(Lambertian),
+    /// ConeLight material
+    ConeLight(ConeLight),
+    /// DiffuseLight material
+    DiffuseLight(DiffuseLight),
+    /// Metal material
+    Metal(Metal),
+    /// Isotropic material
+    Isotropic(Isotropic),
+}
+
+impl Default for Material {
+    fn default() -> Self {
+        Self::Lambertian(Lambertian::default())
+    }
+}
+
+#[derive(Debug, Clone)]
+/// Enum for the types of materials: Diffuse and Specular (i.e., matte and shiny)
+pub enum MaterialType {
+    /// A matte material that does not reflect rays
+    Diffuse,
+    /// A shiny material that reflects some rays
+    Specular,
+}
+
+#[derive(Debug, Clone)]
+/// A record of an scattering event of a [Ray] on a [Material].
+pub struct ScatterRecord<'ray> {
+    /// The material type that was scattered on
+    pub material_type: MaterialType,
+    /// Direction of a generated specular ray
+    pub specular_ray: Option<Ray>,
+    /// Current color to take into account when following the scattered ray for futher iterations
+    pub attenuation: LinSrgb,
+    /// Probability density function to use with the [ScatterRecord].
+    // TODO: understand & explain
+    pub pdf_ptr: PDF<'ray>,
+}
+
+// TODO: are these up to date / correct?
+
+#[must_use]
+fn reflect(vector: Vec3, normal: Vec3) -> Vec3 {
+    vector - 2.0 * vector.dot(&normal) * normal
+}
+
+#[must_use]
+fn refract(uv: Vec3, normal: Vec3, refraction_ratio: Float) -> Vec3 {
+    let cos_theta: Float = -uv.dot(&normal);
+    let cos_theta = cos_theta.min(1.0); // Clamp
+    let r_out_parallel: Vec3 = refraction_ratio * (uv + cos_theta * normal);
+    let r_out_perp: Vec3 = -(1.0 - r_out_parallel.norm_squared()).sqrt() * normal;
+    r_out_parallel + r_out_perp
+}
+
+#[must_use]
+fn schlick(cosine: Float, refractive_index: Float) -> Float {
+    let r0 = (1.0 - refractive_index) / (1.0 + refractive_index);
+    let r0 = r0 * r0;
+    r0 + (1.0 - r0) * ((1.0 - cosine).powf(5.0))
+}
+
\ No newline at end of file diff --git a/src/clovers/materials/cone_light.rs.html b/src/clovers/materials/cone_light.rs.html new file mode 100644 index 00000000..2ff762a2 --- /dev/null +++ b/src/clovers/materials/cone_light.rs.html @@ -0,0 +1,197 @@ +cone_light.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+
//! A cone light material.
+
+use super::{MaterialTrait, ScatterRecord};
+use crate::{
+    hitable::HitRecord,
+    ray::Ray,
+    textures::{SolidColor, Texture, TextureTrait},
+    Float, Vec3,
+};
+use palette::{convert::IntoColorUnclamped, LinSrgb, Srgb};
+use rand::prelude::SmallRng;
+
+/// A cone light material. The material emits light if the incoming ray is within a certain amount of degrees from the surface normal.
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct ConeLight {
+    spread: Float,
+    emit: Texture,
+}
+
+impl Default for ConeLight {
+    /// Creates a new [`ConeLight`] with white light at intensity `100.0` and a spread of 10 degrees.
+    fn default() -> Self {
+        ConeLight {
+            spread: 10.0,
+            emit: Texture::SolidColor(SolidColor::new(Srgb::new(100.0, 100.0, 100.0))),
+        }
+    }
+}
+
+impl MaterialTrait for ConeLight {
+    /// Scatter method for the [`ConeLight`] material. Always returns `None`, as diffuse light does not scatter.
+    #[must_use]
+    fn scatter(
+        &self,
+        _ray: &Ray,
+        _hit_record: &HitRecord,
+        _rng: &mut SmallRng,
+    ) -> Option<ScatterRecord> {
+        None
+    }
+
+    /// Scattering probability density function for the [`ConeLight`] material. Always returns 0, as diffuse light does not scatter.
+    #[must_use]
+    fn scattering_pdf(
+        &self,
+        _hit_record: &HitRecord,
+        _scattered: &Ray,
+        _rng: &mut SmallRng,
+    ) -> Option<Float> {
+        None
+    }
+
+    /// Emission function for [`ConeLight`]. If the given [`HitRecord`] has been hit on the `front_face`, emit a color based on the texture and surface coordinates. Otherwise, emit pure black.
+    #[must_use]
+    fn emit(
+        &self,
+        ray: &Ray,
+        hit_record: &HitRecord,
+        u: Float,
+        v: Float,
+        position: Vec3,
+    ) -> LinSrgb {
+        // If we don't hit the front face, return black
+        if !hit_record.front_face {
+            return LinSrgb::new(0.0, 0.0, 0.0);
+        }
+
+        // We have hit the front. Calculate the angle of incidence
+        let spread_radians = self.spread.to_radians();
+        let angle = (-ray.direction.dot(&hit_record.normal)
+            / (ray.direction.magnitude() * hit_record.normal.magnitude()))
+        .acos();
+
+        let emit = self.emit.color(u, v, position);
+        let emit: LinSrgb = emit.into_color_unclamped();
+        if angle <= spread_radians {
+            emit
+        } else {
+            // Make sure that the front face of the lamp is tinted, even outside the main lighting angle
+            let (r, g, b) = emit.into_components();
+            let scaling_factor = r.max(g).max(b);
+            if scaling_factor > 1.0 {
+                emit / scaling_factor
+            } else {
+                emit
+            }
+        }
+    }
+}
+
+impl ConeLight {
+    /// Creates a new [`ConeLight`] material with the given [Texture].
+    #[must_use]
+    pub fn new(spread: Float, emit: Texture) -> Self {
+        ConeLight { spread, emit }
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/materials/dielectric.rs.html b/src/clovers/materials/dielectric.rs.html new file mode 100644 index 00000000..540a6be0 --- /dev/null +++ b/src/clovers/materials/dielectric.rs.html @@ -0,0 +1,211 @@ +dielectric.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+
//! A dielectric material. This resembles glass and other transparent and reflective materials.
+
+use super::{reflect, refract, schlick, MaterialTrait, MaterialType, ScatterRecord};
+use crate::{
+    hitable::HitRecord,
+    pdf::{ZeroPDF, PDF},
+    ray::Ray,
+    Float, Vec3,
+};
+use palette::{convert::IntoColorUnclamped, Srgb};
+use rand::rngs::SmallRng;
+use rand::Rng;
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// A dielectric material. This resembles glass and other transparent and reflective materials.
+pub struct Dielectric {
+    /// Refractive index of the material. Used for calculating the new direction of a ray when entering the material at an angle. Follows Snell's law of refraction. Default value: 1.5, based on typical window glass.
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_index"))]
+    pub refractive_index: Float,
+    /// Color of the material. Used for colorizing the rays. Default value: [`(1.0, 1.0, 1.0)`], producing a fully transparent, clear glass.
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_color"))]
+    pub color: Srgb,
+}
+
+fn default_index() -> Float {
+    1.5
+}
+
+fn default_color() -> Srgb {
+    Srgb::new(1.0, 1.0, 1.0)
+}
+
+impl MaterialTrait for Dielectric {
+    /// Scatter method for the Dielectric material. Given a `ray` and a `hit_record`, evaluate a [`ScatterRecord`] based on possible reflection or refraction.
+    #[must_use]
+    fn scatter(
+        &self,
+        ray: &Ray,
+        hit_record: &HitRecord,
+        rng: &mut SmallRng,
+    ) -> Option<ScatterRecord> {
+        let refraction_ratio: Float = if hit_record.front_face {
+            1.0 / self.refractive_index
+        } else {
+            self.refractive_index
+        };
+
+        let unit_direction: Vec3 = ray.direction.normalize();
+        let cos_theta: Float = (-unit_direction.dot(&hit_record.normal)).min(1.0);
+        let sin_theta: Float = (1.0 - cos_theta * cos_theta).sqrt();
+        let specular_direction: Vec3 = if refraction_ratio * sin_theta > 1.0 {
+            reflect(unit_direction, hit_record.normal)
+        } else {
+            let reflect_probability: Float = schlick(cos_theta, refraction_ratio);
+            if rng.gen::<Float>() < reflect_probability {
+                reflect(unit_direction, hit_record.normal)
+            } else {
+                // Refracted
+                refract(unit_direction, hit_record.normal, refraction_ratio)
+            }
+        };
+        let specular_ray = Ray {
+            origin: hit_record.position,
+            direction: specular_direction,
+            time: ray.time,
+            wavelength: ray.wavelength,
+        };
+
+        Some(ScatterRecord {
+            material_type: MaterialType::Specular,
+            specular_ray: Some(specular_ray),
+            attenuation: self.color.into_color_unclamped(),
+            pdf_ptr: PDF::ZeroPDF(ZeroPDF::new()), //TODO: ugly hack due to nullptr in original tutorial
+        })
+    }
+
+    /// Scattering probability density function for Dielectric material. NOTE: not implemented!
+    #[must_use]
+    fn scattering_pdf(
+        &self,
+        _hit_record: &HitRecord,
+        _scattered: &Ray,
+        _rng: &mut SmallRng,
+    ) -> Option<Float> {
+        None // TODO: should a dielectric material scatter? how much?
+    }
+}
+
+impl Dielectric {
+    /// Creates a new [Dielectric] material with the given refractive index and color.
+    #[must_use]
+    pub fn new(refractive_index: Float, color: Srgb) -> Self {
+        Dielectric {
+            refractive_index,
+            color,
+        }
+    }
+}
+
+impl Default for Dielectric {
+    fn default() -> Self {
+        Dielectric::new(default_index(), default_color())
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/materials/diffuse_light.rs.html b/src/clovers/materials/diffuse_light.rs.html new file mode 100644 index 00000000..1c64144c --- /dev/null +++ b/src/clovers/materials/diffuse_light.rs.html @@ -0,0 +1,157 @@ +diffuse_light.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+
//! A diffuse light material.
+
+use super::{MaterialTrait, ScatterRecord};
+use crate::{
+    hitable::HitRecord,
+    ray::Ray,
+    textures::{SolidColor, Texture, TextureTrait},
+    Float, Vec3,
+};
+use palette::{convert::IntoColorUnclamped, LinSrgb, Srgb};
+use rand::prelude::SmallRng;
+
+/// A diffuse light material. On this material, rays never scatter - the material always emits a color based on its texture.
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct DiffuseLight {
+    emit: Texture,
+}
+
+impl Default for DiffuseLight {
+    /// Creates a new [`DiffuseLight`] with white light at intensity `100.0`
+    fn default() -> Self {
+        DiffuseLight {
+            emit: Texture::SolidColor(SolidColor::new(Srgb::new(100.0, 100.0, 100.0))),
+        }
+    }
+}
+
+impl MaterialTrait for DiffuseLight {
+    /// Scatter method for the [`DiffuseLight`] material. Always returns `None`, as diffuse light does not scatter.
+    #[must_use]
+    fn scatter(
+        &self,
+        _ray: &Ray,
+        _hit_record: &HitRecord,
+        _rng: &mut SmallRng,
+    ) -> Option<ScatterRecord> {
+        None
+    }
+
+    /// Scattering probability density function for the [`DiffuseLight`] material. Always returns 0, as diffuse light does not scatter.
+    #[must_use]
+    fn scattering_pdf(
+        &self,
+        _hit_record: &HitRecord,
+        _scattered: &Ray,
+        _rng: &mut SmallRng,
+    ) -> Option<Float> {
+        None
+    }
+
+    /// Emission function for [`DiffuseLight`]. If the given [`HitRecord`] has been hit on the `front_face`, emit a color based on the texture and surface coordinates. Otherwise, emit pure black.
+    #[must_use]
+    fn emit(
+        &self,
+        _ray: &Ray,
+        hit_record: &HitRecord,
+        u: Float,
+        v: Float,
+        position: Vec3,
+    ) -> LinSrgb {
+        if hit_record.front_face {
+            let emit = self.emit.color(u, v, position);
+            let emit: LinSrgb = emit.into_color_unclamped();
+            emit
+        } else {
+            LinSrgb::new(0.0, 0.0, 0.0)
+        }
+    }
+}
+
+impl DiffuseLight {
+    /// Creates a new [`DiffuseLight`] material with the given [Texture].
+    #[must_use]
+    pub fn new(emission: Texture) -> Self {
+        DiffuseLight { emit: emission }
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/materials/dispersive.rs.html b/src/clovers/materials/dispersive.rs.html new file mode 100644 index 00000000..8a0599b3 --- /dev/null +++ b/src/clovers/materials/dispersive.rs.html @@ -0,0 +1,257 @@ +dispersive.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+
//! Dispersive material.
+//! Based on [Cauchy's equation](https://en.wikipedia.org/wiki/Cauchy%27s_equation)
+
+/*
+Material 	                A 	        B (μm2)
+Fused silica          	    1.4580 	    0.00354
+Borosilicate glass BK7 	    1.5046 	    0.00420
+Hard crown glass K5 	    1.5220 	    0.00459
+Barium crown glass BaK4 	1.5690 	    0.00531
+Barium flint glass BaF10 	1.6700 	    0.00743
+Dense flint glass SF10 	    1.7280 	    0.01342
+*/
+
+// TODO: consider other options, e.g. Sellmeier https://en.wikipedia.org/wiki/Sellmeier_equation
+
+use palette::LinSrgb;
+use rand::{rngs::SmallRng, Rng};
+
+use crate::{
+    hitable::HitRecord,
+    pdf::{ZeroPDF, PDF},
+    ray::Ray,
+    wavelength::Wavelength,
+    Float, Vec3,
+};
+
+use super::{reflect, refract, schlick, MaterialTrait, MaterialType, ScatterRecord};
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// A dispersive glass material.
+pub struct Dispersive {
+    /// Cauchy coefficient A of the material
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_a"))]
+    pub cauchy_a: Float,
+    /// Cauchy coefficient B of the material
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_b"))]
+    pub cauchy_b: Float,
+}
+
+fn default_a() -> Float {
+    1.5046
+}
+
+fn default_b() -> Float {
+    0.00420
+}
+
+// TODO: less precision loss?
+#[allow(clippy::cast_precision_loss)]
+impl Dispersive {
+    /// Creates a new [Dispersive] material with the given Cauchy equation constants.
+    #[must_use]
+    pub fn new(cauchy_a: Float, cauchy_b: Float) -> Self {
+        Dispersive { cauchy_a, cauchy_b }
+    }
+
+    /// Calculates the refractive index of the material for the given wavelength
+    #[must_use]
+    pub fn refractive_index(&self, wavelength: Wavelength) -> Float {
+        let wave_micros = wavelength as Float / 1000.0;
+        self.cauchy_a + (self.cauchy_b / (wave_micros * wave_micros))
+    }
+}
+
+impl Default for Dispersive {
+    fn default() -> Self {
+        Dispersive::new(default_a(), default_b())
+    }
+}
+
+impl MaterialTrait for Dispersive {
+    fn scatter(
+        &self,
+        ray: &Ray,
+        hit_record: &HitRecord,
+        rng: &mut SmallRng,
+    ) -> Option<ScatterRecord> {
+        // Calculate refractive index based on the wavelength of the incoming material
+        // TODO: colored dispersive glass?
+        let attenuation = LinSrgb::new(1.0, 1.0, 1.0);
+        let refractive_index = self.refractive_index(ray.wavelength);
+        let refraction_ratio: Float = if hit_record.front_face {
+            1.0 / refractive_index
+        } else {
+            refractive_index
+        };
+
+        // Copied from Dielectric, is this correct?
+        let unit_direction: Vec3 = ray.direction.normalize();
+        let cos_theta: Float = (-unit_direction.dot(&hit_record.normal)).min(1.0);
+        let sin_theta: Float = (1.0 - cos_theta * cos_theta).sqrt();
+        let specular_direction: Vec3 = if refraction_ratio * sin_theta > 1.0 {
+            reflect(unit_direction, hit_record.normal)
+        } else {
+            let reflect_probability: Float = schlick(cos_theta, refraction_ratio);
+            if rng.gen::<Float>() < reflect_probability {
+                reflect(unit_direction, hit_record.normal)
+            } else {
+                // Refracted
+                refract(unit_direction, hit_record.normal, refraction_ratio)
+            }
+        };
+        let specular_ray = Ray {
+            origin: hit_record.position,
+            direction: specular_direction,
+            time: ray.time,
+            wavelength: ray.wavelength,
+        };
+
+        Some(ScatterRecord {
+            material_type: MaterialType::Specular,
+            specular_ray: Some(specular_ray),
+            attenuation,
+            pdf_ptr: PDF::ZeroPDF(ZeroPDF::new()), //TODO: ugly hack due to nullptr in original tutorial
+        })
+        // End copied
+    }
+
+    fn scattering_pdf(
+        &self,
+        _hit_record: &HitRecord,
+        _scattered: &Ray,
+        _rng: &mut SmallRng,
+    ) -> Option<Float> {
+        None // TODO: should a dispersive material scatter? how much?
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/materials/gltf.rs.html b/src/clovers/materials/gltf.rs.html new file mode 100644 index 00000000..2bc8e272 --- /dev/null +++ b/src/clovers/materials/gltf.rs.html @@ -0,0 +1,655 @@ +gltf.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+
//! Wrapper for GLTF materials.
+
+#![allow(clippy::pedantic)]
+
+#[cfg(feature = "gl_tf")]
+use gltf::{image::Data, Material};
+use palette::{convert::IntoColorUnclamped, LinSrgb, Srgb, Srgba};
+use rand::rngs::SmallRng;
+
+use crate::{
+    hitable::HitRecord,
+    pdf::{ZeroPDF, PDF},
+    random::random_unit_vector,
+    ray::Ray,
+    Float, Vec2, Vec3, Vec4, PI,
+};
+
+use super::{reflect, MaterialTrait, MaterialType, ScatterRecord};
+
+#[derive(Debug, Clone)]
+// #[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// GLTF Material wrapper type
+pub struct GLTFMaterial<'scene> {
+    material: &'scene Material<'scene>,
+    tex_coords: [[Float; 2]; 3],
+    images: &'scene [Data],
+    tangents: Option<[Vec3; 3]>,
+    normals: Option<[Vec3; 3]>,
+    bitangents: Option<[Vec3; 3]>,
+}
+
+impl<'scene> Default for GLTFMaterial<'scene> {
+    fn default() -> Self {
+        todo!()
+    }
+}
+
+impl<'scene> GLTFMaterial<'scene> {
+    /// Initialize a new GLTF material wrapper
+    #[must_use]
+    pub fn new(
+        material: &'scene Material,
+        tex_coords: [[Float; 2]; 3],
+        normals: Option<[[Float; 3]; 3]>,
+        tangents: Option<[[Float; 4]; 3]>,
+        images: &'scene [Data],
+    ) -> Self {
+        let normals: Option<[Vec3; 3]> = normals.map(|ns| ns.map(Vec3::from));
+        let tangents: Option<[Vec4; 3]> = tangents.map(|ns| ns.map(Vec4::from));
+        let ws: Option<[Float; 3]> = tangents.map(|ts| ts.map(|t| t[3]));
+        let tangents: Option<[Vec3; 3]> = tangents.map(|ts| ts.map(|t| Vec4::xyz(&t)));
+        // TODO: fix this horrendous mess
+        let bitangents = if let Some(normals) = normals {
+            if let Some(tangents) = tangents {
+                ws.map(|ws| {
+                    [
+                        normals[0].cross(&tangents[0]) * ws[0],
+                        normals[1].cross(&tangents[1]) * ws[1],
+                        normals[2].cross(&tangents[2]) * ws[2],
+                    ]
+                })
+            } else {
+                None
+            }
+        } else {
+            None
+        };
+
+        Self {
+            material,
+            tex_coords,
+            normals,
+            tangents,
+            bitangents,
+            images,
+        }
+    }
+}
+
+impl<'scene> MaterialTrait for GLTFMaterial<'scene> {
+    fn scatter(
+        &self,
+        ray: &Ray,
+        hit_record: &HitRecord,
+        rng: &mut SmallRng,
+    ) -> Option<ScatterRecord> {
+        let base_color: LinSrgb = self.sample_base_color(hit_record);
+        let emissive: LinSrgb = self.sample_emissive(hit_record).into_color_unclamped();
+        let (metalness, roughness) = self.sample_metalness_roughness(hit_record);
+        let normal: Vec3 = self.sample_normal(hit_record);
+        let occlusion: Float = self.sample_occlusion(hit_record);
+
+        // TODO: full color model
+        let attenuation: LinSrgb = emissive + base_color * occlusion;
+
+        // TODO: better metalness model
+        if metalness > 0.0 {
+            // TODO: borrowed from metal, should this be different?
+            let reflected: Vec3 = reflect(ray.direction.normalize(), normal);
+            let direction = reflected + roughness * random_unit_vector(rng);
+
+            Some(ScatterRecord {
+                specular_ray: Some(Ray {
+                    origin: hit_record.position,
+                    direction,
+                    time: ray.time,
+                    wavelength: ray.wavelength,
+                }),
+                attenuation,
+                material_type: MaterialType::Specular,
+                pdf_ptr: PDF::ZeroPDF(ZeroPDF::new()),
+            })
+        } else {
+            Some(ScatterRecord {
+                specular_ray: None,
+                attenuation,
+                material_type: MaterialType::Diffuse,
+                pdf_ptr: PDF::ZeroPDF(ZeroPDF::new()),
+            })
+        }
+    }
+
+    fn scattering_pdf(
+        &self,
+        hit_record: &HitRecord,
+        scattered: &Ray,
+        _rng: &mut SmallRng,
+    ) -> Option<Float> {
+        // TODO: what should this be for GLTF materials?
+        // Borrowed from Lambertian
+        let cosine = hit_record.normal.dot(&scattered.direction.normalize());
+        if cosine < 0.0 {
+            None
+        } else {
+            Some(cosine / PI)
+        }
+    }
+}
+
+impl<'scene> GLTFMaterial<'scene> {
+    fn sample_base_color(&self, hit_record: &HitRecord) -> LinSrgb {
+        let base_color_texture = self
+            .material
+            .pbr_metallic_roughness()
+            .base_color_texture()
+            .map(|info| &self.images[info.texture().source().index()]);
+        // TODO: proper fully correct coloring
+        let base_color = match &base_color_texture {
+            Some(texture) => {
+                let (x, y) = self.sample_texture_coords(hit_record, texture);
+                get_color_srgb(texture, x, y)
+            }
+            None => Srgb::new(1.0, 1.0, 1.0),
+        };
+        let base_color_factor: Srgba = self
+            .material
+            .pbr_metallic_roughness()
+            .base_color_factor()
+            .into();
+        let base_color_factor: Srgb = base_color_factor.into_color_unclamped();
+
+        (base_color * base_color_factor).into_color_unclamped()
+    }
+
+    fn sample_emissive(&self, hit_record: &HitRecord) -> Srgb {
+        let emissive_texture = self
+            .material
+            .emissive_texture()
+            .map(|info| &self.images[info.texture().source().index()]);
+        // TODO: proper fully correct coloring
+        let emissive = match &emissive_texture {
+            Some(texture) => {
+                let (x, y) = self.sample_texture_coords(hit_record, texture);
+                get_color_srgb(texture, x, y)
+            }
+            None => Srgb::new(1.0, 1.0, 1.0),
+        };
+        let emissive_factor: Srgb = self.material.emissive_factor().into();
+
+        (emissive * emissive_factor).into_color_unclamped()
+    }
+
+    fn sample_metalness_roughness(&self, hit_record: &HitRecord) -> (Float, Float) {
+        let metallic_roughness_texture = self
+            .material
+            .pbr_metallic_roughness()
+            .metallic_roughness_texture()
+            .map(|info| &self.images[info.texture().source().index()]);
+        let (metalness, roughness) = match &metallic_roughness_texture {
+            Some(texture) => {
+                let (x, y) = self.sample_texture_coords(hit_record, texture);
+                let sampled_color = get_color_linsrgb(texture, x, y);
+                let roughness = sampled_color.green;
+                let metalness = sampled_color.blue;
+                (metalness, roughness)
+            }
+            None => (1.0, 1.0),
+        };
+        let metalness = metalness * self.material.pbr_metallic_roughness().metallic_factor();
+        let roughness = roughness * self.material.pbr_metallic_roughness().roughness_factor();
+        (metalness, roughness)
+    }
+
+    fn sample_occlusion(&self, hit_record: &HitRecord) -> Float {
+        let occlusion_texture = self
+            .material
+            .occlusion_texture()
+            .map(|info| &self.images[info.texture().source().index()]);
+
+        match &occlusion_texture {
+            Some(texture) => {
+                let (x, y) = self.sample_texture_coords(hit_record, texture);
+                let sampled_color = get_color_linsrgb(texture, x, y);
+                // Only the red channel is taken into account
+                sampled_color.red
+            }
+            None => 1.0,
+        }
+    }
+
+    fn sample_normal(&self, hit_record: &HitRecord) -> Vec3 {
+        let Some(normals) = self.normals else {
+            // If we don't have normals, early return with the triangle normal
+            return hit_record.normal;
+        };
+
+        let Some(tangents) = self.tangents else {
+            // If we don't have tangents, early return with the triangle normal
+            // TODO: compute normals here or at construction time as per gltf spec
+            return hit_record.normal;
+        };
+
+        let Some(bitangents) = self.bitangents else {
+            return hit_record.normal;
+        };
+
+        let normal_texture = self
+            .material
+            .normal_texture()
+            .map(|info| &self.images[info.texture().source().index()]);
+        let texture_normal = match &normal_texture {
+            Some(texture) => {
+                let (x, y) = self.sample_texture_coords(hit_record, texture);
+                let sampled_color = get_color_linsrgb(texture, x, y);
+                // Convert from Color to Vec 0..1, scale and move to -1..1
+                let (r, g, b) = sampled_color.into_components();
+                let normal: Vec3 = Vec3::new(r, g, b) * 2.0 - Vec3::new(1.0, 1.0, 1.0);
+                normal.normalize()
+            }
+            // If we don't have a normal texture, early return with the triangle normal
+            None => return hit_record.normal,
+        };
+
+        // Barycentric coordinates and interpolation on the triangle surface
+        let normal = (hit_record.u * normals[1]
+            + hit_record.v * normals[2]
+            + (1.0 - hit_record.u - hit_record.v) * normals[0])
+            .normalize();
+        let tangent = (hit_record.u * tangents[1]
+            + hit_record.v * tangents[2]
+            + (1.0 - hit_record.u - hit_record.v) * tangents[0])
+            .normalize();
+        let bitangent = (hit_record.u * bitangents[1]
+            + hit_record.v * bitangents[2]
+            + (1.0 - hit_record.u - hit_record.v) * bitangents[0])
+            .normalize();
+
+        let matrix: nalgebra::Matrix3<Float> =
+            nalgebra::Matrix3::from_columns(&[tangent, bitangent, normal]);
+
+        // Transform the texture normal from tangent space to world space
+        (matrix * texture_normal).normalize()
+    }
+
+    /// Find the correct texture coordinates in pixel space
+    fn sample_texture_coords(&self, hit_record: &HitRecord, image: &Data) -> (usize, usize) {
+        // Full triangle coordinates on the full texture file
+        let tex_corner0: Vec2 = Vec2::from(self.tex_coords[0]);
+        let tex_corner1: Vec2 = Vec2::from(self.tex_coords[1]);
+        let tex_corner2: Vec2 = Vec2::from(self.tex_coords[2]);
+        // Side vectors on the texture triangle
+        let tex_u: Vec2 = tex_corner1 - tex_corner0;
+        let tex_v: Vec2 = tex_corner2 - tex_corner0;
+        // Specific surface space coordinate for hit point
+        let coord: Vec2 = tex_corner0 + hit_record.u * tex_u + hit_record.v * tex_v;
+        let x = coord[0];
+        let y = coord[1];
+        // TODO: other wrapping modes, this is "repeat"
+        let x = if x < 0.0 { 1.0 + x.fract() } else { x.fract() };
+        let y = if y < 0.0 { 1.0 + y.fract() } else { y.fract() };
+        // Pixel space coordinates on the texture
+        let x = x * (image.width as Float);
+        let y = y * ((image.height - 1) as Float); // TODO: fix overflows better
+
+        // Cast
+        let x = x.floor() as usize;
+        let y = y.floor() as usize;
+        (x, y)
+    }
+}
+
+/// Given a reference to a texture and pixel space coordinates, returns the raw byte triple `(r,g,b)`
+fn sample_texture_raw(texture: &&Data, x: usize, y: usize) -> (u8, u8, u8) {
+    let index = match texture.format {
+        gltf::image::Format::R8G8B8 => 3 * (x + texture.width as usize * y),
+        gltf::image::Format::R8G8B8A8 => 4 * (x + texture.width as usize * y),
+        _ => todo!("Unsupported gltf::image::Format"),
+    };
+    let r = texture.pixels[index];
+    let g = texture.pixels[index + 1];
+    let b = texture.pixels[index + 2];
+    (r, g, b)
+}
+
+/// Given a reference to a texture and pixel space coordinates, returns the color at that pixel, sRGB with gamma.
+fn get_color_srgb(texture: &&Data, x: usize, y: usize) -> Srgb {
+    let (r, g, b) = sample_texture_raw(texture, x, y);
+    let color: Srgb<u8> = Srgb::from_components((r, g, b));
+    color.into_format()
+}
+
+/// Given a reference to a texture and pixel space coordinates, returns the color at that pixel, linear sRGB
+fn get_color_linsrgb(texture: &&Data, x: usize, y: usize) -> LinSrgb {
+    let (r, g, b) = sample_texture_raw(texture, x, y);
+    let color: LinSrgb<u8> = LinSrgb::from_components((r, g, b));
+    color.into_format()
+}
+
\ No newline at end of file diff --git a/src/clovers/materials/isotropic.rs.html b/src/clovers/materials/isotropic.rs.html new file mode 100644 index 00000000..d360fc32 --- /dev/null +++ b/src/clovers/materials/isotropic.rs.html @@ -0,0 +1,121 @@ +isotropic.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+
//! Isotropic material.
+
+use super::{MaterialTrait, MaterialType, ScatterRecord};
+use crate::{
+    hitable::HitRecord,
+    pdf::{SpherePDF, PDF},
+    ray::Ray,
+    textures::{Texture, TextureTrait},
+    Float, PI,
+};
+use rand::prelude::SmallRng;
+
+#[derive(Debug, Clone, Default)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// Isotropic material. Used in [`ConstantMedium`](crate::objects::constant_medium). TODO: understand this!
+pub struct Isotropic {
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    albedo: Texture,
+}
+
+impl MaterialTrait for Isotropic {
+    /// Returns a [`ScatterRecord`] based on the [`HitRecord`] coordinates and the given [Texture], or [None] if the ray did not hit the material.
+    #[must_use]
+    fn scatter(
+        &self,
+        _ray: &Ray,
+        hit_record: &HitRecord,
+        _rng: &mut SmallRng,
+    ) -> Option<ScatterRecord> {
+        let albedo = self
+            .albedo
+            .color(hit_record.u, hit_record.v, hit_record.position);
+
+        Some(ScatterRecord {
+            material_type: MaterialType::Diffuse,
+            specular_ray: None,
+            attenuation: albedo,
+            pdf_ptr: PDF::SpherePDF(SpherePDF::new()),
+        })
+    }
+
+    /// Returns the scattering probability density function for the [Isotropic] material
+    #[must_use]
+    fn scattering_pdf(
+        &self,
+        _hit_record: &HitRecord,
+        _scattered: &Ray,
+        _rng: &mut SmallRng,
+    ) -> Option<Float> {
+        Some(1.0 / (4.0 * PI))
+    }
+}
+
+impl Isotropic {
+    /// Creates a new [Isotropic] material with an albedo of the given [Texture].
+    #[must_use]
+    pub fn new(emission: Texture) -> Self {
+        Isotropic { albedo: emission }
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/materials/lambertian.rs.html b/src/clovers/materials/lambertian.rs.html new file mode 100644 index 00000000..9020abdf --- /dev/null +++ b/src/clovers/materials/lambertian.rs.html @@ -0,0 +1,133 @@ +lambertian.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+
//! Lambertian material. This is the default material with a smooth, matte surface.
+
+use super::{MaterialTrait, MaterialType, ScatterRecord};
+use crate::{
+    hitable::HitRecord,
+    pdf::{CosinePDF, PDF},
+    ray::Ray,
+    textures::{Texture, TextureTrait},
+    Float, PI,
+};
+use rand::prelude::SmallRng;
+
+#[derive(Clone, Debug, Default)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// Lambertian material. This is the default material with a smooth, matte surface.
+pub struct Lambertian {
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    albedo: Texture,
+}
+
+impl MaterialTrait for Lambertian {
+    /// Returns None, if ray is absorbed. Otherwise, returns a ray, albedo of what was hit, and (?) a value used for probability density function based sampling
+    #[must_use]
+    fn scatter(
+        &self,
+        _ray: &Ray,
+        hit_record: &HitRecord,
+        _rng: &mut SmallRng,
+    ) -> Option<ScatterRecord> {
+        Some(ScatterRecord {
+            material_type: MaterialType::Diffuse,
+            specular_ray: None,
+            attenuation: self
+                .albedo
+                .color(hit_record.u, hit_record.v, hit_record.position),
+            pdf_ptr: PDF::CosinePDF(CosinePDF::new(hit_record.normal)),
+        })
+    }
+
+    /// Returns the scattering probability density function for the [Lambertian] material. TODO: explain the math
+    #[must_use]
+    fn scattering_pdf(
+        &self,
+        hit_record: &HitRecord,
+        scattered: &Ray,
+        _rng: &mut SmallRng,
+    ) -> Option<Float> {
+        // TODO: explain the math
+        let cosine = hit_record.normal.dot(&scattered.direction.normalize());
+        if cosine < 0.0 {
+            None
+        } else {
+            Some(cosine / PI)
+        }
+    }
+}
+
+impl Lambertian {
+    /// Creates a new instance of the [Lambertian] material with an albedo of the given [Texture].
+    #[must_use]
+    pub fn new(albedo: impl Into<Texture>) -> Self {
+        Lambertian {
+            albedo: albedo.into(),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/materials/metal.rs.html b/src/clovers/materials/metal.rs.html new file mode 100644 index 00000000..0c0a6499 --- /dev/null +++ b/src/clovers/materials/metal.rs.html @@ -0,0 +1,141 @@ +metal.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+
//! A metal material.
+
+use super::{reflect, MaterialTrait, MaterialType, ScatterRecord};
+use crate::{
+    hitable::HitRecord,
+    pdf::{ZeroPDF, PDF},
+    random::random_unit_vector,
+    ray::Ray,
+    textures::{Texture, TextureTrait},
+    Float, Vec3,
+};
+use rand::prelude::SmallRng;
+
+#[derive(Debug, Clone)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// A metal material. The amount of reflection can be adjusted with the `fuzz` parameter.
+pub struct Metal {
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    albedo: Texture,
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    fuzz: Float,
+}
+
+impl MaterialTrait for Metal {
+    /// Scatter function for the [Metal] material. Metal always reflects, and a specular ray is calculated with some randomness adjusted by the `fuzz` factor. This means the metal can be made more shiny or more matte. The returned [`ScatterRecord`] will have a probability density function of [`ZeroPDF`] and material type of [`MaterialType::Specular`]
+    #[must_use]
+    fn scatter(
+        &self,
+        ray: &Ray,
+        hit_record: &HitRecord,
+        rng: &mut SmallRng,
+    ) -> Option<ScatterRecord> {
+        let reflected: Vec3 = reflect(ray.direction.normalize(), hit_record.normal);
+        Some(ScatterRecord {
+            specular_ray: Some(Ray {
+                origin: hit_record.position,
+                direction: reflected + self.fuzz * random_unit_vector(rng),
+                time: ray.time,
+                wavelength: ray.wavelength,
+            }),
+            attenuation: self
+                .albedo
+                .color(hit_record.u, hit_record.v, hit_record.position),
+            material_type: MaterialType::Specular,
+            pdf_ptr: PDF::ZeroPDF(ZeroPDF::new()),
+        })
+    }
+
+    /// Scattering probability density function for [Metal]. Always returns zero. TODO: why?
+    #[must_use]
+    fn scattering_pdf(
+        &self,
+        _hit_record: &HitRecord,
+        _scattered: &Ray,
+        _rng: &mut SmallRng,
+    ) -> Option<Float> {
+        None // TODO: why does metal never scatter? should it scatter if fuzzy?
+    }
+}
+
+impl Metal {
+    /// Creates a new [Metal] material with the albedo of the given [Texture] and a smoothness-roughness factor specified by `fuzz` parameter.
+    #[must_use]
+    pub fn new(albedo: Texture, fuzz: Float) -> Self {
+        Metal {
+            albedo,
+            fuzz: fuzz.min(1.0),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/normals.rs.html b/src/clovers/normals.rs.html new file mode 100644 index 00000000..96b01471 --- /dev/null +++ b/src/clovers/normals.rs.html @@ -0,0 +1,75 @@ +normals.rs - source
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
+
//! Alternative render method to [colorize](crate::colorize::colorize).
+
+use crate::{hitable::HitableTrait, ray::Ray, scenes::Scene, Float, Vec3, EPSILON_SHADOW_ACNE};
+use palette::LinSrgb;
+use rand::rngs::SmallRng;
+
+/// Rendering function for getting a normal map in tangent space. Sends a [Ray] to the [Scene], sees what it hits, gets the normal at that point, and returns a color based on the normal mapping colorization. Wikipedia: [Normal mapping](https://en.wikipedia.org/wiki/Normal_mapping).
+#[must_use]
+pub fn normal_map(ray: &Ray, scene: &Scene, rng: &mut SmallRng) -> LinSrgb {
+    let Some(hit_record) = scene
+        .hitables
+        .hit(ray, EPSILON_SHADOW_ACNE, Float::MAX, rng)
+    else {
+        // If the ray hits nothing, early return black
+        return LinSrgb::new(0.0, 0.0, 0.0);
+    };
+
+    let normal: Vec3 = hit_record.normal;
+    normal_to_color(normal)
+}
+
+/// Given a surface normal, return a color based on normal mapping colorization.
+#[must_use]
+pub fn normal_to_color(normal: Vec3) -> LinSrgb {
+    // normalize just in case
+    let normal: Vec3 = normal.normalize();
+    // flip the Z and X axes because the wikipedia example uses left-handed coordinate system and my renderer uses a right-handed one for some reason.
+    // TODO: figure out a good coordinate system to use... See also https://twitter.com/FreyaHolmer/status/1325556229410861056
+    let normal: Vec3 = Vec3::new(-normal.x, normal.y, -normal.z);
+    // TODO: verify correctness
+    let r = 0.5 + 0.5 * normal.x; // X -1 to 1 = 0.0 to 1.0
+    let g = 0.5 + 0.5 * normal.y; // Y -1 to 1 = 0.0 to 1.0
+                                  // Z  0 to 1 = 0.0 to 1.0
+    let b = if normal.z < 0.0 { 0.0 } else { normal.z };
+
+    LinSrgb::new(r, g, b)
+}
+
\ No newline at end of file diff --git a/src/clovers/objects.rs.html b/src/clovers/objects.rs.html new file mode 100644 index 00000000..a4e83d0d --- /dev/null +++ b/src/clovers/objects.rs.html @@ -0,0 +1,351 @@ +objects.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+
//! Various literal objects and meta-object utilities for creating content in [Scenes](crate::scenes::Scene).
+
+use crate::{
+    bvhnode::BVHNode,
+    hitable::Hitable,
+    materials::{Material, MaterialInit, SharedMaterial},
+    Box,
+};
+
+pub mod boxy; // avoid keyword
+pub mod constant_medium;
+#[cfg(feature = "gl_tf")]
+pub mod gltf;
+pub mod moving_sphere;
+pub mod quad;
+pub mod rotate;
+pub mod sphere;
+#[cfg(feature = "stl")]
+pub mod stl;
+pub mod translate;
+pub mod triangle;
+
+#[cfg(feature = "gl_tf")]
+pub use self::gltf::*;
+use alloc::vec::Vec;
+pub use boxy::*; // avoid keyword
+pub use constant_medium::*;
+pub use moving_sphere::*;
+pub use quad::*;
+pub use rotate::*;
+pub use sphere::*;
+#[cfg(feature = "stl")]
+pub use stl::*;
+#[cfg(feature = "traces")]
+use tracing::warn;
+pub use translate::*;
+pub use triangle::*;
+
+// TODO: This is kind of an ugly hack, having to double-implement various structures to have an external representation vs internal representation. How could this be made cleaner?
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// A list of objects. Allows multiple objects to be used e.g. in a Rotate or Translate object as the target.
+pub struct ObjectList {
+    /// Priority
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// The encased [Object] list
+    pub objects: Vec<Object>,
+}
+
+#[derive(Clone, Debug)]
+/// An object enum. TODO: for ideal clean abstraction, this should be a trait. However, that comes with some additional considerations, including e.g. performance.
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "serde-derive", serde(tag = "kind"))]
+pub enum Object {
+    /// Boxy object initializer
+    Boxy(BoxyInit),
+    /// ConstantMedium object initializer
+    ConstantMedium(ConstantMediumInit),
+    /// MovingSphere object initializer
+    MovingSphere(MovingSphereInit),
+    /// ObjectList object initializer
+    ObjectList(ObjectList),
+    /// Quad object initializer
+    Quad(QuadInit),
+    /// RotateY object initializer
+    RotateY(RotateInit),
+    /// Sphere object initializer
+    Sphere(SphereInit),
+    #[cfg(feature = "stl")]
+    /// STL object initializer
+    STL(STLInit),
+    #[cfg(feature = "gl_tf")]
+    /// GLTF object initializer
+    GLTF(GLTFInit),
+    /// Translate object initializer
+    Translate(TranslateInit),
+    /// Triangle object initializer
+    Triangle(TriangleInit),
+}
+
+#[must_use]
+/// Initializes an `Object` into a `Hitable`.
+pub fn object_to_hitable(obj: Object, materials: &[SharedMaterial]) -> Hitable<'_> {
+    // TODO: reduce repetition!
+
+    match obj {
+        Object::Boxy(x) => {
+            let material = initialize_material(x.material, materials);
+            Hitable::Boxy(Boxy::new(x.corner_0, x.corner_1, material))
+        }
+        Object::ConstantMedium(x) => {
+            let obj = *x.boundary;
+            let obj: Hitable = object_to_hitable(obj, materials);
+            Hitable::ConstantMedium(ConstantMedium::new(Box::new(obj), x.density, x.texture))
+        }
+        Object::MovingSphere(x) => {
+            let material = initialize_material(x.material, materials);
+            Hitable::MovingSphere(MovingSphere::new(
+                // TODO: time
+                x.center_0, x.center_1, 0.0, 1.0, x.radius, material,
+            ))
+        }
+        Object::ObjectList(x) => {
+            let objects: Vec<Hitable> = x
+                .objects
+                .iter()
+                .map(|object| -> Hitable { object_to_hitable(object.clone(), materials) })
+                .collect();
+            let bvh = BVHNode::from_list(objects, 0.0, 1.0);
+            Hitable::BVHNode(bvh)
+        }
+        Object::Quad(x) => {
+            let material = initialize_material(x.material, materials);
+            Hitable::Quad(Quad::new(x.q, x.u, x.v, material))
+        }
+        Object::RotateY(x) => {
+            let obj = *x.object;
+            let obj: Hitable = object_to_hitable(obj, materials);
+            Hitable::RotateY(RotateY::new(Box::new(obj), x.angle))
+        }
+        Object::Sphere(x) => {
+            let material = initialize_material(x.material, materials);
+            Hitable::Sphere(Sphere::new(x.center, x.radius, material))
+        }
+        #[cfg(feature = "stl")]
+        Object::STL(stl_init) => Hitable::STL(initialize_stl(stl_init, materials)),
+        #[cfg(feature = "gl_tf")]
+        Object::GLTF(x) => {
+            // TODO: time
+            Hitable::GLTF(GLTF::new(x, 0.0, 1.0))
+        }
+        Object::Translate(x) => {
+            let obj = *x.object;
+            let obj: Hitable = object_to_hitable(obj, materials);
+            Hitable::Translate(Translate::new(Box::new(obj), x.offset))
+        }
+        Object::Triangle(x) => {
+            let material = initialize_material(x.material, materials);
+            Hitable::Triangle(Triangle::new(x.q, x.u, x.v, material))
+        }
+    }
+}
+
+fn initialize_material<'scene>(
+    material_init: MaterialInit,
+    materials: &'scene [SharedMaterial],
+) -> &Material {
+    let material: &Material = match material_init {
+        MaterialInit::Owned(m) => {
+            // TODO: do not leak memory
+            let material: &'scene Material = Box::leak(Box::new(m));
+            material
+        }
+        MaterialInit::Shared(name) => {
+            // Find material by name. If the name is not found, use the default material
+            if let Some(m) = &materials.iter().find(|m| m.name == name) {
+                &m.material
+            } else {
+                #[cfg(feature = "traces")]
+                warn!(
+                    "shared material `{}` not found, using default material",
+                    name
+                );
+                &materials
+                    .iter()
+                    .find(|m| m.name.is_empty())
+                    .unwrap()
+                    .material
+            }
+        }
+    };
+    material
+}
+
\ No newline at end of file diff --git a/src/clovers/objects/boxy.rs.html b/src/clovers/objects/boxy.rs.html new file mode 100644 index 00000000..2984cf7a --- /dev/null +++ b/src/clovers/objects/boxy.rs.html @@ -0,0 +1,277 @@ +boxy.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+
//! A box or a cuboid object: a parallelepiped with six rectangular faces. Named [Boxy] to avoid clashing with [Box].
+
+use super::Quad;
+use crate::{
+    aabb::AABB,
+    hitable::{HitRecord, Hitable, HitableTrait},
+    materials::{Material, MaterialInit},
+    ray::Ray,
+    wavelength::Wavelength,
+    Box, Float, Vec3,
+};
+use rand::{rngs::SmallRng, Rng};
+
+/// `BoxyInit` structure describes the necessary data for constructing a [Boxy]. Used with [serde] when importing [`SceneFile`](crate::scenes::SceneFile)s.
+#[derive(Debug, Clone)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct BoxyInit {
+    /// Used for multiple importance sampling
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// First corner for the box
+    pub corner_0: Vec3,
+    /// Second, opposing corner for the box
+    pub corner_1: Vec3,
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    /// Material used for the box
+    pub material: MaterialInit,
+}
+
+/// A box or a cuboid object: a parallelepiped with six rectangular faces. Named [Boxy] to avoid clashing with [Box].
+#[derive(Debug, Clone)]
+pub struct Boxy<'scene> {
+    sides: Box<[Hitable<'scene>; 6]>,
+    /// The material of the box
+    pub material: &'scene Material,
+    /// Axis-aligned bounding box
+    pub aabb: AABB,
+}
+
+impl<'scene> Boxy<'scene> {
+    /// Initializes a new instance of a box, given two opposing [Vec3] corners `corner_0` and `corner_1`, and a [Material] `material`.
+    #[must_use]
+    pub fn new(corner_0: Vec3, corner_1: Vec3, material: &'scene Material) -> Self {
+        // Construct the two opposite vertices with the minimum and maximum coordinates.
+        let min: Vec3 = Vec3::new(
+            corner_0.x.min(corner_1.x),
+            corner_0.y.min(corner_1.y),
+            corner_0.z.min(corner_1.z),
+        );
+        let max: Vec3 = Vec3::new(
+            corner_0.x.max(corner_1.x),
+            corner_0.y.max(corner_1.y),
+            corner_0.z.max(corner_1.z),
+        );
+
+        let dx: Vec3 = Vec3::new(max.x - min.x, 0.0, 0.0);
+        let dy: Vec3 = Vec3::new(0.0, max.y - min.y, 0.0);
+        let dz: Vec3 = Vec3::new(0.0, 0.0, max.z - min.z);
+
+        let sides: [Hitable; 6] = [
+            // front
+            Hitable::Quad(Quad::new(Vec3::new(min.x, min.y, max.z), dx, dy, material)),
+            // right
+            Hitable::Quad(Quad::new(Vec3::new(max.x, min.y, max.z), -dz, dy, material)),
+            // back
+            Hitable::Quad(Quad::new(Vec3::new(max.x, min.y, min.z), -dx, dy, material)),
+            // left
+            Hitable::Quad(Quad::new(Vec3::new(min.x, min.y, min.z), dz, dy, material)),
+            // top
+            Hitable::Quad(Quad::new(Vec3::new(min.x, max.y, max.z), dx, -dz, material)),
+            // bottom
+            Hitable::Quad(Quad::new(Vec3::new(min.x, min.y, min.z), dx, dz, material)),
+        ];
+        // AABB
+        let aabb = AABB::new_from_coords(corner_0, corner_1);
+
+        Boxy {
+            sides: Box::new(sides),
+            material,
+            aabb,
+        }
+    }
+}
+
+impl<'scene> HitableTrait for Boxy<'scene> {
+    /// The main `hit` function for a [Boxy]. Given a [Ray](crate::ray::Ray), and an interval `distance_min` and `distance_max`, returns either `None` or `Some(HitRecord)` based on whether the ray intersects with the object during that interval.
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        // start with an empty hit_record, hit all sides, return closest
+        let mut hit_record: Option<HitRecord> = None;
+        let mut closest = distance_max;
+        for hitable in &*self.sides {
+            if let Some(record) = hitable.hit(ray, distance_min, closest, rng) {
+                closest = record.distance;
+                hit_record = Some(record);
+            }
+        }
+        hit_record
+    }
+
+    /// Returns the axis-aligned bounding box [AABB] of the object.
+    #[must_use]
+    fn bounding_box(&self, _t0: Float, _t1: Float) -> Option<&AABB> {
+        Some(&self.aabb)
+    }
+
+    /// Returns a probability density function value? // TODO: understand & explain
+    #[must_use]
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        let mut sum = 0.0;
+
+        self.sides.iter().for_each(|object| {
+            sum += object.pdf_value(origin, vector, wavelength, time, rng) / 6.0;
+        });
+
+        sum
+    }
+
+    /// Returns a random point on the box
+    #[must_use]
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        let index: usize = rng.gen_range(0..6);
+        self.sides[index].random(origin, rng)
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/objects/constant_medium.rs.html b/src/clovers/objects/constant_medium.rs.html new file mode 100644 index 00000000..164de0cd --- /dev/null +++ b/src/clovers/objects/constant_medium.rs.html @@ -0,0 +1,321 @@ +constant_medium.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+
//! `ConstantMedium` object. This should probably be a [Material] at some point, but this will do for now. This is essentially a fog with a known size, shape and density.
+
+use crate::{
+    aabb::AABB,
+    hitable::{HitRecord, Hitable, HitableTrait},
+    materials::{isotropic::Isotropic, Material},
+    random::random_unit_vector,
+    ray::Ray,
+    textures::Texture,
+    wavelength::Wavelength,
+    Box, Float, Vec3, EPSILON_CONSTANT_MEDIUM,
+};
+use rand::rngs::SmallRng;
+use rand::Rng;
+
+use super::Object;
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// `ConstantMediumInit` structure describes the necessary data for constructing a [`ConstantMedium`]. Used with [serde] when importing [`SceneFiles`](crate::scenes::SceneFile).
+pub struct ConstantMediumInit {
+    /// Used for multiple importance sampling
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// The boundary object for the constant medium. This determines the size and shape of the fog object.
+    pub boundary: Box<Object>,
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_density"))]
+    /// Density of the fog. TODO: example good value range?
+    pub density: Float,
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    /// [Texture] used for the colorization of the fog.
+    pub texture: Texture,
+}
+
+#[cfg(feature = "serde-derive")]
+// TODO: does this density setting even work?
+fn default_density() -> Float {
+    0.1
+    // 1e-9
+    // 1e9
+}
+
+#[derive(Debug, Clone)]
+/// `ConstantMedium` object. This should probably be a [Material] at some point, but this will do for now. This is essentially a fog with a known size, shape and density.
+pub struct ConstantMedium<'scene> {
+    boundary: Box<Hitable<'scene>>,
+    phase_function: Material,
+    neg_inv_density: Float,
+}
+
+impl<'scene> ConstantMedium<'scene> {
+    /// Creates a new [`ConstantMedium`] with a known size, shape and density.
+    #[must_use]
+    pub fn new(boundary: Box<Hitable<'scene>>, density: Float, texture: Texture) -> Self {
+        ConstantMedium {
+            boundary,
+            phase_function: Material::Isotropic(Isotropic::new(texture)),
+            neg_inv_density: -1.0 / density,
+        }
+    }
+}
+
+impl<'scene> HitableTrait for ConstantMedium<'scene> {
+    /// Hit function for the [`ConstantMedium`] object. Returns a [`HitRecord`] if hit. TODO: explain the math for the fog
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        // TODO: explain how the fog works.
+
+        let Some(mut rec1) = self
+            .boundary
+            .hit(ray, Float::NEG_INFINITY, Float::INFINITY, rng)
+        else {
+            return None;
+        };
+
+        let Some(mut rec2) = self.boundary.hit(
+            ray,
+            rec1.distance + EPSILON_CONSTANT_MEDIUM,
+            Float::INFINITY,
+            rng,
+        ) else {
+            return None;
+        };
+
+        if rec1.distance < distance_min {
+            rec1.distance = distance_min;
+        }
+        if rec2.distance > distance_max {
+            rec2.distance = distance_max;
+        }
+
+        if rec1.distance >= rec2.distance {
+            return None;
+        }
+
+        if rec1.distance < 0.0 {
+            rec1.distance = 0.0;
+        }
+
+        let ray_length: Float = ray.direction.norm();
+        let distance_inside_boundary: Float = (rec2.distance - rec1.distance) * ray_length;
+        let hit_distance: Float = self.neg_inv_density * (rng.gen::<Float>()).ln(); // TODO: verify if log_e is correct here
+
+        if hit_distance > distance_inside_boundary {
+            return None;
+        }
+
+        let distance = rec1.distance + hit_distance / ray_length;
+        let position = ray.evaluate(distance);
+
+        let normal: Vec3 = random_unit_vector(rng); // tutorial says: arbitrary
+        let front_face: bool = true; // tutorial says: also arbitrary
+
+        let u = rec1.u;
+        let v = rec1.v;
+
+        Some(HitRecord {
+            distance,
+            position,
+            normal,
+            u,
+            v,
+            material: &self.phase_function,
+            front_face,
+        })
+    }
+
+    /// Returns the axis-aligned bounding box [AABB] of the defining `boundary` object for the fog.
+    #[must_use]
+    fn bounding_box(&self, t0: Float, t1: Float) -> Option<&AABB> {
+        self.boundary.bounding_box(t0, t1)
+    }
+
+    /// Returns a probability density function value based on the boundary object
+    #[must_use]
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        self.boundary
+            .pdf_value(origin, vector, wavelength, time, rng)
+    }
+
+    /// Returns a random point on the surface of the boundary of the fog
+    // TODO: should this return a random point inside the volume instead?
+    #[must_use]
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        self.boundary.random(origin, rng)
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/objects/gltf.rs.html b/src/clovers/objects/gltf.rs.html new file mode 100644 index 00000000..4440b16c --- /dev/null +++ b/src/clovers/objects/gltf.rs.html @@ -0,0 +1,773 @@ +gltf.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+
//! GLTF format support for the renderer
+
+use alloc::string::String;
+use alloc::vec::Vec;
+#[cfg(feature = "gl_tf")]
+use gltf::{image::Data, Mesh, Node};
+use rand::rngs::SmallRng;
+use rand::Rng;
+#[cfg(feature = "traces")]
+use tracing::debug;
+
+use crate::{
+    aabb::AABB,
+    bvhnode::BVHNode,
+    hitable::{get_orientation, HitRecord, Hitable, HitableTrait},
+    interval::Interval,
+    materials::gltf::GLTFMaterial,
+    ray::Ray,
+    wavelength::Wavelength,
+    Float, Vec3, EPSILON_RECT_THICKNESS, EPSILON_SHADOW_ACNE,
+};
+
+/// GLTF initialization structure
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct GLTFInit {
+    /// Used for multiple importance sampling
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// Path of the .gltf file
+    pub path: String,
+}
+
+impl<'scene> From<GLTFInit> for Vec<Hitable<'scene>> {
+    fn from(gltf: GLTFInit) -> Self {
+        let mut hitables: Vec<Hitable> = Vec::new();
+
+        // Go through the objects in the gltf file
+        let (document, buffers, images) = gltf::import(gltf.path).unwrap();
+        let document: &'scene gltf::Document = Box::leak(Box::new(document));
+        let images: &'scene Vec<Data> = Box::leak(Box::new(images));
+        let materials: &'scene Vec<gltf::Material> =
+            Box::leak(Box::new(document.materials().collect()));
+
+        for scene in document.scenes() {
+            debug!("found scene");
+            for node in scene.nodes() {
+                debug!("found node");
+                parse_node(&node, &mut hitables, &buffers, materials, images);
+            }
+        }
+        debug!("hitable count: {}", &hitables.len());
+
+        hitables
+    }
+}
+
+/// Internal GLTF object representation after initialization.
+#[derive(Debug, Clone)]
+pub struct GLTF<'scene> {
+    /// Bounding Volume Hierarchy tree for the object
+    pub bvhnode: BVHNode<'scene>,
+    /// Axis-aligned bounding box of the object
+    pub aabb: AABB,
+}
+
+impl<'scene> GLTF<'scene> {
+    #[must_use]
+    /// Create a new STL object with the given initialization parameters.
+    pub fn new(gltf_init: GLTFInit, time_0: Float, time_1: Float) -> Self {
+        let triangles: Vec<Hitable> = gltf_init.into();
+        let bvhnode = BVHNode::from_list(triangles, time_0, time_1);
+        // TODO: remove unwrap
+        let aabb = bvhnode.bounding_box(time_0, time_1).unwrap().clone();
+
+        GLTF { bvhnode, aabb }
+    }
+}
+
+impl<'scene> HitableTrait for GLTF<'scene> {
+    /// Hit method for the GLTF object
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: f32,
+        distance_max: f32,
+        rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        self.bvhnode.hit(ray, distance_min, distance_max, rng)
+    }
+
+    /// Return the axis-aligned bounding box for the object
+    #[must_use]
+    fn bounding_box(&self, _t0: f32, _t1: f32) -> Option<&AABB> {
+        Some(&self.aabb)
+    }
+
+    /// Returns a probability density function value based on the object
+    #[must_use]
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        self.bvhnode
+            .pdf_value(origin, vector, wavelength, time, rng)
+    }
+
+    /// Returns a random point on the ssurface of the object
+    #[must_use]
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        self.bvhnode.random(origin, rng)
+    }
+}
+
+fn parse_node<'scene>(
+    node: &Node,
+    objects: &mut Vec<Hitable<'scene>>,
+    buffers: &Vec<gltf::buffer::Data>,
+    materials: &'scene Vec<gltf::Material>,
+    images: &'scene Vec<Data>,
+) {
+    // Handle direct meshes
+    if let Some(mesh) = node.mesh() {
+        parse_mesh(&mesh, objects, buffers, materials, images);
+    }
+    // Handle nesting
+    for child in node.children() {
+        parse_node(&child, objects, buffers, materials, images);
+    }
+}
+
+fn parse_mesh<'scene>(
+    mesh: &Mesh,
+    objects: &mut Vec<Hitable<'scene>>,
+    buffers: &[gltf::buffer::Data],
+    materials: &'scene [gltf::Material],
+    images: &'scene [Data],
+) {
+    debug!("found mesh");
+    for primitive in mesh.primitives() {
+        debug!("found primitive");
+        match primitive.mode() {
+            gltf::mesh::Mode::Triangles => {
+                let mut trianglelist: Vec<Hitable> = Vec::new();
+
+                let reader = primitive.reader(|buffer| Some(&buffers[buffer.index()]));
+                let mut all_positions: Vec<Vec3> = Vec::new();
+                if let Some(iter) = reader.read_positions() {
+                    for vertex_position in iter {
+                        all_positions.push(vertex_position.into());
+                    }
+                }
+
+                // Note that in the GLTF format the same positions can be re-used for multiple triangles, as a sort of a compression method
+                // Read the indices array in order to assemble triangles from positions
+                if let Some(accessor) = reader.read_indices() {
+                    let accessor = accessor.into_u32();
+                    let len = accessor.len();
+                    let indices: Vec<u32> = accessor.collect();
+                    let indices: Vec<usize> = indices.iter().map(|&x| x as usize).collect();
+                    let mut i = 0;
+                    let material_index = primitive.material().index().unwrap();
+                    let material = &materials[material_index];
+
+                    let coordset = match material.pbr_metallic_roughness().base_color_texture() {
+                        Some(texture) => texture.tex_coord(),
+                        None => 0,
+                    };
+                    let all_tex_coords: Vec<[Float; 2]> = reader
+                        .read_tex_coords(coordset)
+                        .unwrap()
+                        .into_f32()
+                        .collect();
+                    let all_normals: Option<Vec<_>> =
+                        reader.read_normals().map(core::iter::Iterator::collect);
+                    let all_tangents: Option<Vec<_>> =
+                        reader.read_tangents().map(core::iter::Iterator::collect);
+
+                    while i < len {
+                        let triangle = [
+                            all_positions[indices[i]],
+                            all_positions[indices[i + 1]],
+                            all_positions[indices[i + 2]],
+                        ];
+                        let tex_coords = [
+                            all_tex_coords[indices[i]],
+                            all_tex_coords[indices[i + 1]],
+                            all_tex_coords[indices[i + 2]],
+                        ];
+                        let normals = all_normals.as_ref().map(|normals| {
+                            [
+                                normals[indices[i]],
+                                normals[indices[i + 1]],
+                                normals[indices[i + 2]],
+                            ]
+                        });
+                        let tangents = all_tangents.as_ref().map(|tangents| {
+                            [
+                                tangents[indices[i]],
+                                tangents[indices[i + 1]],
+                                tangents[indices[i + 2]],
+                            ]
+                        });
+
+                        // TODO: don't leak memory
+                        let material: &'scene GLTFMaterial = Box::leak(Box::new(
+                            GLTFMaterial::new(material, tex_coords, normals, tangents, images),
+                        ));
+
+                        let gltf_triangle = GLTFTriangle::new(triangle, material);
+                        trianglelist.push(Hitable::GLTFTriangle(gltf_triangle));
+                        i += 3;
+                    }
+                }
+
+                let bvh: BVHNode = BVHNode::from_list(trianglelist, 0.0, 1.0);
+                objects.push(Hitable::BVHNode(bvh));
+            }
+            _ => unimplemented!(),
+        }
+    }
+}
+
+/// Internal GLTF object representation after initialization.
+#[derive(Debug, Clone)]
+pub struct GLTFTriangle<'scene> {
+    /// Axis-aligned bounding box of the object
+    pub aabb: AABB,
+    /// Material of the object
+    pub material: &'scene GLTFMaterial<'scene>,
+    q: Vec3,
+    u: Vec3,
+    v: Vec3,
+    d: Float,
+    w: Vec3,
+    area: Float,
+    normal: Vec3,
+}
+
+impl<'scene> GLTFTriangle<'scene> {
+    #[must_use]
+    /// Initialize a new GLTF object
+    pub fn new(triangle: [Vec3; 3], material: &'scene GLTFMaterial<'scene>) -> Self {
+        // TODO: mostly adapted from Triangle, verify correctness!
+
+        let [a, b, c] = triangle;
+        let interval_x = Interval::new(a[0].min(b[0]).min(c[0]), a[0].max(b[0]).max(c[0]));
+        let interval_y = Interval::new(a[1].min(b[1]).min(c[1]), a[1].max(b[1]).max(c[1]));
+        let interval_z = Interval::new(a[2].min(b[2]).min(c[2]), a[2].max(b[2]).max(c[2]));
+        let mut aabb: AABB = AABB::new(interval_x, interval_y, interval_z);
+        aabb.pad();
+
+        // TODO: Check orientation and make into a corner + edge vectors triangle
+        let q = a;
+        let u = b - q;
+        let v = c - q;
+
+        let n: Vec3 = u.cross(&v);
+        let normal: Vec3 = n.normalize();
+        // TODO: what is this?
+        let d = -(normal.dot(&q));
+        // TODO: what is this?
+        let w: Vec3 = n / n.dot(&n);
+        // Compared to quad, triangle has half the area
+        let area = n.magnitude() / 2.0;
+
+        GLTFTriangle {
+            aabb,
+            material,
+            q,
+            u,
+            v,
+            d,
+            w,
+            area,
+            normal,
+        }
+    }
+}
+
+impl<'scene> HitableTrait for GLTFTriangle<'scene> {
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        _rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        // TODO: mostly adapted from Triangle, verify correctness!
+
+        let denom = self.normal.dot(&ray.direction);
+
+        // No hit if the ray is parallel to the plane.
+        if denom.abs() < EPSILON_RECT_THICKNESS {
+            return None;
+        }
+
+        // Return false if the hit point parameter t is outside the ray interval
+        let t = (-self.d - self.normal.dot(&ray.origin)) / denom;
+        if t < distance_min || t > distance_max {
+            return None;
+        }
+
+        // Determine the hit point lies within the planar shape using its plane coordinates.
+        let intersection: Vec3 = ray.evaluate(t);
+        let planar_hitpt_vector: Vec3 = intersection - self.q;
+        let alpha: Float = self.w.dot(&planar_hitpt_vector.cross(&self.v));
+        let beta: Float = self.w.dot(&self.u.cross(&planar_hitpt_vector));
+
+        // Do we hit a coordinate within the surface of the plane?
+        if !hit_ab(alpha, beta) {
+            return None;
+        }
+
+        // Ray hits the 2D shape; set the rest of the hit record and return
+
+        let (front_face, normal) = get_orientation(ray, self.normal);
+
+        Some(HitRecord {
+            distance: t,
+            position: intersection,
+            normal,
+            u: alpha,
+            v: beta,
+            material: self.material,
+            front_face,
+        })
+    }
+
+    fn bounding_box(&self, _t0: Float, _t1: Float) -> Option<&AABB> {
+        Some(&self.aabb)
+    }
+
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        let ray = Ray {
+            origin,
+            direction: vector,
+            time,
+            wavelength,
+        };
+        // TODO: this is from quad and not updated!
+        match self.hit(&ray, EPSILON_SHADOW_ACNE, Float::INFINITY, rng) {
+            Some(hit_record) => {
+                let distance_squared =
+                    hit_record.distance * hit_record.distance * vector.norm_squared();
+                let cosine = vector.dot(&hit_record.normal).abs() / vector.magnitude();
+
+                distance_squared / (cosine * self.area)
+            }
+            None => 0.0,
+        }
+    }
+
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        let mut a = rng.gen::<Float>();
+        let mut b = rng.gen::<Float>();
+        if a + b > 1.0 {
+            a = 1.0 - a;
+            b = 1.0 - b;
+        }
+
+        let point: Vec3 = self.q + (a * self.u) + (b * self.v);
+
+        point - origin
+    }
+}
+
+#[must_use]
+fn hit_ab(a: Float, b: Float) -> bool {
+    // Given the hit point in plane coordinates, return false if it is outside the
+    // primitive, otherwise return true.
+    // Triangle: a+b must be <=1.0
+    (0.0..=1.0).contains(&a) && (0.0..=1.0).contains(&b) && (a + b <= 1.0)
+}
+
\ No newline at end of file diff --git a/src/clovers/objects/moving_sphere.rs.html b/src/clovers/objects/moving_sphere.rs.html new file mode 100644 index 00000000..e5d9a280 --- /dev/null +++ b/src/clovers/objects/moving_sphere.rs.html @@ -0,0 +1,365 @@ +moving_sphere.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+
//! A moving sphere object.
+
+use crate::{
+    aabb::AABB,
+    hitable::{HitRecord, HitableTrait},
+    materials::{Material, MaterialInit},
+    random::random_unit_vector,
+    ray::Ray,
+    wavelength::Wavelength,
+    Float, Vec3, PI,
+};
+use rand::rngs::SmallRng;
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// `SphereInit` structure describes the necessary data for constructing a [`Sphere`](super::Sphere). Used with [serde] when importing [`SceneFile`](crate::scenes::SceneFile)s.
+pub struct MovingSphereInit {
+    /// Used for multiple importance sampling
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// Center point of the sphere at time_0
+    pub center_0: Vec3,
+    /// Center point of the sphere at time_1
+    pub center_1: Vec3,
+    /// Radius of the sphere.
+    pub radius: Float,
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    /// Material of the sphere.
+    pub material: MaterialInit,
+}
+
+#[derive(Debug, Clone)]
+/// A moving sphere object. This is represented by one `radius`, two center points `center_0` `center_1`, two times `time_0` `time_1`, and a [Material]. Any [Rays](Ray) hitting the object will also have an internal `time` value, which will be used for determining the interpolated position of the sphere at that time. With lots of rays hitting every pixel but at randomized times, we get temporal multiplexing and an approximation of perceived motion blur.
+pub struct MovingSphere<'scene> {
+    /// Center point of the sphere at time_0
+    pub center_0: Vec3,
+    /// Center point of the sphere at time_1
+    pub center_1: Vec3,
+    /// Time 0
+    pub time_0: Float,
+    /// Time 1
+    pub time_1: Float,
+    /// Radius of the sphere
+    pub radius: Float,
+    /// Material of the sphere
+    pub material: &'scene Material,
+    /// Axis-aligned bounding box
+    pub aabb: AABB,
+}
+
+impl<'scene> MovingSphere<'scene> {
+    /// Creates a new `MovingSphere` object. See the struct documentation for more information: [`MovingSphere`].
+    #[must_use]
+    pub fn new(
+        center_0: Vec3,
+        center_1: Vec3,
+        time_0: Float,
+        time_1: Float,
+        radius: Float,
+        material: &'scene Material,
+    ) -> Self {
+        let box0: AABB = AABB::new_from_coords(
+            center_0 - Vec3::new(radius, radius, radius),
+            center_0 + Vec3::new(radius, radius, radius),
+        );
+        let box1: AABB = AABB::new_from_coords(
+            center_1 - Vec3::new(radius, radius, radius),
+            center_1 + Vec3::new(radius, radius, radius),
+        );
+
+        let aabb = AABB::surrounding_box(&box0, &box1);
+
+        MovingSphere {
+            center_0,
+            center_1,
+            time_0,
+            time_1,
+            radius,
+            material,
+            aabb,
+        }
+    }
+
+    /// Returns the interpolated center of the moving sphere at the given time.
+    #[must_use]
+    pub fn center(&self, time: Float) -> Vec3 {
+        self.center_0
+            + ((time - self.time_0) / (self.time_1 - self.time_0)) * (self.center_1 - self.center_0)
+    }
+
+    /// Returns the U,V surface coordinates of a hitpoint
+    // TODO: verify this is up to date with the sphere get_uv methods and matches a surface coordinate instead of volumetric space cordinate
+    #[must_use]
+    pub fn get_uv(&self, hit_position: Vec3, time: Float) -> (Float, Float) {
+        let translated: Vec3 = (hit_position - self.center(time)) / self.radius;
+        let phi: Float = translated.z.atan2(translated.x);
+        let theta: Float = translated.y.asin();
+        let u: Float = 1.0 - (phi + PI) / (2.0 * PI);
+        let v: Float = (theta + PI / 2.0) / PI;
+        (u, v)
+    }
+}
+
+impl<'scene> HitableTrait for MovingSphere<'scene> {
+    /// Hit method for the [`MovingSphere`] object. First gets the interpolated center position at the given time, then follows the implementation of [Sphere](crate::objects::Sphere) object's hit method.
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        _rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        let oc = ray.origin - self.center(ray.time);
+        let a: Float = ray.direction.norm_squared();
+        let half_b: Float = oc.dot(&ray.direction);
+        let c: Float = oc.norm_squared() - self.radius * self.radius;
+        let discriminant = half_b * half_b - a * c;
+        if discriminant > 0.0 {
+            let root: Float = discriminant.sqrt();
+            let distance: Float = (-half_b - root) / a;
+            // First possible root
+            if distance < distance_max && distance > distance_min {
+                let position: Vec3 = ray.evaluate(distance);
+                let outward_normal = (position - self.center(ray.time)) / self.radius;
+                let (u, v) = self.get_uv(position, ray.time);
+                let mut record = HitRecord {
+                    distance,
+                    position,
+                    normal: outward_normal,
+                    u,
+                    v,
+                    material: self.material,
+                    front_face: false, // TODO: fix having to declare it before calling face_normal
+                };
+                record.set_face_normal(ray, outward_normal);
+                return Some(record);
+            }
+            // Second possible root
+            let distance: Float = (-half_b + root) / a;
+            if distance < distance_max && distance > distance_min {
+                let position: Vec3 = ray.evaluate(distance);
+                let outward_normal = (position - self.center(ray.time)) / self.radius;
+                let (u, v) = self.get_uv(position, ray.time);
+                let mut record = HitRecord {
+                    distance,
+                    position,
+                    normal: outward_normal,
+                    u,
+                    v,
+                    material: self.material,
+                    front_face: false, // TODO: fix having to declare it before calling face_normal
+                };
+                record.set_face_normal(ray, outward_normal);
+                return Some(record);
+            }
+        }
+        None
+    }
+
+    /// Returns the axis-aligned bounding box of the [`MovingSphere`] object. This is the maximum possible bounding box of the entire span of the movement of the sphere, calculated from the two center positions and the radius.
+    #[must_use]
+    fn bounding_box(&self, _t0: Float, _t1: Float) -> Option<&AABB> {
+        Some(&self.aabb)
+    }
+
+    fn pdf_value(
+        &self,
+        _origin: Vec3,
+        _vector: Vec3,
+        _wavelength: Wavelength,
+        _time: Float,
+        _rng: &mut SmallRng,
+    ) -> Float {
+        // TODO: fix
+        0.0
+    }
+
+    fn random(&self, _origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        random_unit_vector(rng)
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/objects/quad.rs.html b/src/clovers/objects/quad.rs.html new file mode 100644 index 00000000..4581e993 --- /dev/null +++ b/src/clovers/objects/quad.rs.html @@ -0,0 +1,361 @@ +quad.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+
//! A quadrilateral object.
+// TODO: better docs
+
+use crate::hitable::HitableTrait;
+use crate::materials::MaterialInit;
+use crate::wavelength::Wavelength;
+use crate::EPSILON_SHADOW_ACNE;
+use crate::{
+    aabb::AABB, hitable::get_orientation, hitable::HitRecord, materials::Material, ray::Ray, Float,
+    Vec3, EPSILON_RECT_THICKNESS,
+};
+use rand::rngs::SmallRng;
+use rand::Rng;
+
+/// Initialization structure for a Quad object.
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct QuadInit {
+    /// Used for multiple importance sampling
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// Corner point
+    pub q: Vec3,
+    /// Vector describing the u side
+    pub u: Vec3,
+    /// Vector describing the v side
+    pub v: Vec3,
+    /// Material of the surface
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub material: MaterialInit,
+}
+
+/// Quadrilateral shape. This can be an arbitrary parallelogram, not just a rectangle.
+#[derive(Clone, Debug)]
+pub struct Quad<'scene> {
+    /// Corner point
+    pub q: Vec3,
+    /// Vector describing the u side
+    pub u: Vec3,
+    /// Vector describing the v side
+    pub v: Vec3,
+    /// Material of the surface
+    pub material: &'scene Material,
+    /// Area of the surface
+    pub area: Float,
+    /// Normal vector of the surface
+    pub normal: Vec3,
+    /// What is this? // TODO: understand, explain
+    pub d: Float,
+    /// What is this? // TODO: understand, explain
+    pub w: Vec3,
+    /// Bounding box of the surface
+    pub aabb: AABB,
+}
+
+impl<'scene> Quad<'scene> {
+    /// Creates a new quad
+    #[must_use]
+    pub fn new(q: Vec3, u: Vec3, v: Vec3, material: &'scene Material) -> Quad<'scene> {
+        let n: Vec3 = u.cross(&v);
+        let normal: Vec3 = n.normalize();
+        // TODO: what is this?
+        let d = -(normal.dot(&q));
+        // TODO: what is this?
+        let w: Vec3 = n / n.dot(&n);
+        let area = n.magnitude();
+        let mut aabb = AABB::new_from_coords(q, q + u + v);
+        aabb.pad();
+
+        Quad {
+            q,
+            u,
+            v,
+            material,
+            area,
+            normal,
+            d,
+            w,
+            aabb,
+        }
+    }
+}
+
+impl<'scene> HitableTrait for Quad<'scene> {
+    /// Hit method for the quad rectangle
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        _rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        let denom = self.normal.dot(&ray.direction);
+
+        // No hit if the ray is parallel to the plane.
+        if denom.abs() < EPSILON_RECT_THICKNESS {
+            return None;
+        }
+
+        // Return false if the hit point parameter t is outside the ray interval
+        let t = (-self.d - self.normal.dot(&ray.origin)) / denom;
+        if t < distance_min || t > distance_max {
+            return None;
+        }
+
+        // Determine the hit point lies within the planar shape using its plane coordinates.
+        let intersection: Vec3 = ray.evaluate(t);
+        let planar_hitpt_vector: Vec3 = intersection - self.q;
+        let alpha: Float = self.w.dot(&planar_hitpt_vector.cross(&self.v));
+        let beta: Float = self.w.dot(&self.u.cross(&planar_hitpt_vector));
+
+        // Do we hit a coordinate within the surface of the plane?
+        if !hit_ab(alpha, beta) {
+            return None;
+        }
+
+        // Ray hits the 2D shape; set the rest of the hit record and return
+
+        let (front_face, normal) = get_orientation(ray, self.normal);
+
+        Some(HitRecord {
+            distance: t,
+            position: intersection,
+            normal,
+            u: alpha,
+            v: beta,
+            material: self.material,
+            front_face,
+        })
+    }
+
+    /// Returns the bounding box of the quad
+    #[must_use]
+    fn bounding_box(&self, _t0: Float, _t1: Float) -> Option<&AABB> {
+        Some(&self.aabb)
+    }
+
+    /// Returns a probability density function value? // TODO: understand & explain
+    #[must_use]
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        let ray = Ray {
+            origin,
+            direction: vector,
+            time,
+            wavelength,
+        };
+        match self.hit(&ray, EPSILON_SHADOW_ACNE, Float::INFINITY, rng) {
+            Some(hit_record) => {
+                let distance_squared =
+                    hit_record.distance * hit_record.distance * vector.norm_squared();
+                let cosine = vector.dot(&hit_record.normal).abs() / vector.magnitude();
+
+                distance_squared / (cosine * self.area)
+            }
+            None => 0.0,
+        }
+    }
+
+    /// Returns a random point on the quadrilateral surface
+    #[must_use]
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        let point: Vec3 = self.q + (rng.gen::<Float>() * self.u) + (rng.gen::<Float>() * self.v);
+        point - origin
+    }
+}
+
+#[must_use]
+fn hit_ab(a: Float, b: Float) -> bool {
+    // Given the hit point in plane coordinates, return false if it is outside the
+    // primitive, otherwise return true.
+    (0.0..=1.0).contains(&a) && (0.0..=1.0).contains(&b)
+}
+
\ No newline at end of file diff --git a/src/clovers/objects/rotate.rs.html b/src/clovers/objects/rotate.rs.html new file mode 100644 index 00000000..9096ee4e --- /dev/null +++ b/src/clovers/objects/rotate.rs.html @@ -0,0 +1,363 @@ +rotate.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+
//! Utility object for rotating another object.
+
+use crate::{
+    aabb::AABB,
+    hitable::{HitRecord, Hitable, HitableTrait},
+    ray::Ray,
+    wavelength::Wavelength,
+    Box, Float, Vec3,
+};
+use rand::rngs::SmallRng;
+
+use super::Object;
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// `RotateInit` structure describes the necessary data for constructing a [`RotateY`]. Used with [serde] when importing [`SceneFile`](crate::scenes::SceneFile)s.
+pub struct RotateInit {
+    /// Used for multiple importance sampling
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// The encased [Object] to rotate
+    pub object: Box<Object>,
+    /// Angle to rotate the object, in degrees
+    pub angle: Float,
+}
+
+#[derive(Debug, Clone)]
+/// `RotateY` object. It wraps the given [Object] and has adjusted `hit()` and `bounding_box()` methods based on the `angle` given.
+pub struct RotateY<'scene> {
+    object: Box<Hitable<'scene>>,
+    sin_theta: Float,
+    cos_theta: Float,
+    aabb: Option<AABB>,
+}
+
+impl<'scene> RotateY<'scene> {
+    /// Creates a new `RotateY` object. It wraps the given [Object] and has adjusted `hit()` and `bounding_box()` methods based on the `angle` given.
+    #[must_use]
+    pub fn new(object: Box<Hitable<'scene>>, angle: Float) -> Self {
+        // TODO: add proper time support
+        let time_0: Float = 0.0;
+        let time_1: Float = 1.0;
+        let radians: Float = angle.to_radians();
+        let sin_theta: Float = radians.sin();
+        let cos_theta: Float = radians.cos();
+        let bounding_box: Option<&AABB> = object.bounding_box(time_0, time_1);
+
+        // Does our object have a bounding box?
+        let Some(bbox) = bounding_box else {
+            return RotateY {
+                object,
+                sin_theta,
+                cos_theta,
+                aabb: None,
+            };
+        };
+
+        // Start with infinite bounds
+        let mut min: Vec3 = Vec3::new(Float::INFINITY, Float::INFINITY, Float::INFINITY);
+        let mut max: Vec3 = Vec3::new(
+            Float::NEG_INFINITY,
+            Float::NEG_INFINITY,
+            Float::NEG_INFINITY,
+        );
+
+        // Calculate new bounds
+        for i in [0.0, 1.0] {
+            for j in [0.0, 1.0] {
+                for k in [0.0, 1.0] {
+                    let i_f: Float = i;
+                    let j_f: Float = j;
+                    let k_f: Float = k;
+
+                    let x: Float = i_f * bbox.x.max + (1.0 - i_f) * bbox.x.min;
+                    let y: Float = j_f * bbox.y.max + (1.0 - j_f) * bbox.y.min;
+                    let z: Float = k_f * bbox.z.max + (1.0 - k_f) * bbox.z.min;
+
+                    let new_x: Float = cos_theta * x + sin_theta * z;
+                    let new_z: Float = -sin_theta * x + cos_theta * z;
+
+                    let tester: Vec3 = Vec3::new(new_x, y, new_z);
+
+                    for c in 0..3 {
+                        min[c] = min[c].min(tester[c]);
+                        max[c] = max[c].max(tester[c]);
+                    }
+                }
+            }
+        }
+
+        // Return a Rotate object with the new bounding box and pre-calculated rotation utilities
+        RotateY {
+            object,
+            sin_theta,
+            cos_theta,
+            aabb: Some(AABB::new_from_coords(min, max)),
+        }
+    }
+}
+
+impl<'scene> HitableTrait for RotateY<'scene> {
+    /// Hit method for the [`RotateY`] object. Finds the rotation-adjusted [`HitRecord`] for the possible intersection of the [Ray] with the encased [Object].
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        let mut origin: Vec3 = ray.origin;
+        let mut direction: Vec3 = ray.direction;
+
+        origin[0] = self.cos_theta * ray.origin[0] - self.sin_theta * ray.origin[2];
+        origin[2] = self.sin_theta * ray.origin[0] + self.cos_theta * ray.origin[2];
+
+        direction[0] = self.cos_theta * ray.direction[0] - self.sin_theta * ray.direction[2];
+        direction[2] = self.sin_theta * ray.direction[0] + self.cos_theta * ray.direction[2];
+
+        let rotated_r: Ray = Ray {
+            origin,
+            direction,
+            time: ray.time,
+            wavelength: ray.wavelength,
+        };
+
+        let Some(hit_record) = self.object.hit(&rotated_r, distance_min, distance_max, rng) else {
+            // Did not hit rotated object, early return None
+            return None;
+        };
+
+        // Determine where the intersection is
+        // TODO: understand and explain
+        let mut position: Vec3 = hit_record.position;
+        let mut normal: Vec3 = hit_record.normal;
+        let distance: Float = hit_record.distance;
+
+        position[0] =
+            self.cos_theta * hit_record.position[0] + self.sin_theta * hit_record.position[2];
+        position[2] =
+            -self.sin_theta * hit_record.position[0] + self.cos_theta * hit_record.position[2];
+
+        normal[0] = self.cos_theta * hit_record.normal[0] + self.sin_theta * hit_record.normal[2];
+        normal[2] = -self.sin_theta * hit_record.normal[0] + self.cos_theta * hit_record.normal[2];
+
+        let mut record = HitRecord {
+            distance,
+            position,
+            normal,
+            u: hit_record.u,
+            v: hit_record.v,
+            material: hit_record.material,
+            front_face: false, // TODO: fix having to declare it before calling face_normal
+        };
+        record.set_face_normal(&rotated_r, normal);
+        Some(record)
+    }
+
+    /// Bounding box method for the [`RotateY`] object. Finds the axis-aligned bounding box [AABB] for the encased [Object] after adjusting for rotation.
+    #[must_use]
+    fn bounding_box(&self, _t0: Float, _t1: Float) -> Option<&AABB> {
+        self.aabb.as_ref()
+    }
+
+    fn pdf_value(
+        &self,
+        _origin: Vec3,
+        _vector: Vec3,
+        _wavelength: Wavelength,
+        _time: Float,
+        _rng: &mut SmallRng,
+    ) -> Float {
+        // TODO: fix
+        0.0
+    }
+
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        // TODO: fix, take rotation into account
+        self.object.random(origin, rng)
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/objects/sphere.rs.html b/src/clovers/objects/sphere.rs.html new file mode 100644 index 00000000..06fc3ae8 --- /dev/null +++ b/src/clovers/objects/sphere.rs.html @@ -0,0 +1,365 @@ +sphere.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+
//! A sphere object.
+
+use crate::{
+    aabb::AABB,
+    hitable::{HitRecord, HitableTrait},
+    materials::{Material, MaterialInit},
+    onb::ONB,
+    ray::Ray,
+    wavelength::Wavelength,
+    Float, Vec3, EPSILON_SHADOW_ACNE, PI,
+};
+use rand::{rngs::SmallRng, Rng};
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// `SphereInit` structure describes the necessary data for constructing a [Sphere]. Used with [serde] when importing [`SceneFile`](crate::scenes::SceneFile)s.
+pub struct SphereInit {
+    /// Used for multiple importance sampling
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// Center of the sphere.
+    pub center: Vec3,
+    /// Radius of the sphere.
+    pub radius: Float,
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    /// Material of the sphere.
+    pub material: MaterialInit,
+}
+
+#[derive(Debug, Clone)]
+/// A sphere object.
+pub struct Sphere<'scene> {
+    center: Vec3,
+    radius: Float,
+    material: &'scene Material,
+    aabb: AABB,
+}
+
+impl<'scene> Sphere<'scene> {
+    /// Creates a new `Sphere` object with the given center, radius and material.
+    #[must_use]
+    pub fn new(center: Vec3, radius: Float, material: &'scene Material) -> Self {
+        let aabb = AABB::new_from_coords(
+            center - Vec3::new(radius, radius, radius),
+            center + Vec3::new(radius, radius, radius),
+        );
+        Sphere {
+            center,
+            radius,
+            material,
+            aabb,
+        }
+    }
+
+    /// Returns the U,V surface coordinates of a hitpoint
+    #[must_use]
+    pub fn get_uv(&self, hit_position: Vec3, _time: Float) -> (Float, Float) {
+        let translated: Vec3 = (hit_position - self.center) / self.radius;
+        let phi: Float = translated.z.atan2(translated.x);
+        let theta: Float = translated.y.asin();
+        let u: Float = 1.0 - (phi + PI) / (2.0 * PI);
+        let v: Float = (theta + PI / 2.0) / PI;
+        (u, v)
+    }
+}
+
+impl<'scene> HitableTrait for Sphere<'scene> {
+    /// Hit method for the [Sphere] object. Returns a [`HitRecord`] if the given [Ray] intersects with the sphere at the given distance interval.
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        _rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        let oc: Vec3 = ray.origin - self.center;
+        let a: Float = ray.direction.norm_squared();
+        let half_b: Float = oc.dot(&ray.direction);
+        let c: Float = oc.norm_squared() - self.radius * self.radius;
+        let discriminant = half_b * half_b - a * c;
+        if discriminant > 0.0 {
+            let root: Float = discriminant.sqrt();
+
+            // First possible root
+            let distance: Float = (-half_b - root) / a;
+            if distance < distance_max && distance > distance_min {
+                let position: Vec3 = ray.evaluate(distance);
+                let outward_normal = (position - self.center) / self.radius;
+                let (u, v) = self.get_uv(position, ray.time);
+                let mut record = HitRecord {
+                    distance,
+                    position,
+                    normal: outward_normal,
+                    u,
+                    v,
+                    material: self.material,
+                    front_face: false, // TODO: fix having to declare it before calling face_normal
+                };
+                record.set_face_normal(ray, outward_normal);
+                return Some(record);
+            }
+            // Second possible root
+            let distance: Float = (-half_b + root) / a;
+            if distance < distance_max && distance > distance_min {
+                let position: Vec3 = ray.evaluate(distance);
+                let outward_normal = (position - self.center) / self.radius;
+                let (u, v) = self.get_uv(position, ray.time);
+                let mut record = HitRecord {
+                    distance,
+                    position,
+                    normal: outward_normal,
+                    u,
+                    v,
+                    material: self.material,
+                    front_face: false, // TODO: fix having to declare it before calling face_normal
+                };
+                record.set_face_normal(ray, outward_normal);
+                return Some(record);
+            }
+        }
+        None
+    }
+
+    /// Returns the axis-aligned bounding box [AABB] for the sphere.
+    #[must_use]
+    fn bounding_box(&self, _t0: Float, _t1: Float) -> Option<&AABB> {
+        Some(&self.aabb)
+    }
+
+    /// Returns the probability density function for the sphere? TODO: what does this do again and how
+    #[must_use]
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        let ray = Ray {
+            origin,
+            direction: vector,
+            time,
+            wavelength,
+        };
+        match self.hit(&ray, EPSILON_SHADOW_ACNE, Float::INFINITY, rng) {
+            None => 0.0,
+            Some(_hit_record) => {
+                let cos_theta_max = (1.0
+                    - self.radius * self.radius / (self.center - origin).norm_squared())
+                .sqrt();
+                let solid_angle = 2.0 * PI * (1.0 - cos_theta_max);
+
+                1.0 / solid_angle
+            }
+        }
+    }
+
+    // TODO: understand, document
+    /// Utility function from Ray Tracing: The Rest of Your Life. TODO: understand, document
+    #[must_use]
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        let direction: Vec3 = self.center - origin;
+        let distance_squared: Float = direction.norm_squared();
+        let uvw = ONB::build_from_w(direction);
+        uvw.local(random_to_sphere(self.radius, distance_squared, rng))
+    }
+}
+
+/// Internal helper.
+fn random_to_sphere(radius: Float, distance_squared: Float, rng: &mut SmallRng) -> Vec3 {
+    let r1: Float = rng.gen();
+    let r2: Float = rng.gen();
+    let z = 1.0 + r2 * ((1.0 - radius * radius / distance_squared).sqrt() - 1.0);
+
+    let phi = 2.0 * PI * r1;
+    let x = phi.cos() * (1.0 - z * z).sqrt();
+    let y = phi.sin() * (1.0 - z * z).sqrt();
+
+    Vec3::new(x, y, z)
+}
+
\ No newline at end of file diff --git a/src/clovers/objects/stl.rs.html b/src/clovers/objects/stl.rs.html new file mode 100644 index 00000000..55d120ba --- /dev/null +++ b/src/clovers/objects/stl.rs.html @@ -0,0 +1,307 @@ +stl.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+
//! STL utilities
+
+use alloc::string::String;
+use nalgebra::Rotation3;
+use rand::prelude::SmallRng;
+use std::fs::OpenOptions;
+
+use crate::{
+    aabb::AABB,
+    bvhnode::BVHNode,
+    hitable::{HitRecord, Hitable, HitableTrait},
+    materials::{Material, MaterialInit, SharedMaterial},
+    objects::Triangle,
+    ray::Ray,
+    wavelength::Wavelength,
+    Float, Vec3,
+};
+
+/// Internal STL object representation after initialization. Contains the material for all triangles in it to avoid having n copies.
+#[derive(Debug, Clone)]
+pub struct STL<'scene> {
+    /// Bounding Volume Hierarchy tree for the object
+    pub bvhnode: BVHNode<'scene>,
+    /// Material for the object
+    pub material: &'scene Material,
+    /// Axis-aligned bounding box of the object
+    pub aabb: AABB,
+}
+
+impl<'scene> HitableTrait for STL<'scene> {
+    /// Hit method for the STL object
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: f32,
+        distance_max: f32,
+        rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        self.bvhnode.hit(ray, distance_min, distance_max, rng)
+    }
+
+    /// Return the axis-aligned bounding box for the object
+    #[must_use]
+    fn bounding_box(&self, _t0: f32, _t1: f32) -> Option<&AABB> {
+        Some(&self.aabb)
+    }
+
+    /// Returns a probability density function value based on the object
+    #[must_use]
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        self.bvhnode
+            .pdf_value(origin, vector, wavelength, time, rng)
+    }
+
+    /// Returns a random point on the ssurface of the object
+    #[must_use]
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        self.bvhnode.random(origin, rng)
+    }
+}
+
+/// STL structure. This gets converted into an internal representation using [Triangles](crate::objects::Triangle)
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct STLInit {
+    /// Used for multiple importance sampling
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// Path of the .stl file
+    pub path: String,
+    /// Material to use for the .stl object
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub material: MaterialInit,
+    /// Scaling factor for the object
+    pub scale: Float,
+    /// Location of the object in the rendered scene
+    pub center: Vec3,
+    /// Rotation of the object. Described as three angles, `roll`, `pitch`, `yaw`, applied in that order.
+    pub rotation: Vec3,
+}
+
+#[must_use]
+/// Initializes an STL
+pub fn initialize_stl<'scene>(
+    stl_init: STLInit,
+    materials: &'scene [SharedMaterial],
+) -> STL<'scene> {
+    // TODO: error handling!
+    let mut file = OpenOptions::new()
+        .read(true)
+        .open(stl_init.path.clone())
+        .unwrap();
+    let mesh = stl_io::read_stl(&mut file).unwrap();
+    let triangles = mesh.vertices;
+    let mut hitable_list = Vec::new();
+    let material: &Material = match stl_init.material {
+        MaterialInit::Shared(name) => &materials.iter().find(|m| m.name == name).unwrap().material,
+        MaterialInit::Owned(m) => {
+            // TODO: do not leak memory
+            let material: &'scene Material = Box::leak(Box::new(m));
+            material
+        }
+    };
+
+    for face in mesh.faces {
+        // TODO: verify if this is the correct order / makes sense / gets correct directions and normals
+        let a = triangles[face.vertices[0]];
+        let b = triangles[face.vertices[1]];
+        let c = triangles[face.vertices[2]];
+        // TODO: better conversion between library format and own format
+        let a: Vec3 = Vec3::new(a[0], a[1], a[2]);
+        let b: Vec3 = Vec3::new(b[0], b[1], b[2]);
+        let c: Vec3 = Vec3::new(c[0], c[1], c[2]);
+        // Handle rotation
+        let rotation = Rotation3::from_euler_angles(
+            stl_init.rotation[0].to_radians(),
+            stl_init.rotation[1].to_radians(),
+            stl_init.rotation[2].to_radians(),
+        );
+        let a: Vec3 = rotation * a;
+        let b: Vec3 = rotation * b;
+        let c: Vec3 = rotation * c;
+        // Handle scaling and offset
+        let a: Vec3 = a * stl_init.scale + stl_init.center;
+        let b: Vec3 = b * stl_init.scale + stl_init.center;
+        let c: Vec3 = c * stl_init.scale + stl_init.center;
+
+        let triangle = Triangle::from_coordinates(a, b, c, material);
+        hitable_list.push(Hitable::Triangle(triangle));
+    }
+
+    // TODO: time
+    let time_0 = 0.0;
+    let time_1 = 1.0;
+
+    let bvhnode = BVHNode::from_list(hitable_list, time_0, time_1);
+    // TODO: remove unwrap
+    let aabb = bvhnode.bounding_box(time_0, time_1).unwrap().clone();
+
+    STL {
+        bvhnode,
+        material,
+        aabb,
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/objects/translate.rs.html b/src/clovers/objects/translate.rs.html new file mode 100644 index 00000000..f0c453d1 --- /dev/null +++ b/src/clovers/objects/translate.rs.html @@ -0,0 +1,209 @@ +translate.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+
//! Utility object for translating i.e. moving another object.
+
+use crate::{
+    aabb::AABB,
+    hitable::{HitRecord, Hitable, HitableTrait},
+    ray::Ray,
+    wavelength::Wavelength,
+    Box, Float, Vec3,
+};
+use rand::rngs::SmallRng;
+
+use super::Object;
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// `TranslateInit` structure describes the necessary data for constructing a [Translate] object. Used with [serde] when importing [`SceneFile`](crate::scenes::SceneFile)s.
+pub struct TranslateInit {
+    /// Used for multiple importance sampling
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// The encased [Object] to translate i.e. move
+    pub object: Box<Object>,
+    /// The vector describing the movement of the object
+    pub offset: Vec3,
+}
+
+#[derive(Debug, Clone)]
+/// Translate object. It wraps the given [Object] and has adjusted `hit()` and `bounding_box()` methods based on the `offset` given.
+pub struct Translate<'scene> {
+    object: Box<Hitable<'scene>>,
+    offset: Vec3,
+    aabb: AABB,
+}
+
+impl<'scene> Translate<'scene> {
+    /// Creates a new `Translate` object. It wraps the given [Object] and has adjusted `hit()` and `bounding_box()` methods based on the `offset` given.
+    #[must_use]
+    pub fn new(object: Box<Hitable<'scene>>, offset: Vec3) -> Self {
+        // TODO: time
+        let aabb = object.bounding_box(0.0, 1.0).unwrap().clone() + offset;
+        Translate {
+            object,
+            offset,
+            aabb,
+        }
+    }
+}
+
+impl<'scene> HitableTrait for Translate<'scene> {
+    /// Hit method for the [Translate] object. Finds the translation-adjusted [`HitRecord`] for the possible intersection of the [Ray] with the encased [Object].
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        let moved_ray = Ray {
+            origin: ray.origin - self.offset,
+            direction: ray.direction,
+            time: ray.time,
+            wavelength: ray.wavelength,
+        };
+
+        match self.object.hit(&moved_ray, distance_min, distance_max, rng) {
+            // Didn't hit anything, return None
+            None => None,
+            // Hit something, adjust the position and normal
+            Some(mut hit_record) => {
+                hit_record.position += self.offset;
+                hit_record.set_face_normal(&moved_ray, hit_record.normal);
+                Some(hit_record)
+            }
+        }
+    }
+
+    /// Bounding box method for the [Translate] object. Finds the axis-aligned bounding box [AABB] for the encased [Object] after adjusting for translation.
+    #[must_use]
+    fn bounding_box(&self, _t0: Float, _t1: Float) -> Option<&AABB> {
+        Some(&self.aabb)
+    }
+
+    /// Returns a probability density function value based on the inner object
+    #[must_use]
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        // TODO: is this correct?
+        self.object
+            .pdf_value(origin + self.offset, vector, wavelength, time, rng)
+    }
+
+    /// Returns a random point on the surface of the moved object
+    #[must_use]
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        self.object.random(origin, rng) + self.offset
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/objects/triangle.rs.html b/src/clovers/objects/triangle.rs.html new file mode 100644 index 00000000..4a45abc1 --- /dev/null +++ b/src/clovers/objects/triangle.rs.html @@ -0,0 +1,795 @@ +triangle.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+
//! A triangle object. Almost exact copy of [Quad](crate::objects::Quad), with an adjusted `hit_ab` method.
+// TODO: better docs
+
+use crate::hitable::HitableTrait;
+use crate::interval::Interval;
+use crate::materials::MaterialInit;
+use crate::wavelength::Wavelength;
+use crate::EPSILON_SHADOW_ACNE;
+use crate::{
+    aabb::AABB, hitable::HitRecord, materials::Material, ray::Ray, Float, Vec3,
+    EPSILON_RECT_THICKNESS,
+};
+use rand::rngs::SmallRng;
+use rand::Rng;
+
+/// Initialization structure for a triangle primitive
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+pub struct TriangleInit {
+    /// Used for multiple importance sampling
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub priority: bool,
+    /// Corner point
+    pub q: Vec3,
+    /// Vector describing the u side
+    pub u: Vec3,
+    /// Vector describing the v side
+    pub v: Vec3,
+    /// Material of the surface
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    pub material: MaterialInit,
+}
+
+/// Triangle shape. Heavily based on [Quad](crate::objects::Quad) and may contain inaccuracies
+#[derive(Clone, Debug)]
+pub struct Triangle<'scene> {
+    /// Corner point
+    pub q: Vec3,
+    /// Vector describing the u side
+    pub u: Vec3,
+    /// Vector describing the v side
+    pub v: Vec3,
+    /// Material of the surface
+    pub material: &'scene Material,
+    /// Area of the surface
+    pub area: Float,
+    /// Normal vector of the surface
+    pub normal: Vec3,
+    /// What is this? // TODO: understand, explain
+    pub d: Float,
+    /// What is this? // TODO: understand, explain
+    pub w: Vec3,
+    /// Bounding box of the surface
+    pub aabb: AABB,
+}
+
+impl<'scene> Triangle<'scene> {
+    /// Creates a new triangle from a coordinate point and two side vectors relative to the point
+    #[must_use]
+    pub fn new(q: Vec3, u: Vec3, v: Vec3, material: &'scene Material) -> Triangle<'scene> {
+        let n: Vec3 = u.cross(&v);
+        let normal: Vec3 = n.normalize();
+        // TODO: what is this?
+        let d = -(normal.dot(&q));
+        // TODO: what is this?
+        let w: Vec3 = n / n.dot(&n);
+        // Compared to quad, triangle has half the area
+        let area = n.magnitude() / 2.0;
+        // Compute the AABB using the absolute coordinates of all corners
+        // TODO: refactor to prettier code
+        let corner1 = q;
+        let corner2 = q + u;
+        let corner3 = q + v;
+        let interval_x = Interval::new(
+            corner1[0].min(corner2[0]).min(corner3[0]),
+            corner1[0].max(corner2[0]).max(corner3[0]),
+        );
+        let interval_y = Interval::new(
+            corner1[1].min(corner2[1]).min(corner3[1]),
+            corner1[1].max(corner2[1]).max(corner3[1]),
+        );
+        let interval_z = Interval::new(
+            corner1[2].min(corner2[2]).min(corner3[2]),
+            corner1[2].max(corner2[2]).max(corner3[2]),
+        );
+        let mut aabb: AABB = AABB::new(interval_x, interval_y, interval_z);
+        aabb.pad();
+
+        Triangle {
+            q,
+            u,
+            v,
+            material,
+            area,
+            normal,
+            d,
+            w,
+            aabb,
+        }
+    }
+
+    /// Creates a new triangle from three Cartesian space coordinates
+    #[must_use]
+    pub fn from_coordinates(
+        a: Vec3,
+        b: Vec3,
+        c: Vec3,
+        material: &'scene Material,
+    ) -> Triangle<'scene> {
+        // Coordinate transform: from absolute coordinates to relative coordinates
+        let q: Vec3 = a;
+        let u: Vec3 = b - q;
+        let v: Vec3 = c - q;
+        Triangle::new(q, u, v, material)
+    }
+}
+
+impl<'scene> HitableTrait for Triangle<'scene> {
+    /// Hit method for the triangle
+    #[must_use]
+    fn hit(
+        &self,
+        ray: &Ray,
+        distance_min: Float,
+        distance_max: Float,
+        _rng: &mut SmallRng,
+    ) -> Option<HitRecord> {
+        let denom = self.normal.dot(&ray.direction);
+
+        // No hit if the ray is parallel to the plane.
+        if denom.abs() < EPSILON_RECT_THICKNESS {
+            return None;
+        }
+
+        // Return false if the hit point parameter t is outside the ray interval
+        let t = (-self.d - self.normal.dot(&ray.origin)) / denom;
+        if t < distance_min || t > distance_max {
+            return None;
+        }
+
+        // Determine the hit point lies within the planar shape using its plane coordinates.
+        let intersection: Vec3 = ray.evaluate(t);
+        let planar_hitpt_vector: Vec3 = intersection - self.q;
+        let alpha: Float = self.w.dot(&planar_hitpt_vector.cross(&self.v));
+        let beta: Float = self.w.dot(&self.u.cross(&planar_hitpt_vector));
+
+        // Do we hit a coordinate within the surface of the plane?
+        if !hit_ab(alpha, beta) {
+            return None;
+        }
+
+        // Ray hits the 2D shape; set the rest of the hit record and return
+        let mut record = HitRecord {
+            distance: t,
+            position: intersection,
+            u: alpha,
+            v: beta,
+            material: self.material,
+            normal: self.normal,
+            front_face: false,
+        };
+        record.set_face_normal(ray, self.normal);
+
+        Some(record)
+    }
+
+    /// Returns the bounding box of the triangle
+    #[must_use]
+    fn bounding_box(&self, _t0: Float, _t1: Float) -> Option<&AABB> {
+        // TODO: this is from quad and not updated!
+        // although i guess a triangle's aabb is the same as the quad's aabb in worst case
+        Some(&self.aabb)
+    }
+
+    /// Returns a probability density function value? // TODO: understand & explain
+    #[must_use]
+    fn pdf_value(
+        &self,
+        origin: Vec3,
+        vector: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        let ray = Ray {
+            origin,
+            direction: vector,
+            time,
+            wavelength,
+        };
+        // TODO: this is from quad and not updated!
+        match self.hit(&ray, EPSILON_SHADOW_ACNE, Float::INFINITY, rng) {
+            Some(hit_record) => {
+                let distance_squared =
+                    hit_record.distance * hit_record.distance * vector.norm_squared();
+                let cosine = vector.dot(&hit_record.normal).abs() / vector.magnitude();
+
+                distance_squared / (cosine * self.area)
+            }
+            None => 0.0,
+        }
+    }
+
+    /// Returns a random point on the triangle surface
+    #[must_use]
+    fn random(&self, origin: Vec3, rng: &mut SmallRng) -> Vec3 {
+        let mut a = rng.gen::<Float>();
+        let mut b = rng.gen::<Float>();
+        if a + b > 1.0 {
+            a = 1.0 - a;
+            b = 1.0 - b;
+        }
+
+        let point: Vec3 = self.q + (a * self.u) + (b * self.v);
+
+        point - origin
+    }
+}
+
+#[must_use]
+fn hit_ab(a: Float, b: Float) -> bool {
+    // Given the hit point in plane coordinates, return false if it is outside the
+    // primitive, otherwise return true.
+    // Triangle: a+b must be <=1.0
+    (0.0..=1.0).contains(&a) && (0.0..=1.0).contains(&b) && (a + b <= 1.0)
+}
+
+#[cfg(test)]
+mod tests {
+    use alloc::boxed::Box;
+    use rand::SeedableRng;
+
+    use crate::interval::Interval;
+
+    use super::*;
+
+    const TIME_0: Float = 0.0;
+    const TIME_1: Float = 1.0;
+    const RAY: Ray = Ray {
+        origin: Vec3::new(0.0, 0.0, -1.0),
+        direction: Vec3::new(0.0, 0.0, 1.0),
+        time: TIME_0,
+        wavelength: 600,
+    };
+
+    #[test]
+    fn xy_unit_triangle() {
+        let mut rng = SmallRng::from_entropy();
+        let material = Box::default();
+
+        // Unit triangle at origin
+        let triangle = Triangle::new(
+            Vec3::new(0.0, 0.0, 0.0),
+            Vec3::new(1.0, 0.0, 0.0),
+            Vec3::new(0.0, 1.0, 0.0),
+            &material,
+        );
+
+        let aabb = triangle
+            .bounding_box(TIME_0, TIME_1)
+            .expect("No AABB for the triangle");
+
+        let expected_aabb = AABB::new(
+            Interval::new(0.0, 1.0),
+            Interval::new(0.0, 1.0),
+            Interval::new(0.0, 0.0).expand(EPSILON_RECT_THICKNESS),
+        );
+
+        assert_eq!(aabb, &expected_aabb);
+
+        let boxhit = aabb.hit(&RAY, TIME_0, TIME_1);
+        assert!(boxhit);
+
+        let hit_record = triangle
+            .hit(&RAY, Float::NEG_INFINITY, Float::INFINITY, &mut rng)
+            .expect("No hit record for triangle and ray");
+
+        assert!(hit_record.distance - 1.0 <= Float::EPSILON);
+        assert_eq!(hit_record.position, Vec3::new(0.0, 0.0, 0.0));
+        assert_eq!(hit_record.normal, Vec3::new(0.0, 0.0, -1.0));
+        assert!(!hit_record.front_face);
+    }
+
+    #[test]
+    fn yx_unit_triangle() {
+        let mut rng = SmallRng::from_entropy();
+        let material = Box::default();
+
+        // Unit triangle at origin, u and v coords swapped
+        let triangle = Triangle::new(
+            Vec3::new(0.0, 0.0, 0.0),
+            Vec3::new(0.0, 1.0, 0.0),
+            Vec3::new(1.0, 0.0, 0.0),
+            &material,
+        );
+
+        let aabb = triangle
+            .bounding_box(TIME_0, TIME_1)
+            .expect("No AABB for the triangle");
+
+        let expected_aabb = AABB::new(
+            Interval::new(0.0, 1.0),
+            Interval::new(0.0, 1.0),
+            Interval::new(0.0, 0.0).expand(EPSILON_RECT_THICKNESS),
+        );
+
+        assert_eq!(aabb, &expected_aabb);
+
+        let boxhit = aabb.hit(&RAY, TIME_0, TIME_1);
+        assert!(boxhit);
+
+        let hit_record = triangle
+            .hit(&RAY, Float::NEG_INFINITY, Float::INFINITY, &mut rng)
+            .expect("No hit record for triangle and ray");
+
+        assert!(hit_record.distance - 1.0 <= Float::EPSILON);
+        assert_eq!(hit_record.position, Vec3::new(0.0, 0.0, 0.0));
+        assert_eq!(hit_record.normal, Vec3::new(0.0, 0.0, -1.0));
+        assert!(hit_record.front_face);
+    }
+
+    #[test]
+    fn neg_xy_unit_triangle() {
+        let mut rng = SmallRng::from_entropy();
+        let material: Box<Material> = Box::default();
+
+        // Unit triangle at origin, u and v coords swapped
+        let triangle = Triangle::new(
+            Vec3::new(0.0, 0.0, 0.0),
+            Vec3::new(-1.0, 0.0, 0.0),
+            Vec3::new(0.0, -1.0, 0.0),
+            &material,
+        );
+
+        let aabb = triangle
+            .bounding_box(TIME_0, TIME_1)
+            .expect("No AABB for the triangle");
+
+        let expected_aabb = AABB::new(
+            Interval::new(-1.0, 0.0),
+            Interval::new(-1.0, 0.0),
+            Interval::new(0.0, 0.0).expand(EPSILON_RECT_THICKNESS),
+        );
+
+        assert_eq!(aabb, &expected_aabb);
+
+        let boxhit = aabb.hit(&RAY, TIME_0, TIME_1);
+        assert!(boxhit);
+
+        let hit_record = triangle
+            .hit(&RAY, Float::NEG_INFINITY, Float::INFINITY, &mut rng)
+            .expect("No hit record for triangle and ray");
+
+        assert!(hit_record.distance - 1.0 <= Float::EPSILON);
+        assert_eq!(hit_record.position, Vec3::new(0.0, 0.0, 0.0));
+        assert_eq!(hit_record.normal, Vec3::new(0.0, 0.0, -1.0));
+        assert!(!hit_record.front_face);
+    }
+
+    #[test]
+    fn neg_yx_unit_triangle() {
+        let mut rng = SmallRng::from_entropy();
+        let material: Box<Material> = Box::default();
+
+        // Unit triangle at origin, u and v coords swapped
+        let triangle = Triangle::new(
+            Vec3::new(0.0, 0.0, 0.0),
+            Vec3::new(0.0, -1.0, 0.0),
+            Vec3::new(-1.0, 0.0, 0.0),
+            &material,
+        );
+
+        let aabb = triangle
+            .bounding_box(TIME_0, TIME_1)
+            .expect("No AABB for the triangle");
+
+        let expected_aabb = AABB::new(
+            Interval::new(-1.0, 0.0),
+            Interval::new(-1.0, 0.0),
+            Interval::new(0.0, 0.0).expand(EPSILON_RECT_THICKNESS),
+        );
+
+        assert_eq!(aabb, &expected_aabb);
+
+        let boxhit = aabb.hit(&RAY, TIME_0, TIME_1);
+        assert!(boxhit);
+
+        let hit_record = triangle
+            .hit(&RAY, Float::NEG_INFINITY, Float::INFINITY, &mut rng)
+            .expect("No hit record for triangle and ray");
+
+        assert!(hit_record.distance - 1.0 <= Float::EPSILON);
+        assert_eq!(hit_record.position, Vec3::new(0.0, 0.0, 0.0));
+        assert_eq!(hit_record.normal, Vec3::new(0.0, 0.0, -1.0));
+        assert!(hit_record.front_face);
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/onb.rs.html b/src/clovers/onb.rs.html new file mode 100644 index 00000000..b8715b0c --- /dev/null +++ b/src/clovers/onb.rs.html @@ -0,0 +1,79 @@ +onb.rs - source
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
+
//! Orthonormal bases
+
+use crate::Vec3;
+
+#[derive(Debug, Clone)]
+/// An orthonormal basis structure.
+pub struct ONB {
+    /// U
+    pub u: Vec3,
+    /// V
+    pub v: Vec3,
+    /// W
+    pub w: Vec3,
+}
+
+// TODO: understand, explain
+
+impl ONB {
+    /// Builds a new [ONB] structure given a normal vector.
+    #[must_use]
+    pub fn build_from_w(normal: Vec3) -> ONB {
+        let w = (normal).normalize();
+        let a: Vec3 = if (w.x).abs() > 0.9 {
+            Vec3::new(0.0, 1.0, 0.0)
+        } else {
+            Vec3::new(1.0, 0.0, 0.0)
+        };
+        let v = (w.cross(&a)).normalize();
+        let u = w.cross(&v);
+
+        ONB { u, v, w }
+    }
+
+    /// Returns the ONB-projected version of the provided vector?
+    #[must_use]
+    pub fn local(&self, vec: Vec3) -> Vec3 {
+        vec.x * self.u + vec.y * self.v + vec.z * self.w
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/pdf.rs.html b/src/clovers/pdf.rs.html new file mode 100644 index 00000000..05fe8b85 --- /dev/null +++ b/src/clovers/pdf.rs.html @@ -0,0 +1,423 @@ +pdf.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+
//! Probability density functions
+
+#![allow(missing_docs)] // TODO: Lots of undocumented things for now
+
+use crate::{
+    hitable::{Hitable, HitableTrait},
+    onb::ONB,
+    random::{random_cosine_direction, random_unit_vector},
+    wavelength::Wavelength,
+    Box, Float, Vec3, PI,
+};
+use enum_dispatch::enum_dispatch;
+use rand::rngs::SmallRng;
+use rand::Rng;
+
+#[enum_dispatch(PDFTrait)]
+#[derive(Debug, Clone)]
+pub enum PDF<'scene> {
+    CosinePDF(CosinePDF),
+    SpherePDF(SpherePDF),
+    HitablePDF(HitablePDF<'scene>),
+    MixturePDF(MixturePDF<'scene>),
+    ZeroPDF(ZeroPDF),
+}
+
+#[enum_dispatch]
+pub(crate) trait PDFTrait {
+    #[must_use]
+    fn value(
+        &self,
+        direction: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float;
+
+    #[must_use]
+    fn generate(&self, rng: &mut SmallRng) -> Vec3;
+}
+
+#[derive(Debug, Clone)]
+pub struct CosinePDF {
+    uvw: ONB,
+}
+
+impl CosinePDF {
+    #[must_use]
+    pub fn new(w: Vec3) -> Self {
+        CosinePDF {
+            uvw: ONB::build_from_w(w),
+        }
+    }
+}
+
+impl PDFTrait for CosinePDF {
+    #[must_use]
+    fn value(
+        &self,
+        direction: Vec3,
+        _wavelength: Wavelength,
+        _time: Float,
+        _rng: &mut SmallRng,
+    ) -> Float {
+        let cosine = direction.normalize().dot(&self.uvw.w);
+        if cosine <= 0.0 {
+            0.0
+        } else {
+            cosine / PI
+        }
+    }
+
+    #[must_use]
+    fn generate(&self, rng: &mut SmallRng) -> Vec3 {
+        self.uvw.local(random_cosine_direction(rng))
+    }
+}
+
+#[derive(Debug, Clone)]
+pub struct HitablePDF<'scene> {
+    origin: Vec3,
+    hitable: &'scene Hitable<'scene>,
+}
+
+impl<'scene> HitablePDF<'scene> {
+    #[must_use]
+    pub fn new(hitable: &'scene Hitable, origin: Vec3) -> Self {
+        HitablePDF { origin, hitable }
+    }
+}
+
+impl<'scene> PDFTrait for HitablePDF<'scene> {
+    #[must_use]
+    fn value(
+        &self,
+        direction: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        self.hitable
+            .pdf_value(self.origin, direction, wavelength, time, rng)
+    }
+
+    #[must_use]
+    fn generate(&self, rng: &mut SmallRng) -> Vec3 {
+        self.hitable.random(self.origin, rng)
+    }
+}
+
+#[derive(Debug, Clone)]
+pub struct MixturePDF<'scene> {
+    // Box to prevent infinite size
+    pdf1: Box<PDF<'scene>>,
+    pdf2: Box<PDF<'scene>>,
+}
+
+impl<'scene> MixturePDF<'scene> {
+    #[must_use]
+    pub fn new(pdf1: PDF<'scene>, pdf2: PDF<'scene>) -> Self {
+        MixturePDF {
+            pdf1: Box::new(pdf1),
+            pdf2: Box::new(pdf2),
+        }
+    }
+}
+
+impl<'scene> PDFTrait for MixturePDF<'scene> {
+    #[must_use]
+    fn value(
+        &self,
+        direction: Vec3,
+        wavelength: Wavelength,
+        time: Float,
+        rng: &mut SmallRng,
+    ) -> Float {
+        0.5 * self.pdf1.value(direction, wavelength, time, rng)
+            + 0.5 * self.pdf2.value(direction, wavelength, time, rng)
+    }
+
+    #[must_use]
+    fn generate(&self, rng: &mut SmallRng) -> Vec3 {
+        if rng.gen::<bool>() {
+            self.pdf1.generate(rng)
+        } else {
+            self.pdf2.generate(rng)
+        }
+    }
+}
+
+#[derive(Debug, Clone, Default)]
+pub struct SpherePDF {}
+
+impl SpherePDF {
+    #[must_use]
+    pub fn new() -> Self {
+        SpherePDF {}
+    }
+}
+
+impl PDFTrait for SpherePDF {
+    #[must_use]
+    fn value(
+        &self,
+        _direction: Vec3,
+        _wavelength: Wavelength,
+        _time: Float,
+        _rng: &mut SmallRng,
+    ) -> Float {
+        1.0 / (4.0 * PI)
+    }
+
+    #[must_use]
+    fn generate(&self, rng: &mut SmallRng) -> Vec3 {
+        random_unit_vector(rng)
+    }
+}
+
+// TODO: this is an ugly hack due to tutorial saying `srec.pdf_ptr = 0;` in 12.2 Handling Specular for Metal
+#[derive(Debug, Clone)]
+pub struct ZeroPDF {}
+
+impl ZeroPDF {
+    #[must_use]
+    pub fn new() -> Self {
+        ZeroPDF {}
+    }
+}
+
+impl PDFTrait for ZeroPDF {
+    #[must_use]
+    fn value(
+        &self,
+        _direction: Vec3,
+        _wavelength: Wavelength,
+        _time: Float,
+        _rng: &mut SmallRng,
+    ) -> Float {
+        0.0
+    }
+
+    #[must_use]
+    fn generate(&self, rng: &mut SmallRng) -> Vec3 {
+        random_unit_vector(rng)
+    }
+}
+
+impl Default for ZeroPDF {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/random.rs.html b/src/clovers/random.rs.html new file mode 100644 index 00000000..28d49707 --- /dev/null +++ b/src/clovers/random.rs.html @@ -0,0 +1,93 @@ +random.rs - source
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
+
//! Various internal helper functions for getting specific kinds of random values.
+
+use crate::{Float, Vec3, PI};
+use rand::rngs::SmallRng;
+use rand::Rng;
+use rand_distr::{Distribution, UnitDisc, UnitSphere};
+
+/// Internal helper.
+#[must_use]
+pub fn random_unit_vector(rng: &mut SmallRng) -> Vec3 {
+    UnitSphere.sample(rng).into()
+}
+
+/// Internal helper.
+#[must_use]
+pub fn random_in_unit_disk(rng: &mut SmallRng) -> Vec3 {
+    let v: [Float; 2] = UnitDisc.sample(rng);
+    Vec3::new(v[0], v[1], 0.0)
+}
+
+/// Internal helper.
+#[must_use]
+pub fn random_cosine_direction(rng: &mut SmallRng) -> Vec3 {
+    let r1: Float = rng.gen();
+    let r2: Float = rng.gen();
+    let z = (1.0 - r2).sqrt();
+
+    let phi = 2.0 * PI * r1;
+    let x = phi.cos() * r2.sqrt();
+    let y = phi.sin() * r2.sqrt();
+
+    // TODO: should this be normalized?
+    Vec3::new(x, y, z)
+}
+
+/// Internal helper.
+#[must_use]
+pub fn random_on_hemisphere(normal: Vec3, rng: &mut SmallRng) -> Vec3 {
+    let in_unit_sphere: Vec3 = random_unit_vector(rng);
+    if in_unit_sphere.dot(&normal) > 0.0 {
+        // In the same hemisphere as the normal
+        in_unit_sphere
+    } else {
+        -in_unit_sphere
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/ray.rs.html b/src/clovers/ray.rs.html new file mode 100644 index 00000000..c44d1a65 --- /dev/null +++ b/src/clovers/ray.rs.html @@ -0,0 +1,49 @@ +ray.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+
//! The very core of the ray tracing rendering itself: the [Ray]
+
+use crate::{wavelength::Wavelength, Float, Vec3};
+
+/// A Ray has an origin and a direction, as well as an instant in time it exists in. Motion blur is achieved by creating multiple rays with slightly different times.
+#[derive(Clone, Debug, PartialEq)]
+pub struct Ray {
+    /// The origin of the ray.
+    pub origin: Vec3,
+    /// The direction of the ray.
+    pub direction: Vec3,
+    /// The time instant at which the ray exists.
+    pub time: Float,
+    /// Wavelength of the ray
+    pub wavelength: Wavelength,
+}
+
+impl Ray {
+    /// Evaluates the position (coordinate) at which the ray is at the given parameter, considering the origin and direction. Considering a default unit speed of 1 per unit time, this function can be given either a time or a distance.
+    #[must_use]
+    pub fn evaluate(&self, parameter: Float) -> Vec3 {
+        self.origin + parameter * self.direction
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/scenes.rs.html b/src/clovers/scenes.rs.html new file mode 100644 index 00000000..120ef853 --- /dev/null +++ b/src/clovers/scenes.rs.html @@ -0,0 +1,257 @@ +scenes.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+
//! A collection of objects, camera, and other things necessary to describe the environment you wish to render.
+
+use crate::{
+    bvhnode::BVHNode,
+    camera::{Camera, CameraInit},
+    hitable::Hitable,
+    materials::SharedMaterial,
+    objects::{object_to_hitable, Object},
+    Float, Vec,
+};
+
+use palette::Srgb;
+#[cfg(feature = "traces")]
+use tracing::info;
+
+#[derive(Debug)]
+/// A representation of the scene that is being rendered.
+pub struct Scene<'scene> {
+    /// Bounding-volume hierarchy of [Hitable] objects in the scene. This could, as currently written, be any [Hitable] - in practice, we place the root of the [BVHNode] tree here.
+    pub hitables: BVHNode<'scene>,
+    /// The camera object used for rendering the scene.
+    pub camera: Camera,
+    /// The background color to use when the rays do not hit anything in the scene.
+    pub background_color: Srgb, // TODO: make into Texture or something?
+    /// A [BVHNode] tree of prioritized objects - e.g. glass items or lights - that affect the biased sampling of the scene. Wrapped into a [Hitable] for convenience reasons (see various PDF functions).
+    pub priority_hitables: Hitable<'scene>,
+}
+
+impl<'scene> Scene<'scene> {
+    /// Creates a new [Scene] with the given parameters.
+    #[must_use]
+    pub fn new(
+        time_0: Float,
+        time_1: Float,
+        camera: Camera,
+        hitables: Vec<Hitable<'scene>>,
+        priority_hitables: Vec<Hitable<'scene>>,
+        background_color: Srgb,
+    ) -> Scene<'scene> {
+        Scene {
+            hitables: BVHNode::from_list(hitables, time_0, time_1),
+            camera,
+            background_color,
+            priority_hitables: Hitable::BVHNode(BVHNode::from_list(
+                priority_hitables,
+                time_0,
+                time_1,
+            )),
+        }
+    }
+}
+
+// TODO: better naming
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// A serialized representation of a [Scene].
+pub struct SceneFile {
+    time_0: Float,
+    time_1: Float,
+    background_color: Srgb,
+    camera: CameraInit,
+    objects: Vec<Object>,
+    #[cfg_attr(feature = "serde-derive", serde(default))]
+    materials: Vec<SharedMaterial>,
+}
+
+/// Initializes a new [Scene] instance by parsing the contents of a [`SceneFile`] structure and then using those details to construct the [Scene].
+#[must_use]
+pub fn initialize<'scene>(scene_file: SceneFile, width: u32, height: u32) -> Scene<'scene> {
+    let time_0 = scene_file.time_0;
+    let time_1 = scene_file.time_1;
+    let background_color = scene_file.background_color;
+
+    #[allow(clippy::cast_precision_loss)]
+    let camera = Camera::new(
+        scene_file.camera.look_from,
+        scene_file.camera.look_at,
+        scene_file.camera.up,
+        scene_file.camera.vertical_fov,
+        width as Float / height as Float,
+        scene_file.camera.aperture,
+        scene_file.camera.focus_distance,
+        time_0,
+        time_1,
+    );
+    let mut materials = scene_file.materials;
+    materials.push(SharedMaterial::default());
+    let materials = Box::leak(Box::new(materials));
+
+    #[cfg(feature = "traces")]
+    info!("Creating a flattened list from the objects");
+    let mut hitables: Vec<Hitable> = Vec::new();
+    let mut priority_hitables: Vec<Hitable> = Vec::new();
+
+    // TODO: this isn't the greatest ergonomics, but it gets the job done for now
+    for object in scene_file.objects {
+        if match &object {
+            Object::Boxy(i) => i.priority,
+            Object::ConstantMedium(i) => i.priority,
+            Object::MovingSphere(i) => i.priority,
+            Object::ObjectList(i) => i.priority,
+            Object::Quad(i) => i.priority,
+            Object::RotateY(i) => i.priority,
+            Object::Sphere(i) => i.priority,
+            Object::STL(i) => i.priority,
+            #[cfg(feature = "gl_tf")]
+            Object::GLTF(i) => i.priority,
+            Object::Translate(i) => i.priority,
+            Object::Triangle(i) => i.priority,
+        } {
+            let hitable = object_to_hitable(object, materials);
+            hitables.push(hitable.clone());
+            priority_hitables.push(hitable);
+        } else {
+            let hitable = object_to_hitable(object, materials);
+            hitables.push(hitable.clone());
+        }
+    }
+
+    Scene::new(
+        time_0,
+        time_1,
+        camera,
+        hitables,
+        priority_hitables,
+        background_color,
+    )
+}
+
\ No newline at end of file diff --git a/src/clovers/spectrum.rs.html b/src/clovers/spectrum.rs.html new file mode 100644 index 00000000..f10d2567 --- /dev/null +++ b/src/clovers/spectrum.rs.html @@ -0,0 +1,53 @@ +spectrum.rs - source
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
+
//! Utilities for [Physically Meaningful Rendering using Tristimulus Colours](https://doi.org/10.1111/cgf.12676)
+
+#![allow(clippy::cast_precision_loss)]
+
+use palette::{white_point::E, Xyz};
+
+use crate::{wavelength::Wavelength, Float};
+
+use self::spectra_xyz_5nm_380_780_097::equal_energy_reflectance;
+
+pub mod spectra_xyz_5nm_380_780_097;
+pub mod spectrum_grid;
+
+/// Evaluate the spectrum at the given wavelength for the given XYZ color
+#[must_use]
+pub fn spectrum_xyz_to_p(lambda: Wavelength, xyz: Xyz<E>) -> Float {
+    // Currently, the data is only built for 5nm intervals
+    // TODO: generate a file with 1nm intervals?
+    let lambda: f64 = lambda as f64;
+    let xyz: [f64; 3] = [f64::from(xyz.x), f64::from(xyz.y), f64::from(xyz.z)];
+    let p = spectrum_grid::spectrum_xyz_to_p(lambda, xyz) / equal_energy_reflectance;
+
+    #[allow(clippy::cast_possible_truncation)]
+    let p = p as Float;
+    p
+}
+
\ No newline at end of file diff --git a/src/clovers/spectrum/spectra_xyz_5nm_380_780_097.rs.html b/src/clovers/spectrum/spectra_xyz_5nm_380_780_097.rs.html new file mode 100644 index 00000000..2794065c --- /dev/null +++ b/src/clovers/spectrum/spectra_xyz_5nm_380_780_097.rs.html @@ -0,0 +1,319 @@ +spectra_xyz_5nm_380_780_097.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+
//! Hand-converted from `spectra_xyz_5nm_380_780_0.97.h` in the supplemental material from [Physically Meaningful Rendering using Tristimulus Colours](https://doi.org/10.1111/cgf.12676)
+
+#![allow(clippy::unreadable_literal)]
+#![allow(missing_docs)]
+#![allow(non_camel_case_types)]
+#![allow(non_upper_case_globals)]
+#![allow(non_snake_case)]
+
+// Basic info on the spectrum grid.
+pub const spectrum_grid_width: usize = 12;
+pub const spectrum_grid_height: usize = 14;
+pub const spectrum_grid_width_f: f64 = 12.0;
+pub const spectrum_grid_height_f: f64 = 14.0;
+
+// The spectra here have these properties.
+pub const spectrum_sample_min: f64 = 380.0;
+pub const spectrum_sample_max: f64 = 780.0;
+pub const spectrum_bin_size: f64 = 5.0;
+pub const spectrum_num_samples: usize = 81;
+pub const spectrum_num_samples_f: f64 = 81.0;
+
+// xy* color space.
+const spectrum_mat_xy_to_xystar: [f64; 6] = [
+    0.9088957044314135,
+    0.4170234986977646,
+    -0.441973067709726,
+    -0.4170234986977646,
+    0.9088957044314135,
+    -0.1639574019112163,
+];
+const spectrum_mat_xystar_to_xy: [f64; 6] = [
+    0.9088957044314137,
+    -0.41702349869776467,
+    0.33333333333333337,
+    0.41702349869776467,
+    0.9088957044314137,
+    0.3333333333333333,
+];
+// uv color space.
+const spectrum_mat_xy_to_uv: [f64; 6] = [
+    16.642783858871084,
+    7.636114813898141,
+    -2.0929662242564078,
+    -7.382929931517094,
+    16.090971664254482,
+    1.0973194224208704,
+];
+const spectrum_mat_uv_to_xy: [f64; 6] = [
+    0.04963661179157505,
+    -0.023555498979304087,
+    0.1297356585010993,
+    0.022774487118711398,
+    0.05133881401140044,
+    -0.008668845424536832,
+];
+
+// apply a 3x2 matrix to a 2D color.
+pub fn spectrum_apply_3x2(matrix: [f64; 6], src: [f64; 2], tgt: &mut [f64; 2]) {
+    tgt[0] = matrix[0] * src[0] + matrix[1] * src[1] + matrix[2];
+    tgt[1] = matrix[3] * src[0] + matrix[4] * src[1] + matrix[5];
+}
+
+// Concrete conversion routines.
+pub fn spectrum_xy_to_xystar(xy: [f64; 2], xystar: &mut [f64; 2]) {
+    spectrum_apply_3x2(spectrum_mat_xy_to_xystar, xy, xystar);
+}
+pub fn spectrum_xystar_to_xy(xystar: [f64; 2], xy: &mut [f64; 2]) {
+    spectrum_apply_3x2(spectrum_mat_xystar_to_xy, xystar, xy);
+}
+pub fn spectrum_xy_to_uv(xy: [f64; 2], uv: &mut [f64; 2]) {
+    spectrum_apply_3x2(spectrum_mat_xy_to_uv, xy, uv);
+}
+pub fn spectrum_uv_to_xy(uv: [f64; 2], xy: &mut [f64; 2]) {
+    spectrum_apply_3x2(spectrum_mat_uv_to_xy, uv, xy);
+}
+
+// Grid cells. Laid out in row-major format.
+// num_points = 0 for cells without data points.
+#[derive(Debug)]
+pub struct spectrum_grid_cell_t {
+    pub inside: usize,
+    pub num_points: usize,
+    pub idx: [isize; 6],
+}
+
+#[rustfmt::skip]
+pub const spectrum_grid: [spectrum_grid_cell_t; 168] = [
+    spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [148, 110, 0, 12, 111, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [0, 1, 12, 13, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [1, 2, 13, 14, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [2, 3, 14, 15, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [3, 4, 15, 16, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [4, 5, 16, 17, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [5, 6, 17, 18, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [6, 7, 18, 19, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [7, 8, 19, 20, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [8, 9, 20, 21, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [9, 10, 21, 22, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [149, 10, 11, 145, 22, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [150, 111, 12, 23, 112, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [12, 13, 23, 24, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [13, 14, 24, 25, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [14, 15, 25, 26, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [15, 16, 26, 27, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [16, 17, 27, 28, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [17, 18, 28, 29, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [18, 19, 29, 30, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [19, 20, 30, 31, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [20, 21, 31, 32, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [21, 22, 32, 33, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [151, 22, 145, 146, 33, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [152, 112, 23, 34, 113, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [23, 24, 34, 35, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [24, 25, 35, 36, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [25, 26, 36, 37, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [26, 27, 37, 38, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [27, 28, 38, 39, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [28, 29, 39, 40, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [29, 30, 40, 41, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [30, 31, 41, 42, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [31, 32, 42, 43, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 6, idx: [153, 32, 33, 147, 141, 43], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [154, 33, 146, 147, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [155, 113, 34, 44, 114, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [34, 35, 44, 45, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [35, 36, 45, 46, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [36, 37, 46, 47, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [37, 38, 47, 48, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [38, 39, 48, 49, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [39, 40, 49, 50, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [40, 41, 50, 51, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [41, 42, 51, 52, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [42, 43, 52, 53, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [156, 43, 141, 142, 53, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [157, 114, 44, 54, 115, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [44, 45, 54, 55, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [45, 46, 55, 56, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [46, 47, 56, 57, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [47, 48, 57, 58, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [48, 49, 58, 59, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [49, 50, 59, 60, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [50, 51, 60, 61, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [51, 52, 61, 62, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [52, 53, 62, 63, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [158, 53, 142, 143, 63, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [159, 115, 54, 116, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 6, idx: [160, 116, 54, 55, 64, 117], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [55, 56, 64, 65, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [56, 57, 65, 66, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [57, 58, 66, 67, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [58, 59, 67, 68, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [59, 60, 68, 69, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [60, 61, 69, 70, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [61, 62, 70, 71, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 6, idx: [161, 62, 63, 144, 138, 71], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [162, 63, 143, 144, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [163, 117, 64, 72, 118, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [64, 65, 72, 73, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [65, 66, 73, 74, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [66, 67, 74, 75, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [67, 68, 75, 76, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [68, 69, 76, 77, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [69, 70, 77, 78, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [70, 71, 78, 79, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [164, 71, 138, 139, 79, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [165, 118, 72, 80, 119, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [72, 73, 80, 81, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [73, 74, 81, 82, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [74, 75, 82, 83, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [75, 76, 83, 84, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [76, 77, 84, 85, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [77, 78, 85, 86, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 6, idx: [166, 78, 79, 140, 134, 86], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [167, 79, 139, 140, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [168, 119, 80, 120, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 6, idx: [169, 80, 81, 87, 121, 120], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [81, 82, 87, 88, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [82, 83, 88, 89, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [83, 84, 89, 90, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [84, 85, 90, 91, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [85, 86, 91, 92, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [170, 86, 134, 135, 92, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [171, 121, 87, 93, 122, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [87, 88, 93, 94, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [88, 89, 94, 95, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [89, 90, 95, 96, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [90, 91, 96, 97, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [91, 92, 97, 98, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [172, 92, 135, 136, 98, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [173, 122, 93, 99, 123, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [93, 94, 99, 100, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [94, 95, 100, 101, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [95, 96, 101, 102, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [96, 97, 102, 103, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 6, idx: [174, 97, 98, 137, 131, 103], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [175, 98, 136, 137, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [176, 123, 99, 124, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 6, idx: [177, 124, 99, 100, 104, 125], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [100, 101, 104, 105, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [101, 102, 105, 106, -1, -1], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [102, 103, 106, 107, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [178, 103, 131, 132, 107, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [179, 125, 104, 126, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 6, idx: [180, 104, 105, 108, 127, 126], }, spectrum_grid_cell_t { inside: 1, num_points: 4, idx: [105, 106, 108, 109, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 6, idx: [181, 106, 107, 133, 129, 109], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [182, 107, 132, 133, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [183, 127, 108, 128, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 5, idx: [184, 108, 109, 130, 128, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 4, idx: [185, 109, 129, 130, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], }, spectrum_grid_cell_t { inside: 0, num_points: 0, idx: [-1, -1, -1, -1, -1, -1], },
+];
+
+// Grid data points.
+#[derive(Debug)]
+pub struct spectrum_data_point_t {
+    pub xystar: [f64; 2],
+    pub uv: [f64; 2],
+    pub spectrum: [f64; 81], // X+Y+Z = 1
+}
+
+#[rustfmt::skip]
+pub const spectrum_data_points: [spectrum_data_point_t; 186] = [
+	spectrum_data_point_t { xystar: [-0.2730599976959221, -0.22593929649394454], uv: [1.0, 0.0], spectrum: [ 0.0254585661435, 0.0254522837222, 0.0254350677521, 0.0253976483946, 0.025323907854, 0.0251819538591, 0.0249304383689, 0.0244765987892, 0.0236680837374, 0.0222722024021, 0.020026196415, 0.0168335337637, 0.0128503686647, 0.00847600843427, 0.00430773842015, 0.00115019839385, 0.0, 0.0, 0.0, 0.0, 0.0, 6.110194812e-19, 0.0, 0.0, 0.0, 0.0, 4.96529841167e-18, 0.0, 0.0, 4.97688472401e-17, 6.42158160797e-18, 0.0, 2.70243428816e-17, 0.0, 8.66880413823e-18, 0.0, 5.94822166417e-18, 1.49646918938e-17, 0.0, 0.0, 0.0, 2.66043174773e-17, 4.07611299633e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.3067101609e-19, 6.10705373879e-19, 1.22579462575e-18, 0.000222158936213, 0.000780519255798, 0.00142595962105, 0.00203306327779, 0.00254859436028, 0.00295991785315, 0.0032784444078, 0.00351968511024, 0.00369934230045, 0.00382942826596, 0.00392212358524, 0.00398812362781, 0.00403503310349, 0.00406829810979, 0.00409198942868, 0.00410836277454, 0.0041198306567, 0.00412794441995, 0.00413346398971, 0.00413715864266, 0.00413970729069, 0.0041413984228, 0.00414251331383, 0.00414349789867, 0.00414389409983, 0.00414406911746, 0.00414408142048, 0.00414403637657, 0.004143986692 ] }, spectrum_data_point_t { xystar: [-0.2184479981567377, -0.22593929649394454], uv: [1.9999999999999991, 0.0], spectrum: [ 0.025703212686, 0.0256958123579, 0.0256754714378, 0.0256307574533, 0.0255433019159, 0.0253755794002, 0.025079069654, 0.0245453008523, 0.0235953544541, 0.0219602062429, 0.0193528399602, 0.0157020705667, 0.01125698102, 0.00657370479699, 0.0024618841587, 4.91278504304e-18, 0.0, 9.89913688466e-19, 0.0, 9.56279823772e-18, 0.0, 1.07761566206e-17, 0.0, 0.0, 0.0, 7.27442750244e-18, 0.0, 0.0, 0.0, 0.0, 3.50560885187e-17, 1.61118947862e-17, 0.0, 0.0, 9.23262376455e-17, 1.24122622978e-16, 1.10157773429e-16, 6.82656157849e-17, 0.0, 0.0, 0.0, 0.0, 1.77980795897e-17, 0.0, 0.0, 5.39515326386e-18, 0.0, 1.60374413182e-17, 1.26174957953e-17, 0.0, 0.00017801467656, 0.00166387500998, 0.00367423897568, 0.00573129520175, 0.00758006831586, 0.00912366609602, 0.0103482843063, 0.0112851181961, 0.0119877454231, 0.0125087134888, 0.0128904161959, 0.0131640314008, 0.0133579452518, 0.0134954912424, 0.0135935314476, 0.0136630487119, 0.0137120620992, 0.0137469335741, 0.0137712316315, 0.0137888561752, 0.0138011448892, 0.013809269721, 0.0138151723777, 0.0138187163145, 0.013821109359, 0.013823076674, 0.0138240636589, 0.0138246033642, 0.0138249160415, 0.0138250323546, 0.0138253404443 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, -0.22593929649394454], uv: [3.0, 0.0], spectrum: [ 0.0273015839617, 0.0272909016632, 0.0272627783319, 0.0272015940763, 0.0270826032284, 0.0268558259227, 0.0264557392346, 0.025736895219, 0.024459762729, 0.0222800642963, 0.018865035797, 0.0142191998826, 0.00884394451225, 0.00370682062664, 0.000162135082284, 1.65416834651e-17, 0.0, 1.91531797173e-18, 4.72427753235e-18, 0.0, 0.0, 3.04313213571e-17, 1.47708145718e-16, 1.4051315342e-16, 6.58767975115e-17, 0.0, 1.18960958141e-17, 1.15255889085e-16, 1.94853795902e-17, 0.0, 8.20141019166e-17, 0.0, 7.14866463642e-17, 0.0, 1.5632540932e-17, 0.0, 0.0, 0.0, 8.67480062718e-17, 0.0, 3.2299737916e-17, 1.30821128916e-16, 2.3444717416e-17, 1.15555448214e-17, 8.47684298339e-18, 4.02980464871e-18, 0.0, 3.60264171961e-17, 0.0, 2.03455285038e-17, 0.000590829809805, 0.00329081860838, 0.00680772730724, 0.0103587914006, 0.0135302271332, 0.016168601135, 0.0182562261668, 0.0198507331248, 0.0210470817991, 0.0219334156928, 0.0225818078691, 0.0230462024419, 0.0233761741504, 0.0236110816736, 0.0237775682178, 0.0238950208618, 0.023977210895, 0.0240350583992, 0.0240759151433, 0.0241043225528, 0.0241245482236, 0.0241384367901, 0.0241488837023, 0.0241559834645, 0.0241605593132, 0.024163017671, 0.0241633909172, 0.0241633173015, 0.0241646004231, 0.0241653268645, 0.0241654545742 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, -0.22593929649394454], uv: [3.9999999999999996, 0.0], spectrum: [ 0.0292172476514, 0.0292027005593, 0.0291648304843, 0.0290818838268, 0.0289171082704, 0.0286001877055, 0.0280378658396, 0.0270325685501, 0.0252674921324, 0.0222951298899, 0.0177550175831, 0.0118621347373, 0.00564140013975, 0.000880464827564, 0.0, 1.57043123017e-17, 1.6981481375e-18, 4.22789382289e-18, 0.0, 0.0, 2.16794680928e-17, 3.00401396716e-16, 1.40402888474e-16, 3.01340296417e-16, 1.85195273035e-16, 0.0, 7.39734400528e-17, 2.1707461176e-17, 1.36248306826e-16, 0.0, 0.0, 0.0, 5.16258776681e-17, 1.0911751589e-16, 0.0, 0.0, 2.53016676934e-16, 6.72967183504e-17, 8.94333998676e-17, 1.96842991909e-16, 0.0, 4.50481408826e-17, 0.0, 2.73593181097e-17, 0.0, 0.0, 1.99208945611e-17, 2.18188898375e-17, 7.02509560632e-17, 1.85246672914e-17, 0.0, 0.00375570918052, 0.00918013002447, 0.0148501874848, 0.0200006195184, 0.0243293419706, 0.027777160142, 0.0304215752458, 0.0324069334709, 0.0338789644763, 0.0349594246855, 0.0357382450642, 0.036292085401, 0.0366848202854, 0.0369627375642, 0.0371601771328, 0.0372997698954, 0.0373982391711, 0.0374665364183, 0.0375132822485, 0.03754637491, 0.0375676160202, 0.0375830896076, 0.0375932316943, 0.0375989076926, 0.037603775793, 0.0376085150451, 0.0376112268996, 0.0376136199132, 0.0376140835345, 0.0376138615994 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, -0.22593929649394454], uv: [5.0, 0.0], spectrum: [ 0.0319947912671, 0.031972888111, 0.0319152568658, 0.0317897922402, 0.0315444972706, 0.0310746312805, 0.0302486329565, 0.0287810136446, 0.0262224685696, 0.021987133602, 0.0157758902291, 0.0083486497378, 0.00190729060743, 0.0, 9.76878844319e-18, 1.4986393037e-17, 0.0, 0.0, 1.61872055124e-16, 4.07318009966e-17, 5.36629917985e-17, 1.41458964372e-16, 4.25041849411e-16, 4.02050909309e-16, 1.77833338239e-16, 0.0, 0.0, 0.0, 6.86380086555e-16, 1.39376513197e-15, 0.0, 0.0, 0.0, 4.51089755673e-16, 2.03497527304e-16, 1.54646019859e-16, 0.0, 1.53567443985e-16, 5.43288144149e-17, 0.0, 0.0, 1.03660823127e-16, 2.13836674987e-16, 0.0, 4.42389221806e-17, 0.0, 7.46715833319e-17, 7.05983931598e-17, 0.0, 4.23684949094e-17, 0.0, 0.00287282413321, 0.00993014942054, 0.0182601682041, 0.0262270604094, 0.0331101202341, 0.0386847489274, 0.0430092686054, 0.0462871140152, 0.0487359656759, 0.0505383093944, 0.0518345635124, 0.0527559334459, 0.0534116340728, 0.0538789261771, 0.0542101932192, 0.0544441754576, 0.0546084283259, 0.0547231882103, 0.0548032329068, 0.0548589410642, 0.0548975595968, 0.0549239138902, 0.054942222879, 0.0549548412603, 0.0549633351862, 0.0549691836946, 0.0549732634794, 0.0549758439358, 0.0549772782421, 0.0549778984077 ] }, spectrum_data_point_t { xystar: [0.0, -0.22593929649394454], uv: [6.0, 0.0], spectrum: [ 0.0337362695207, 0.033705308509, 0.0336251723538, 0.0334531844717, 0.0331193435471, 0.0324812154317, 0.0313626944383, 0.0293893129373, 0.0259821353036, 0.0204589636198, 0.0127665325009, 0.00460238343076, 0.0, 0.0, 0.0, 4.20650140412e-18, 1.03527382291e-17, 2.64577265852e-17, 9.25797438713e-17, 0.0, 2.18413763557e-17, 0.0, 2.05484725171e-16, 0.0, 8.94262649139e-17, 6.78032255625e-16, 0.0, 0.0, 0.0, 1.04902065121e-15, 0.0, 0.0, 0.0, 0.0, 0.0, 2.77995325641e-16, 6.39398236268e-16, 2.53631080707e-16, 6.25087313364e-16, 6.56056301013e-17, 5.43916149375e-16, 0.0, 0.0, 0.0, 1.73048817161e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.000526513917857, 0.00918548463373, 0.0208260903052, 0.0324928378915, 0.0428135326211, 0.0512862826491, 0.0579153676656, 0.0629708317891, 0.0667648306009, 0.0695674330034, 0.0715886773735, 0.073026736204, 0.0740499144551, 0.0747790771392, 0.0752958034878, 0.0756606902402, 0.0759180521534, 0.0760989817872, 0.0762253916593, 0.0763136492823, 0.0763744388629, 0.0764160807809, 0.0764449691519, 0.0764646375783, 0.0764780046467, 0.0764869198009, 0.07649281644, 0.0764962580195, 0.0764982582092, 0.0764990008958 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, -0.22593929649394454], uv: [6.999999999999999, 0.0], spectrum: [ 0.0370491213617, 0.037004149959, 0.0368868972596, 0.0366335576836, 0.0361428474736, 0.0352051748469, 0.033568022512, 0.0307046415968, 0.0258289749619, 0.0181566041349, 0.00828519947133, 0.0, 1.53653396174e-17, 3.16741138109e-17, 3.69846185468e-17, 3.07206552056e-18, 0.0, 8.90048364299e-17, 1.42228760564e-16, 0.0, 0.0, 8.04628132715e-16, 3.13650321597e-16, 0.0, 0.0, 2.08116080254e-15, 0.0, 3.89656550142e-16, 0.0, 0.0, 1.60741184505e-15, 2.70875538529e-16, 8.84032301654e-16, 0.0, 0.0, 0.0, 2.3496653485e-16, 0.0, 5.74876693894e-16, 9.72389342015e-16, 9.52322863699e-16, 0.0, 1.84349104556e-17, 0.0, 0.0, 0.0, 1.68507755794e-16, 0.0, 6.08222805419e-17, 0.0, 3.95636337354e-16, 0.0, 0.00635088634917, 0.0205951683775, 0.036752365582, 0.0518577483115, 0.0646384529837, 0.07482136171, 0.0826866403387, 0.0886437476255, 0.0930744866946, 0.0962854923306, 0.0985766256666, 0.100209959852, 0.101374703855, 0.102200019116, 0.102782706242, 0.103192387509, 0.103479347871, 0.103679721738, 0.103818911072, 0.1039151256, 0.103981482892, 0.104027090038, 0.104058853557, 0.104080846412, 0.104096017301, 0.104106200336, 0.104112476501, 0.104116343443, 0.104117862769 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, -0.22593929649394454], uv: [8.0, 0.0], spectrum: [ 0.0368902744869, 0.0368311764427, 0.0366777048889, 0.0363467253374, 0.035708402853, 0.034490469283, 0.0323767859305, 0.0287332344481, 0.022662677267, 0.0135697877335, 0.00354554029151, 1.30773152593e-16, 5.50232492303e-17, 0.0, 2.08036560891e-17, 9.54413790121e-17, 0.0, 6.57732655147e-17, 4.55702302408e-18, 0.0, 0.0, 0.0, 0.0, 1.52610131497e-15, 7.68127598397e-16, 3.1262333067e-15, 1.671401742e-15, 0.0, 3.83081903592e-16, 0.0, 8.33499909446e-16, 0.0, 3.59755453296e-16, 2.12056514795e-15, 6.70993224202e-16, 9.92000637553e-16, 0.0, 0.0, 6.77800203463e-16, 0.0, 2.06611543271e-15, 0.0, 1.70897605594e-17, 0.0, 8.16479017786e-16, 3.09366292851e-16, 0.0, 0.0, 0.0, 1.02695967386e-15, 0.0, 0.0, 0.00082766716114, 0.0175268405932, 0.0394028724852, 0.0609734613779, 0.0797181612257, 0.0948858791009, 0.106726058786, 0.115761237854, 0.122518498379, 0.12743345782, 0.130946320139, 0.133452401185, 0.13523960252, 0.136505742022, 0.137399229712, 0.138027451439, 0.138467577476, 0.138774907132, 0.138988605889, 0.139136835604, 0.13923917277, 0.139309793909, 0.139358870555, 0.139393268018, 0.139416476003, 0.139432544604, 0.139442391365, 0.139448338262, 0.139450688188 ] }, spectrum_data_point_t { xystar: [0.1638359986175532, -0.22593929649394454], uv: [9.0, 0.0], spectrum: [ 0.0376545905526, 0.0375706477456, 0.0373530820132, 0.0368857493298, 0.035993830402, 0.0342994172816, 0.0313883735902, 0.0264818832246, 0.0186008746124, 0.00784310233523, 1.56174190013e-15, 1.49224846955e-16, 9.36567550174e-17, 5.68558706208e-16, 0.0, 0.0, 0.0, 2.05644240937e-16, 0.0, 0.0, 0.0, 5.85735861979e-16, 1.96049678331e-15, 0.0, 0.0, 0.0, 0.0, 7.46683287634e-15, 6.84582101646e-15, 0.0, 0.0, 0.0, 1.7550705372e-14, 6.3398082955e-16, 0.0, 0.0, 0.0, 2.86817664347e-15, 1.43672284961e-15, 5.68360808523e-15, 0.0, 0.0, 0.0, 7.92305345273e-16, 0.0, 1.02303322823e-15, 1.62569068191e-15, 3.79466967881e-16, 7.96620907545e-16, 1.95081046084e-16, 0.0, 3.00204424391e-16, 0.0, 0.0105393478538, 0.0363868311364, 0.0658479497484, 0.0931122030506, 0.115937677903, 0.134154871709, 0.148268814268, 0.158941591396, 0.166762934991, 0.172374320597, 0.176385140371, 0.179247298845, 0.1812752709, 0.182707124043, 0.183713843687, 0.184419374896, 0.184912516252, 0.185256539999, 0.185495022472, 0.185659747444, 0.18577292787, 0.185851039807, 0.185905212542, 0.185942085542, 0.185967296164, 0.185982914932, 0.185992780157, 0.185996762263 ] }, spectrum_data_point_t { xystar: [0.21844799815673765, -0.22593929649394454], uv: [10.0, 0.0], spectrum: [ 0.034665808729, 0.034559476579, 0.0342862436974, 0.0337026255603, 0.0326010258466, 0.0305164278605, 0.0269724021235, 0.021152685968, 0.0122112864061, 0.00150315541515, 0.0, 2.6589560777e-15, 0.0, 1.60467374511e-15, 7.28676221146e-15, 0.0, 8.31303920914e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 7.87494091259e-15, 0.0, 0.0, 0.0, 0.0, 0.0, 1.34778218395e-14, 3.81624185694e-16, 8.48792256724e-15, 1.4232738218e-14, 0.0, 0.0, 0.0, 0.0, 0.0, 2.57433238906e-15, 1.86807910948e-15, 0.0, 0.0, 4.45921928876e-16, 0.0, 0.0, 1.10482105732e-15, 1.44595029353e-15, 0.0, 0.0, 1.08601118934e-15, 2.60261014912e-15, 0.0, 4.30941871895e-15, 3.19037661838e-15, 0.00127700838243, 0.0308826120767, 0.0692949175984, 0.106532631729, 0.138434836145, 0.164265518471, 0.184469345282, 0.199851701892, 0.211174539744, 0.219317070603, 0.225142288622, 0.229301016522, 0.232248712346, 0.234329947954, 0.235794023955, 0.236820629944, 0.237539755271, 0.238039289358, 0.238386628905, 0.238625310364, 0.238787412261, 0.238902012036, 0.238980896507, 0.239036086903, 0.239074586444, 0.239096715389, 0.239112697578, 0.239118807577 ] }, spectrum_data_point_t { xystar: [0.2730599976959221, -0.22593929649394454], uv: [11.0, 0.0], spectrum: [ 0.026622521527, 0.0264912261276, 0.0261578057518, 0.0254529121405, 0.0241594371452, 0.0217390020646, 0.017752842583, 0.011728629248, 0.00389292549461, 1.90772987891e-15, 0.0, 0.0, 0.0, 0.0, 2.26098780708e-14, 6.14914267782e-16, 0.0, 0.0, 5.45391070788e-15, 4.59497071466e-15, 0.0, 1.88391341712e-14, 6.36089223653e-15, 1.43083445864e-14, 0.0, 5.45291480142e-15, 0.0, 5.39111472265e-15, 0.0, 0.0, 0.0, 1.15995672037e-14, 0.0, 2.57001523924e-15, 2.16730327545e-14, 0.0, 7.87503366771e-15, 1.30896553583e-14, 3.37987402433e-15, 0.0, 5.14764764659e-15, 0.0, 0.0, 0.0, 1.34483723995e-15, 0.0, 4.73527625937e-16, 0.0, 4.63983547971e-16, 1.18431240908e-15, 5.90099797345e-15, 3.55253585192e-15, 7.5467478642e-15, 0.0, 0.0172179777888, 0.0619424979483, 0.112416189458, 0.158586433302, 0.19741889671, 0.228537471812, 0.252630721358, 0.270560614202, 0.283523078009, 0.292821209495, 0.299465568261, 0.304173621676, 0.307498378409, 0.309837912709, 0.311479295109, 0.312628481015, 0.313429671212, 0.313984894403, 0.314367857731, 0.314630402115, 0.314813455872, 0.31494164252, 0.315031841959, 0.315094810867, 0.3151337249, 0.315159022787, 0.315168914674 ] }, spectrum_data_point_t { xystar: [0.32767199723510654, -0.22593929649394454], uv: [12.0, 0.0], spectrum: [ 0.00813094897749, 0.00802437302395, 0.00776438303151, 0.00723588848047, 0.00634729938504, 0.00473860672718, 0.00237392534919, 1.22370313877e-15, 0.0, 0.0, 0.0, 0.0, 1.04774520779e-15, 0.0, 3.08795470432e-15, 1.25389829762e-14, 1.02987703315e-14, 0.0, 1.1204606546e-15, 1.24574397704e-14, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 7.79280167586e-15, 0.0, 0.0, 3.22221180153e-14, 0.0, 0.0, 2.92350630152e-14, 3.57764356753e-15, 0.0, 1.20422318725e-14, 0.0, 3.68533388834e-15, 0.0, 0.0, 0.0, 2.99102352474e-15, 1.30776870422e-14, 4.16255456584e-15, 1.38005915147e-15, 0.0, 2.99699137135e-15, 0.0, 0.0, 5.17263166272e-17, 0.0, 0.0, 0.0, 0.0, 0.00141517143732, 0.0521087392278, 0.116784137086, 0.178583733526, 0.231785220136, 0.275022768402, 0.308815996415, 0.334116183907, 0.352463161006, 0.365642909281, 0.375065324925, 0.38174109052, 0.386455597068, 0.389773836843, 0.392102007165, 0.393733062495, 0.394870597351, 0.395658546784, 0.39620342768, 0.396576433186, 0.396836852782, 0.397018854809, 0.397147391827, 0.397238722798, 0.39729439021, 0.397330819675, 0.397345809825 ] }, spectrum_data_point_t { xystar: [-0.2730599976959221, -0.1694544723704584], uv: [1.0, 1.0], spectrum: [ 0.0091653433919, 0.00916498698908, 0.00916469134351, 0.0091634582558, 0.00916100358378, 0.00915667695405, 0.00914836144249, 0.00913288486691, 0.00910466758446, 0.00905390137782, 0.00896534153466, 0.00882926798736, 0.0086360622584, 0.00838305090033, 0.00807033414915, 0.00769922813107, 0.0072729224796, 0.00679476685394, 0.00627242780753, 0.00571624280945, 0.00513759245271, 0.00454835849645, 0.00395711147733, 0.00337464154654, 0.00280749740456, 0.00226682876686, 0.00176310907453, 0.00130547471702, 0.000905779759447, 0.000571855092001, 0.000311208875046, 0.000127002966088, 2.27290703342e-5, 0.0, 4.78273447194e-20, 2.08894233235e-20, 0.0, 0.0, 0.0, 4.22264438881e-21, 2.13855148983e-20, 9.51864157305e-21, 1.19983930184e-5, 4.60782307405e-5, 9.53880869555e-5, 0.000152298212592, 0.000211118272231, 0.000269189597303, 0.000323096365829, 0.000370094033468, 0.000408679255951, 0.00044053743596, 0.000465518193849, 0.000484648753775, 0.000500103078853, 0.000512722774307, 0.000521401761115, 0.000527616921397, 0.000532543346179, 0.000536659517574, 0.000539778041574, 0.000541540251261, 0.000542524937145, 0.000543291291334, 0.000543586141659, 0.000543507179099, 0.000542980324501, 0.00054312233015, 0.000543037271523, 0.000542917430232, 0.000542865224303, 0.000542777005272, 0.000542616042571, 0.000542808861172, 0.000543012894916, 0.00054314869738, 0.00054318880014, 0.000543195645874, 0.000542803873351, 0.000542632005164, 0.000542519585918 ] }, spectrum_data_point_t { xystar: [-0.2184479981567377, -0.1694544723704584], uv: [1.9999999999999991, 1.0], spectrum: [ 0.00839492804249, 0.00839499038748, 0.00839468362032, 0.00839368052039, 0.00839127535537, 0.00838666836435, 0.00837748085054, 0.00836141803414, 0.00833258711089, 0.00828324081127, 0.00819776042453, 0.00806692381432, 0.00788190770521, 0.00764092973918, 0.00734291154708, 0.00699038325809, 0.00658437708841, 0.00613143437739, 0.00563855984548, 0.0051140905654, 0.00456996990388, 0.00401793568637, 0.00346663658146, 0.00292618641689, 0.00240268838536, 0.00190810043077, 0.00144920753665, 0.00103909243282, 0.000686575774405, 0.00040214387125, 0.000189962126253, 5.50465245159e-5, 0.0, 8.85573359543e-23, 1.79084072014e-20, 0.0, 0.0, 4.14777285739e-21, 4.54079455467e-5, 0.000137448200226, 0.000265371643783, 0.000420176813866, 0.000590957746775, 0.000769874255758, 0.000948583809085, 0.00111984232434, 0.00127902828812, 0.00142175246388, 0.00154554078944, 0.00164945007676, 0.00173568080995, 0.00180526058114, 0.00186065007927, 0.00190420681578, 0.00193641969961, 0.00196031899743, 0.00197813589321, 0.00199052602258, 0.00199898312215, 0.00200530138527, 0.00200999558568, 0.00201261850619, 0.00201418704115, 0.00201526559776, 0.00201612026596, 0.00201705295963, 0.00201683028133, 0.00201685125805, 0.00201702650973, 0.00201676165219, 0.0020164595663, 0.00201633912206, 0.00201599119367, 0.0020155289953, 0.00201528129426, 0.00201538017063, 0.00201580106315, 0.00201537016576, 0.00201530490518, 0.00201554875076, 0.00201565565895 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, -0.1694544723704584], uv: [3.0, 1.0], spectrum: [ 0.00767811432245, 0.00767775377923, 0.00767714311449, 0.00767546684836, 0.0076722593789, 0.00766780138506, 0.00766150430755, 0.00764828248498, 0.00762166738982, 0.0075738938148, 0.00749056138353, 0.00736093257103, 0.0071783716266, 0.0069374300444, 0.00664018978972, 0.0062895737139, 0.00588711608196, 0.00544003627112, 0.0049551008379, 0.00444392072753, 0.00391644861239, 0.00338467794526, 0.00286021683149, 0.0023497886131, 0.00186216964569, 0.00140699594211, 0.0009980116798, 0.000645114334099, 0.000360137326434, 0.000154606351326, 3.40069959193e-5, 0.0, 0.0, 0.0, 0.0, 4.11831751021e-20, 2.3293744841e-5, 0.00011774364124, 0.000269648291546, 0.000471126901272, 0.000708688760511, 0.000971352220509, 0.0012493322688, 0.00152724310317, 0.00179738511587, 0.00204985611134, 0.00227993169894, 0.00248244222316, 0.00265779981318, 0.00280613873506, 0.00292867383738, 0.00302734024171, 0.00310528119219, 0.0031664478888, 0.00321279685767, 0.00324754440086, 0.00327383073593, 0.00329186086353, 0.00330535947096, 0.00331425243951, 0.00332027332125, 0.00332467981801, 0.00332762575118, 0.00332924644811, 0.00332981654218, 0.00333080994195, 0.00333221998209, 0.00333308507448, 0.00333387213126, 0.00333453735507, 0.00333510572326, 0.00333528664867, 0.00333522087215, 0.00333538115091, 0.00333545507987, 0.00333474934044, 0.00333418806291, 0.00333356184059, 0.00333272153693, 0.00333151737397, 0.00333131345192 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, -0.1694544723704584], uv: [3.9999999999999996, 1.0], spectrum: [ 0.00701596130472, 0.00701615415616, 0.00701520291077, 0.00701365007873, 0.00701151900927, 0.00700656018327, 0.00699769732651, 0.00698236975156, 0.00695331835866, 0.00690170977653, 0.00681519504633, 0.00668042997879, 0.00649214546345, 0.00624638748619, 0.00594293025738, 0.00558583732045, 0.00517938439134, 0.0047301947648, 0.0042468853195, 0.00373756607593, 0.00321703724609, 0.00269892143381, 0.00219307531026, 0.00171064759491, 0.00126169830645, 0.000859042307779, 0.000517381398865, 0.000250823796011, 7.42390516803e-5, 2.88024063323e-20, 0.0, 0.0, 0.0, 0.0, 1.80661823869e-20, 6.09936392273e-21, 7.11254531393e-5, 0.000228904242077, 0.000462607717281, 0.00075660552303, 0.00109667030956, 0.0014663572739, 0.00185211946331, 0.00223874346944, 0.00261182802274, 0.00296124145658, 0.00327807878431, 0.00355861454368, 0.00379977853116, 0.00400309245177, 0.00417116137415, 0.00430510770107, 0.00441165167943, 0.00449322998461, 0.00455505130234, 0.00460122730021, 0.00463531798527, 0.00466055430637, 0.0046781403112, 0.0046901410586, 0.00469912334416, 0.00470527245142, 0.00470990760806, 0.00471264051839, 0.00471429030676, 0.00471528393711, 0.00471681540732, 0.00471732577771, 0.00471748287811, 0.00471813591174, 0.00471780920218, 0.00471799963079, 0.00471819929994, 0.004718295843, 0.00471788677538, 0.0047178142311, 0.00471782325458, 0.00471805237195, 0.00471782590236, 0.00471758618461, 0.00471732328234 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, -0.1694544723704584], uv: [5.0, 1.0], spectrum: [ 0.0063983829998, 0.00639824022135, 0.00639814664179, 0.00639703533916, 0.00639498579412, 0.00638900730293, 0.00637881551576, 0.00636117588553, 0.00632917364181, 0.00627261703232, 0.00617735237015, 0.00603133866201, 0.00582926242079, 0.00556626221656, 0.0052453337476, 0.00487084602802, 0.00444820946359, 0.00398421524471, 0.00348948610414, 0.00297830556106, 0.00246423106059, 0.00196192907654, 0.0014849937282, 0.00104671893395, 0.000661719420598, 0.00034672961837, 0.00011904303773, 0.0, 0.0, 6.4193715954e-21, 4.66917717797e-20, 0.0, 5.5746165655e-20, 0.0, 0.0, 3.01751628849e-20, 6.35453725244e-5, 0.000250440824636, 0.000544541567449, 0.000926112836636, 0.00137352044499, 0.00186545218134, 0.00238059634178, 0.00289797502087, 0.00339973741487, 0.00387211010452, 0.00430143230946, 0.00468237626283, 0.00500999466586, 0.00528371224713, 0.00551021407344, 0.00569394345884, 0.00583914504863, 0.00595321839944, 0.00604004769673, 0.00610332636849, 0.00614988380176, 0.00618322784567, 0.00620707436507, 0.00622507508064, 0.00623823358947, 0.00624734775927, 0.00625303500551, 0.00625757555353, 0.00626049018215, 0.0062625474724, 0.00626421788803, 0.00626468044102, 0.00626495370045, 0.0062647024066, 0.00626408139647, 0.00626403343904, 0.00626391572191, 0.00626362994517, 0.00626319260155, 0.0062633416368, 0.0062640053027, 0.00626483076247, 0.00626538367444, 0.00626597157241, 0.00626609233573 ] }, spectrum_data_point_t { xystar: [0.0, -0.1694544723704584], uv: [6.0, 1.0], spectrum: [ 0.00574815383247, 0.00574711318398, 0.00574654793152, 0.00574416020215, 0.0057405919086, 0.00573435004394, 0.00572410290025, 0.00570378811122, 0.00566951088376, 0.00561081453014, 0.00551005456041, 0.00535716638995, 0.00514574715664, 0.00486996203721, 0.00453529318348, 0.00414597230657, 0.00370809226859, 0.00323519610087, 0.0027373241048, 0.00223081867748, 0.0017356432862, 0.00126739887037, 0.000844719587227, 0.000485691282014, 0.000209115970882, 3.80557806793e-5, 0.0, 0.0, 2.9854374757e-20, 1.18164771316e-19, 0.0, 4.94199797966e-20, 8.73204412191e-20, 5.92009699475e-20, 2.212439525e-20, 3.94875394705e-20, 0.0, 0.000153418225016, 0.000470814227253, 0.000923055466247, 0.00148281896968, 0.00211475708442, 0.00278790091735, 0.00347610670683, 0.00414999743195, 0.00478505750385, 0.00536628115509, 0.00588437352019, 0.00633158984448, 0.00670869251448, 0.00702125802586, 0.00727308104844, 0.00747297468173, 0.00762773580549, 0.00774498557903, 0.0078334245293, 0.00789919729784, 0.00794672474799, 0.00797941404259, 0.00800407830442, 0.00802011871726, 0.00803078717453, 0.00803816695784, 0.00804369722261, 0.0080470622045, 0.00804812446762, 0.00804959970669, 0.00805148048789, 0.00805249249339, 0.0080530805998, 0.00805431642253, 0.00805491575006, 0.00805560812885, 0.00805658755203, 0.00805761492105, 0.00805836525355, 0.0080588678243, 0.00805921722062, 0.00806026167895, 0.00806121051464, 0.00806114439675 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, -0.1694544723704584], uv: [6.999999999999999, 1.0], spectrum: [ 0.00508160879249, 0.00508183030739, 0.00508015531729, 0.00507808188463, 0.00507481215783, 0.00506868702619, 0.00505858993497, 0.00503890282052, 0.00500360359643, 0.0049408680199, 0.00483448298606, 0.00467110726279, 0.00444365189686, 0.00415143121523, 0.00379819582199, 0.00339124237903, 0.00294184807132, 0.0024632382464, 0.00197130411849, 0.00148832180799, 0.00103552357841, 0.000636357494857, 0.000314749653172, 9.33592760653e-5, 0.0, 8.44354950505e-22, 0.0, 0.0, 6.06592675176e-20, 1.37237159172e-20, 1.23853500272e-19, 1.09508371483e-19, 9.52242884934e-20, 0.0, 0.0, 2.9585828203e-20, 0.0, 2.17588212669e-5, 0.000296697194983, 0.000783737662041, 0.00143957978926, 0.00221725678764, 0.00307187310033, 0.00395933084543, 0.00483854732085, 0.00567774858431, 0.00645186384277, 0.00714397512038, 0.0077457578688, 0.00825518509633, 0.008676187242, 0.00901741662513, 0.00928849387571, 0.00949838890916, 0.00965800908498, 0.00977747409673, 0.00986514521251, 0.00992869553314, 0.00997479440317, 0.0100066665578, 0.0100282914455, 0.0100440070232, 0.0100553558932, 0.0100629796566, 0.0100685526281, 0.0100723663023, 0.0100748482899, 0.0100770992771, 0.0100793677269, 0.0100808864307, 0.01008184652, 0.0100827169856, 0.0100833819215, 0.0100833731468, 0.0100834147128, 0.010083659439, 0.0100838858128, 0.0100841550653, 0.01008423477, 0.0100841416358, 0.0100838509531 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, -0.1694544723704584], uv: [8.0, 1.0], spectrum: [ 0.00439659935982, 0.00439572751779, 0.00439437888518, 0.00439243803779, 0.00438872060303, 0.00438189564819, 0.00437011494404, 0.00434769869393, 0.00430714098325, 0.00423716318288, 0.00412069999124, 0.00394358643042, 0.0036995670256, 0.00339042976313, 0.00302149477749, 0.00260382061543, 0.0021535385106, 0.00168633340098, 0.00122459340136, 0.000795725910538, 0.000428888518445, 0.000154446633593, 1.51869202371e-6, 7.99497423011e-20, 0.0, 0.0, 1.28991729604e-20, 1.1214553828e-19, 0.0, 1.11033432409e-19, 0.0, 1.12490572532e-19, 0.0, 0.0, 5.69632689538e-20, 4.84539192727e-20, 7.81041591058e-20, 0.0, 0.000100894785792, 0.000536865313025, 0.00124202932118, 0.0021499297251, 0.0031930646226, 0.00430765490662, 0.00543435421855, 0.00652462129938, 0.00754004596388, 0.00845383204517, 0.00925156920511, 0.00992793350983, 0.0104888188705, 0.0109435910911, 0.0113048089352, 0.0115853126805, 0.0117981732322, 0.0119571645275, 0.0120745323223, 0.0121595010308, 0.0122207722825, 0.0122651282019, 0.0122964475346, 0.0123182533916, 0.0123327512964, 0.0123431166505, 0.0123503273104, 0.0123557200631, 0.0123601109927, 0.0123629523273, 0.0123651897024, 0.0123666200533, 0.0123675240875, 0.0123682704381, 0.0123690980221, 0.012369207189, 0.0123694695014, 0.0123697816943, 0.0123698369295, 0.0123696653438, 0.0123699474002, 0.0123698922088, 0.0123699916741 ] }, spectrum_data_point_t { xystar: [0.1638359986175532, -0.1694544723704584], uv: [9.0, 1.0], spectrum: [ 0.00360493902558, 0.00360521307732, 0.00360506106578, 0.00360370835813, 0.00360054054931, 0.0035941163166, 0.00358238570302, 0.00356080084339, 0.00351964439419, 0.0034446315539, 0.0033195728984, 0.00313336720427, 0.00288150066021, 0.00256428729402, 0.00219351252505, 0.00178646617367, 0.00136156976967, 0.000944044427957, 0.000562478701042, 0.000252144135337, 5.16374996654e-5, 0.0, 0.0, 8.01131136633e-20, 0.0, 0.0, 0.0, 1.61499890876e-19, 0.0, 0.0, 2.79156887484e-19, 2.79507129142e-19, 6.98141267987e-19, 0.0, 0.0, 0.0, 2.80992890826e-19, 0.0, 0.0, 0.000249212200087, 0.000921346610147, 0.00191827757901, 0.00314190203944, 0.00450055303035, 0.00590858024271, 0.00729421609238, 0.00860000992484, 0.00978647457442, 0.0108298112598, 0.0117205941288, 0.0124626885491, 0.0130659508819, 0.0135448598969, 0.0139170955653, 0.0142006456007, 0.0144119354121, 0.0145658619418, 0.0146768161242, 0.0147573648936, 0.0148154847328, 0.0148571483909, 0.01488722853, 0.0149092060423, 0.0149252082663, 0.0149365468809, 0.0149440248419, 0.0149490795296, 0.0149529490277, 0.0149547964257, 0.014955329918, 0.0149554700491, 0.0149560229653, 0.0149562588585, 0.0149563683591, 0.0149566257204, 0.0149571567335, 0.0149582771645, 0.0149592873147, 0.0149598225096, 0.0149602200942, 0.0149604291109 ] }, spectrum_data_point_t { xystar: [0.21844799815673765, -0.1694544723704584], uv: [10.0, 1.0], spectrum: [ 0.0026796856922, 0.00267946889169, 0.00267897840498, 0.00267755073063, 0.00267403906866, 0.00266644466302, 0.0026525481375, 0.00262768883646, 0.0025848838816, 0.00251008187093, 0.00238720399438, 0.00220445839216, 0.00195895232804, 0.00165907150637, 0.0013190318517, 0.000961608195904, 0.000614835572719, 0.000312005987011, 9.2133858297e-5, 0.0, 0.0, 0.0, 0.0, 0.0, 6.98289250013e-20, 1.75972233435e-19, 0.0, 0.0, 4.08407281595e-19, 2.74941590235e-19, 7.68295468369e-19, 0.0, 0.0, 0.0, 0.0, 2.14268501292e-19, 3.36778764522e-19, 5.23784744878e-20, 7.3355919185e-20, 0.0, 0.000523546674898, 0.00154641251956, 0.0029308724895, 0.00454335258808, 0.00626272603527, 0.00798619486697, 0.00963055848517, 0.0111371920679, 0.0124700587701, 0.0136127126513, 0.0145673472416, 0.0153466853377, 0.0159675827123, 0.0164512804688, 0.0168197815852, 0.017095702706, 0.0172992444383, 0.0174473122575, 0.0175543757826, 0.0176312319831, 0.017686383902, 0.017724860799, 0.0177520517818, 0.0177711203571, 0.0177846790961, 0.0177934891329, 0.017800182937, 0.0178041077657, 0.0178073190917, 0.01780948718, 0.0178107807746, 0.0178117734908, 0.0178127791518, 0.0178132074325, 0.0178135346059, 0.0178140085655, 0.017814437519, 0.0178150568949, 0.0178157925943, 0.0178162766986, 0.0178166354888 ] }, spectrum_data_point_t { xystar: [0.2730599976959221, -0.1694544723704584], uv: [11.0, 1.0], spectrum: [ 0.00150001049456, 0.00149922715985, 0.00149874751096, 0.00149715381062, 0.00149380433665, 0.00148710488357, 0.00147402718844, 0.00145296303512, 0.0014142068518, 0.0013464484812, 0.00123950985326, 0.00108453350833, 0.000884357078099, 0.000654970529247, 0.000417409140197, 0.000201799313398, 4.77128434536e-5, 1.69897632368e-19, 0.0, 9.13567593428e-20, 0.0, 3.34227125935e-19, 1.39671230268e-19, 0.0, 5.04428015115e-19, 3.16488164263e-19, 5.20278671406e-20, 6.86421490334e-19, 0.0, 7.90541007511e-21, 0.0, 2.19264683817e-20, 1.9625747786e-19, 7.22720043988e-20, 6.64502163632e-19, 2.1386511653e-18, 0.0, 0.0, 0.0, 2.78804996031e-19, 0.000140383624207, 0.00104340098905, 0.00251361744502, 0.0043617154796, 0.0064131265141, 0.00852259516693, 0.0105688973614, 0.0124647711012, 0.014155373332, 0.0156138787943, 0.0168382044585, 0.0178414290057, 0.0186431260282, 0.0192688366489, 0.0197462441196, 0.0201039014816, 0.0203681417731, 0.0205608946265, 0.0206998206181, 0.0207999559632, 0.0208712043532, 0.0209210775364, 0.0209565110781, 0.0209815313598, 0.0209991480071, 0.0210112718921, 0.0210201806193, 0.0210263021828, 0.0210302695507, 0.0210334298039, 0.0210356295413, 0.0210371800133, 0.0210383472363, 0.0210390390254, 0.0210399758961, 0.0210406611907, 0.0210410230866, 0.0210412931925, 0.0210411720895, 0.0210409118326, 0.0210406700292 ] }, spectrum_data_point_t { xystar: [-0.2730599976959221, -0.11296964824697227], uv: [1.0, 2.0], spectrum: [ 0.00657459797733, 0.00657497516789, 0.00657523969135, 0.00657625161468, 0.00657890910456, 0.00658387150984, 0.0065916897665, 0.00660532749878, 0.00662911207909, 0.00666943092088, 0.00673444565286, 0.00683151735784, 0.00695439640797, 0.00710063838987, 0.00725903660535, 0.00741506184612, 0.00754991728178, 0.00764301149465, 0.00767418301077, 0.00762683998849, 0.00748885432828, 0.00725469937676, 0.00691987579626, 0.00648429199114, 0.00594714633425, 0.0053119729627, 0.00458005900719, 0.00376928407591, 0.00290892315132, 0.00204584578196, 0.00124285467109, 0.000575632029241, 0.000131717403769, 2.05994803339e-19, 2.65669565665e-19, 4.56648452889e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 1.15855745367e-18, 0.0, 0.0, 5.57697449056e-19, 1.36398480437e-18, 0.0, 7.16300867474e-19, 0.0, 8.98488950143e-19, 3.24649313193e-19, 2.31449584162e-19, 4.39683047971e-19, 9.04141152178e-19, 1.5961855464e-19, 2.51366148605e-19, 0.0, 0.0, 1.90454934407e-19, 2.82972234862e-19, 3.04523064889e-19, 5.75478082499e-20, 1.51610204509e-19, 1.13889121868e-19, 1.43480022427e-19, 1.458654729e-19, 1.75104416305e-19, 0.0, 3.0907113298e-19, 5.29395592034e-22, 0.0, 2.70909405429e-20, 0.0, 0.0, 1.18478733497e-19, 0.0, 0.0, 0.0, 2.27664984616e-20, 5.15643724855e-8, 4.92226953473e-8 ] }, spectrum_data_point_t { xystar: [-0.2184479981567377, -0.11296964824697227], uv: [1.9999999999999991, 2.0], spectrum: [ 0.0075068708971, 0.00750633553593, 0.00750629299254, 0.00750549452998, 0.00750324430209, 0.00750023141704, 0.00749548483957, 0.00748474792303, 0.00746675898835, 0.00743513618121, 0.00738059222107, 0.00729920526366, 0.00718338555975, 0.00703218905267, 0.00684403495748, 0.00661968360696, 0.00636139740633, 0.0060702606978, 0.00575038945691, 0.00540677859821, 0.00504746041909, 0.00467721361608, 0.00430050982905, 0.00392277121769, 0.00354720221626, 0.00318012815255, 0.00282401024935, 0.00248338222285, 0.00216563104152, 0.00187208063118, 0.00160622478472, 0.00136972190724, 0.00115942209385, 0.000981168360501, 0.000834669342213, 0.000715892595743, 0.000625704619285, 0.000561135026679, 0.000518384118201, 0.000497154132093, 0.00049485974625, 0.00050603684916, 0.000529468261048, 0.000559895999445, 0.000594729220336, 0.00063145181566, 0.00066699407372, 0.000700058730272, 0.000729740218875, 0.000755102633028, 0.000775648134965, 0.000792860373073, 0.000805555706541, 0.000814418854392, 0.000820995702936, 0.00082439800314, 0.000826939512146, 0.000829399497687, 0.000830852878206, 0.000831597666629, 0.000831875712611, 0.000832234222349, 0.000832344261244, 0.0008322928163, 0.000832881013893, 0.000832670033687, 0.000832377529489, 0.000832190817177, 0.000831500810692, 0.00083094359621, 0.000830603541969, 0.000830218188216, 0.000829829238413, 0.000829874665364, 0.000829540489098, 0.000829529056337, 0.000829974337199, 0.000830068936063, 0.000829918521374, 0.000830124203625, 0.000830172388724 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, -0.11296964824697227], uv: [3.0, 2.0], spectrum: [ 0.00680057676561, 0.00680006916227, 0.00679932392527, 0.00679836628328, 0.00679709007247, 0.00679337669888, 0.0067874378209, 0.00677662332176, 0.00675747597901, 0.00672496028737, 0.00667030408209, 0.00658924828157, 0.00647484420004, 0.0063258441237, 0.00614107303534, 0.00592108418806, 0.00566896359807, 0.00538623720302, 0.00507683496944, 0.00474752610753, 0.0044045560556, 0.00405160162348, 0.00369570131621, 0.00334223617761, 0.00299466137712, 0.00265675491507, 0.00233707258136, 0.00203937640733, 0.00176886936566, 0.00152922443576, 0.00132264823861, 0.00115043678091, 0.00101589290025, 0.000916193760366, 0.000849887778772, 0.000816855706273, 0.000812952759201, 0.000837766191215, 0.00088699168548, 0.000956150343635, 0.00104016502775, 0.00113520891918, 0.001234776515, 0.00133790095601, 0.00144014593183, 0.00153686158816, 0.00162551452141, 0.0017036995962, 0.00177150227938, 0.00182849899708, 0.00187618798137, 0.00191512950153, 0.0019454369797, 0.00196575438814, 0.00197966453347, 0.00199025973617, 0.00199801497935, 0.00200438416756, 0.00200773772291, 0.00201039831049, 0.00201347085389, 0.00201603207422, 0.00201727478225, 0.00201839753984, 0.00201878787023, 0.00201898434987, 0.00201880917913, 0.0020177800029, 0.00201673566427, 0.00201647198415, 0.00201654820434, 0.002016366092, 0.00201598382868, 0.00201594238778, 0.00201573419244, 0.00201633788366, 0.00201652356978, 0.00201670439058, 0.00201653167254, 0.00201704228868, 0.0020171706637 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, -0.11296964824697227], uv: [3.9999999999999996, 2.0], spectrum: [ 0.00607402140199, 0.00607419025768, 0.00607365995433, 0.00607294056836, 0.00607152803151, 0.006069072098, 0.00606473659214, 0.00605646981441, 0.00603978133068, 0.00600920749828, 0.00595847522352, 0.00587930259179, 0.00576671952365, 0.00562020927988, 0.00543840685687, 0.00522373954771, 0.00497821993875, 0.00470423756951, 0.00440578037004, 0.00408934146815, 0.00376090462498, 0.00342671058458, 0.00309336940951, 0.0027660309595, 0.00244788472683, 0.00214502297595, 0.00186238416835, 0.00160485920406, 0.0013800648237, 0.0011925066083, 0.00104347329559, 0.000936131666758, 0.000869496467266, 0.000843031301802, 0.000857230609298, 0.00090804839954, 0.000993212254669, 0.00110836616662, 0.00124791618879, 0.00140778886299, 0.00158070299557, 0.00176160688756, 0.00194469127098, 0.0021231508127, 0.00229229344043, 0.00244846927282, 0.00258844788389, 0.00271140032767, 0.00281676014768, 0.00290370091398, 0.0029752637467, 0.00303314043032, 0.0030791881438, 0.00311543235958, 0.00314202239332, 0.00316225685483, 0.00317657406379, 0.00318640073083, 0.00319394346287, 0.00319882263424, 0.00320232498161, 0.00320444138614, 0.00320620425667, 0.00320764682252, 0.00320866876492, 0.00320972017638, 0.00321099509007, 0.00321139379773, 0.00321155291438, 0.00321154215497, 0.00321130137532, 0.00321114959025, 0.00321061866201, 0.00321032667814, 0.00320989570491, 0.0032094755909, 0.00320944726689, 0.00320928202574, 0.00320903090043, 0.00320944056757, 0.00320948643808 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, -0.11296964824697227], uv: [5.0, 2.0], spectrum: [ 0.00534955144175, 0.00534930395637, 0.00534882900068, 0.00534796544221, 0.00534703648261, 0.00534443153644, 0.00533982098548, 0.00533167188887, 0.00531576530997, 0.00528725607651, 0.00523811264196, 0.00516156348388, 0.00505402575999, 0.00491278956136, 0.00473816051605, 0.00453120816016, 0.00429390018079, 0.00402907066297, 0.00374117612319, 0.00343641035811, 0.00312202121628, 0.0028058678798, 0.00249319043783, 0.00218802531598, 0.00189610271641, 0.00162435800179, 0.00137762522538, 0.00116366823822, 0.000986453256786, 0.000850938945514, 0.000762417192113, 0.000719869897221, 0.000725091695971, 0.000777821139175, 0.000872769029309, 0.0010079473664, 0.001180650069, 0.00138452512878, 0.00161344963566, 0.00186049860275, 0.00211914911843, 0.00238267429869, 0.0026442643415, 0.00289656856916, 0.003133245178, 0.00335131440556, 0.00354611689231, 0.00371718151295, 0.00386417531173, 0.00398585203263, 0.0040851574681, 0.00416447484352, 0.00422708774504, 0.00427624002387, 0.00431248100506, 0.00433976832185, 0.00435944124968, 0.00437343217009, 0.00438309344167, 0.00438999242829, 0.00439462787592, 0.00439829165636, 0.00440094364871, 0.00440291918815, 0.00440432127641, 0.00440533008395, 0.00440594432052, 0.0044063561076, 0.00440695389436, 0.0044071895311, 0.00440730632018, 0.0044072437867, 0.00440687541419, 0.00440673200816, 0.00440652484214, 0.00440619992355, 0.00440628042674, 0.00440607883061, 0.00440572293917, 0.00440540393501, 0.00440525305976 ] }, spectrum_data_point_t { xystar: [0.0, -0.11296964824697227], uv: [6.0, 2.0], spectrum: [ 0.00464276374014, 0.00464263592165, 0.00464187405482, 0.00464063680532, 0.00463904202136, 0.00463608074625, 0.00463036219555, 0.00461984409946, 0.00460218076812, 0.00457188213153, 0.00452211522235, 0.00444778301325, 0.00434264734067, 0.00420278580249, 0.00403251573238, 0.00383218733209, 0.00360156838377, 0.00334701195383, 0.00307262204116, 0.00278307721742, 0.00248527830985, 0.00218851066491, 0.00189602917645, 0.00161577182805, 0.00135271977937, 0.00111265181201, 0.000902164684452, 0.0007286154272, 0.000597991208932, 0.000515330435303, 0.000483616087781, 0.000505847949909, 0.000580316814711, 0.000705889191258, 0.000880864496031, 0.00110050525808, 0.00135970708924, 0.00165148658752, 0.00197117991215, 0.00230909615231, 0.00265780568366, 0.00300771689321, 0.00335017495716, 0.00367747050817, 0.00398270661293, 0.00426269380635, 0.00451132507313, 0.00472775173022, 0.00491139290682, 0.00506462869955, 0.00519058405364, 0.00529113372622, 0.00536991235657, 0.00543027785674, 0.00547583326855, 0.00550988855591, 0.00553584942373, 0.0055541988507, 0.00556747057935, 0.00557674634602, 0.00558281667906, 0.00558725256673, 0.00559037627113, 0.00559198510155, 0.00559282275304, 0.00559332673652, 0.00559332646161, 0.00559355835089, 0.00559382185818, 0.00559395718574, 0.00559394133549, 0.00559407891146, 0.00559471767796, 0.00559528283683, 0.00559540841205, 0.0055959556412, 0.00559595781589, 0.00559592570662, 0.00559630766549, 0.00559619534873, 0.00559604259506 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, -0.11296964824697227], uv: [6.999999999999999, 2.0], spectrum: [ 0.00391286636201, 0.00391314334244, 0.0039120933558, 0.00390890371173, 0.00390610197383, 0.00390382378503, 0.00390002240267, 0.00389190214025, 0.00387702162423, 0.00384903530555, 0.00380285799922, 0.00373059893013, 0.00362737505632, 0.00349710043184, 0.00333166240246, 0.00313726128758, 0.0029150699683, 0.00266762883028, 0.00240777953647, 0.00213300855017, 0.00185351906824, 0.0015725853396, 0.00130151934802, 0.00104576933365, 0.000807439524692, 0.000597258458401, 0.000420853399247, 0.000286689976975, 0.000204485316192, 0.000175167899681, 0.000199526259907, 0.000287762922171, 0.000433783434349, 0.000638838698422, 0.00089447112966, 0.0011969303016, 0.00154692247868, 0.00192838937491, 0.00233636366365, 0.002761160992, 0.00319728492108, 0.0036286856325, 0.00404821821862, 0.00445011872421, 0.00482488227973, 0.0051636563628, 0.00546804652424, 0.00573458128675, 0.00595939071209, 0.00614843420656, 0.00630046788225, 0.00642386254648, 0.0065217596258, 0.0065947023785, 0.00665101031192, 0.00669137714234, 0.00672376431673, 0.00674566257388, 0.00675979880432, 0.00676958568069, 0.00677575348051, 0.00677946716627, 0.00678164083367, 0.00678250799987, 0.00678278495189, 0.00678451914112, 0.00678595266774, 0.00678686430471, 0.00678910874587, 0.00679129029023, 0.00679279782522, 0.00679381779886, 0.00679504256569, 0.0067962226041, 0.00679621167108, 0.00679592173177, 0.00679569364897, 0.00679660683226, 0.00679789845594, 0.00679794671715, 0.00679858292589 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, -0.11296964824697227], uv: [8.0, 2.0], spectrum: [ 0.00319376958325, 0.00319372111247, 0.00319380847994, 0.00319290676229, 0.00319112728527, 0.00318773857552, 0.00318141411055, 0.0031708152922, 0.00315339376798, 0.00312421793586, 0.00307799777621, 0.00300562444374, 0.00290364166467, 0.00277347355471, 0.00261449464582, 0.0024278762021, 0.00221667210594, 0.00198533415724, 0.00173790348345, 0.00148170698715, 0.00122512559226, 0.000975285853349, 0.000738959033566, 0.00052151689557, 0.000330531601578, 0.000173125674288, 6.00873117117e-5, 5.89712282303e-7, 4.37547740415e-8, 2.68262131582e-20, 1.74707686962e-5, 0.000108516283191, 0.000274593996735, 0.000512313106111, 0.0008183218823, 0.00118647641017, 0.00160885079331, 0.00207696940387, 0.00258123153266, 0.00310906125621, 0.0036496130078, 0.00418872846006, 0.00471385706798, 0.00521395567019, 0.00567994042039, 0.00610469011529, 0.0064811744402, 0.00680801513227, 0.00708478655996, 0.00731412455838, 0.00750057644708, 0.00764867864575, 0.00776570012403, 0.00785700163927, 0.00792462615785, 0.00797625225651, 0.00801509293263, 0.00804340182954, 0.00806352611106, 0.00807877471266, 0.00808940004263, 0.0080958472978, 0.00810026180248, 0.00810272681504, 0.00810356806126, 0.00810433855506, 0.00810452638041, 0.00810416800344, 0.00810459979494, 0.0081044746693, 0.00810481304857, 0.00810478253974, 0.00810468419974, 0.00810424428878, 0.00810354026186, 0.00810359002128, 0.00810309210883, 0.00810287024481, 0.00810300658597, 0.00810311040118, 0.00810305655429 ] }, spectrum_data_point_t { xystar: [0.1638359986175532, -0.11296964824697227], uv: [9.0, 2.0], spectrum: [ 0.00242272835128, 0.00242238613717, 0.00242198852002, 0.00242097418961, 0.002419471157, 0.00241733661108, 0.0024127197374, 0.00240438812716, 0.00238922618733, 0.00236236394225, 0.00231641283358, 0.00224584791359, 0.00214857331076, 0.00202373454706, 0.00187261524043, 0.0016981216874, 0.00150302201679, 0.00129318987903, 0.00107543256408, 0.000857011834563, 0.00064625792258, 0.000450663343156, 0.000279102578382, 0.00014132247013, 4.42684636607e-5, 5.64793676357e-21, 0.0, 0.0, 0.0, 4.79479247204e-20, 1.14758208832e-20, 0.0, 9.46099358769e-5, 0.000295622805923, 0.000598372215271, 0.000994533945497, 0.00147367771232, 0.0020236501247, 0.00262960974454, 0.00327531162619, 0.00394483412109, 0.00462069907725, 0.00528622765178, 0.00592532953147, 0.00652394472042, 0.00707104270856, 0.00755926803897, 0.00798508966619, 0.00834755330342, 0.00864901076776, 0.00889493838738, 0.0090920725291, 0.00924738038568, 0.0093666560527, 0.00945664941828, 0.00952396528788, 0.00957301912108, 0.00960830309865, 0.00963419511165, 0.00965214389769, 0.00966447280453, 0.00967334959719, 0.00967970416419, 0.00968377123959, 0.00968698415831, 0.00968926627539, 0.00969083924164, 0.0096922418898, 0.00969289719267, 0.00969342325491, 0.00969369810947, 0.00969383066099, 0.00969428343856, 0.00969432838931, 0.00969429528188, 0.00969443331557, 0.00969414822827, 0.00969397666862, 0.00969389131663, 0.00969363797103, 0.00969353143494 ] }, spectrum_data_point_t { xystar: [0.21844799815673765, -0.11296964824697227], uv: [10.0, 2.0], spectrum: [ 0.00158365153312, 0.00158299175173, 0.00158222014893, 0.00158014961785, 0.00157599062625, 0.00157206354742, 0.00156577806453, 0.00155683797928, 0.00154300755404, 0.0015205068312, 0.00148169319526, 0.00142236308814, 0.00133806539727, 0.00123101204234, 0.0011027146001, 0.000953832475481, 0.000793433129427, 0.000626066211454, 0.000460662182153, 0.000307568536479, 0.000174927249185, 7.44545808063e-5, 1.29809277217e-5, 0.0, 1.43941877952e-20, 0.0, 0.0, 3.32993299319e-22, 7.76973970202e-20, 1.9923187181e-20, 0.0, 4.654263628e-20, 3.21810078283e-20, 9.29853525356e-5, 0.000335749720549, 0.000717128169107, 0.00122409248442, 0.00184048006794, 0.00254517415889, 0.00331648787933, 0.00413308339077, 0.00496869649505, 0.00580042646404, 0.00660586844948, 0.0073644809186, 0.00806253034517, 0.00868788658349, 0.00923402878204, 0.00969974557007, 0.0100869747711, 0.0104036564687, 0.0106584440928, 0.0108594335694, 0.0110139528976, 0.0111321647085, 0.0112204932528, 0.0112866324326, 0.011335491018, 0.0113712037683, 0.0113966326557, 0.0114137512999, 0.0114250805373, 0.0114324647377, 0.0114370965785, 0.0114394565373, 0.0114414107599, 0.0114428058207, 0.0114433582715, 0.0114434406972, 0.0114441399962, 0.0114440899311, 0.0114439859929, 0.0114443804177, 0.0114438427978, 0.0114437458109, 0.0114431495845, 0.0114430186644, 0.0114431159561, 0.0114426826591, 0.0114431134052, 0.011442821454 ] }, spectrum_data_point_t { xystar: [0.2730599976959221, -0.11296964824697227], uv: [11.0, 2.0], spectrum: [ 0.000567425227685, 0.000568323083189, 0.000569869182485, 0.00057177447853, 0.000573302855024, 0.000573288204346, 0.0005732347917, 0.000569788579197, 0.000560096505801, 0.000542862219994, 0.000512786146878, 0.00047042650045, 0.000413520837123, 0.000344076318742, 0.000267006277607, 0.000188822887701, 0.00011399070588, 5.28895598499e-5, 1.01477361057e-5, 0.0, 1.92585639129e-20, 1.38297511107e-20, 4.7962629998e-20, 3.27958849831e-20, 5.6595615619e-20, 0.0, 6.22056661722e-20, 7.16831510448e-20, 1.00471025132e-19, 0.0, 7.92499764939e-20, 4.85791582168e-20, 0.0, 0.0, 9.97659976206e-5, 0.00040398624498, 0.000893837113635, 0.00154667829226, 0.00233640400006, 0.00323176993496, 0.00420099769501, 0.00521298761491, 0.00623365147996, 0.00723240615371, 0.00818203429856, 0.0090606207645, 0.00985258807255, 0.0105467197727, 0.0111401446501, 0.0116366442129, 0.0120438508103, 0.012370628584, 0.0126279497356, 0.0128260427855, 0.0129759923849, 0.013087358482, 0.0131690297966, 0.0132292136389, 0.0132729510059, 0.0133048361058, 0.0133275470415, 0.013343757872, 0.0133549134038, 0.0133622071808, 0.0133666163172, 0.0133694894637, 0.0133710531446, 0.0133721606236, 0.0133728200561, 0.0133735699317, 0.0133735265731, 0.0133734364488, 0.0133733834544, 0.0133736584553, 0.0133736986293, 0.0133738499843, 0.0133741321744, 0.0133743872194, 0.0133740485714, 0.0133738857807, 0.0133736721899 ] }, spectrum_data_point_t { xystar: [-0.2730599976959221, -0.056484824123486134], uv: [1.0, 3.0], spectrum: [ 7.39272681924e-6, 9.88589425456e-6, 1.34053842214e-5, 2.39212322117e-5, 4.30674801746e-5, 7.82180302187e-5, 0.000140112872956, 0.000249166128882, 0.000441251753038, 0.000775065057139, 0.00132372125819, 0.00213623568183, 0.00322517113799, 0.00456540094306, 0.00609997344814, 0.00774751686262, 0.00940231847301, 0.010946525476, 0.0122586848734, 0.013235538963, 0.0138061037606, 0.0139253592007, 0.01357320212, 0.0127574470022, 0.0114948243108, 0.00981808737438, 0.00778727868416, 0.00552618441809, 0.00325517241671, 0.00129556146454, 5.13112007262e-5, 0.0, 0.0, 1.89240393223e-18, 0.0, 0.0, 6.56972440746e-18, 0.0, 0.0, 5.92491490825e-18, 3.58094200082e-18, 1.42320660909e-18, 2.31914134795e-18, 0.0, 0.0, 3.10297888934e-18, 0.0, 0.0, 0.0, 2.28179064446e-18, 2.63529844906e-18, 2.89551881087e-19, 2.63184909893e-20, 8.22358832285e-19, 1.27581188899e-18, 0.0, 0.0, 2.97855675018e-19, 4.58448540155e-19, 2.9237012697e-19, 0.0, 1.56304104388e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 8.59284284161e-8, 0.0, 2.10687607001e-7, 5.96713466262e-8 ] }, spectrum_data_point_t { xystar: [-0.2184479981567377, -0.056484824123486134], uv: [1.9999999999999991, 3.0], spectrum: [ 0.00666714889846, 0.00666721004471, 0.00666724733729, 0.00666687610048, 0.00666627700021, 0.0066648612728, 0.00666232669208, 0.00665780418187, 0.00665042889485, 0.00663665446958, 0.00661263728283, 0.00657574303646, 0.00652267644151, 0.0064518164528, 0.0063634936218, 0.00625684167588, 0.00613087721445, 0.00598639966099, 0.0058239290139, 0.0056457823479, 0.00545302845562, 0.00524897706746, 0.00503454579931, 0.00481078578476, 0.00457902830681, 0.00433887943579, 0.00409153102439, 0.00383649782783, 0.00357450352472, 0.00330647151698, 0.00303302509746, 0.00275626022534, 0.0024781470992, 0.00220044317677, 0.00192585953986, 0.00165767242686, 0.00139859102278, 0.00115116860143, 0.000919792697792, 0.000707593853209, 0.000518156763583, 0.000354325283481, 0.000218994062135, 0.000114651962298, 4.29108285402e-5, 4.68297604933e-6, 3.01080635779e-20, 6.78567342435e-21, 2.41691195925e-21, 0.0, 3.21047877981e-20, 0.0, 0.0, 2.04004549378e-20, 2.48819058218e-20, 1.0584807119e-20, 7.93175258574e-21, 0.0, 1.69672242707e-20, 0.0, 0.0, 5.85956073872e-7, 6.20237426128e-7, 5.01095169004e-7, 5.94964102165e-7, 6.56673481904e-7, 8.13457670864e-7, 7.90884919598e-7, 6.72257159206e-7, 8.09555645166e-7, 1.11675404872e-6, 1.18497727211e-6, 1.28065370123e-6, 1.43371247875e-6, 1.4489556084e-6, 1.50298802118e-6, 1.55046363513e-6, 1.49705909003e-6, 1.71077381992e-6, 2.07893291163e-6, 1.85908428586e-6 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, -0.056484824123486134], uv: [3.0, 3.0], spectrum: [ 0.00603574035349, 0.0060352435093, 0.00603450340475, 0.00603259269304, 0.00603065769774, 0.0060305752104, 0.00602999993492, 0.00602426818172, 0.00601499865553, 0.00600057366325, 0.00597353875501, 0.00592962207811, 0.00586786781162, 0.00578844776546, 0.00568783098092, 0.00556590987364, 0.00542655489852, 0.00526941879998, 0.0050963211811, 0.00491082990584, 0.00471510532315, 0.00451025364024, 0.00429963383446, 0.00408551467612, 0.00387072396544, 0.00365678020306, 0.00344454834765, 0.00323409535326, 0.00302790325092, 0.00282923387614, 0.00263921236128, 0.00245732459577, 0.00228471322739, 0.00212323225967, 0.00197106571378, 0.00182763958111, 0.00169468471743, 0.00157443843745, 0.00146456261442, 0.00136571361205, 0.00127575720415, 0.00119386467779, 0.00112375182321, 0.00106407944822, 0.00101067437892, 0.000963676736619, 0.000927255782433, 0.000897186189383, 0.000870582832092, 0.000849791394067, 0.000833078633231, 0.000819998617153, 0.000810891491724, 0.000804435983203, 0.000797590260622, 0.000791213277149, 0.000789221169983, 0.000788619874428, 0.000785381459968, 0.000783123493354, 0.000782869086795, 0.00078339756614, 0.000782433960735, 0.000780542716405, 0.000779780356445, 0.000779481044835, 0.000779954753851, 0.000779781598603, 0.000778533163201, 0.000778666857058, 0.000779095411229, 0.000778727865732, 0.000779460062165, 0.000779899309631, 0.000778937257051, 0.000779393261438, 0.000779727760254, 0.00077891584195, 0.00077782295813, 0.000777893270236, 0.000777962609729 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, -0.056484824123486134], uv: [3.9999999999999996, 3.0], spectrum: [ 0.00531254948408, 0.00531217037528, 0.00531175501081, 0.00531149948422, 0.00531099661964, 0.00530880082248, 0.00530552828476, 0.005300775058, 0.00529231193258, 0.00527670513296, 0.00525110899887, 0.00521036940838, 0.00515282452036, 0.00507585898869, 0.0049817877157, 0.00486966894897, 0.0047406142978, 0.00459514072829, 0.00443534734366, 0.00426293650422, 0.0040827667122, 0.00389733329542, 0.00370886074778, 0.00351940592667, 0.00333164718406, 0.0031466893306, 0.00296739152614, 0.00279662632769, 0.00263741020922, 0.00249203120747, 0.00236027637243, 0.00224311498544, 0.00214053665815, 0.00205197775233, 0.00197988263919, 0.00192152455548, 0.00187609400559, 0.00184351575851, 0.00182184212534, 0.00181134725433, 0.00180831191121, 0.00181407239534, 0.00182591824056, 0.00184037221382, 0.00185707975915, 0.00187437019328, 0.00189172284401, 0.00190732601855, 0.00192181657848, 0.00193484557572, 0.00194528966854, 0.00195306770439, 0.00195973329347, 0.00196435780386, 0.00196743901938, 0.00196980663885, 0.0019707372224, 0.00197160880586, 0.00197270503319, 0.00197305191288, 0.00197345555156, 0.00197362509687, 0.00197391771794, 0.00197331830039, 0.00197280013519, 0.00197213487375, 0.00197105781538, 0.00197061051046, 0.00197064624013, 0.00197106861305, 0.00197116685645, 0.00197134980416, 0.00197156556992, 0.00197192729331, 0.00197195975536, 0.0019714203292, 0.00197117336872, 0.00197094212193, 0.00197014296989, 0.00196938380053, 0.00196946765212 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, -0.056484824123486134], uv: [5.0, 3.0], spectrum: [ 0.00459639437541, 0.00459710992884, 0.00459676307971, 0.00459595363054, 0.00459521928536, 0.004593514887, 0.00458968644814, 0.00458339513557, 0.0045742872902, 0.00455809113369, 0.00453106140229, 0.00449021401849, 0.00443362926162, 0.00436151322519, 0.00427328444087, 0.00417009945864, 0.00405126733866, 0.0039180727404, 0.00377252774658, 0.00361657998661, 0.00345465240043, 0.00328916623173, 0.00312284051452, 0.00295797989812, 0.00279675963124, 0.00264251368648, 0.00249864127128, 0.00236875517004, 0.00225484055058, 0.00215819198936, 0.00208210617771, 0.00202600124235, 0.00198983064192, 0.00197468996557, 0.00198113806998, 0.00200739759285, 0.00205028262753, 0.00210741488471, 0.00217738179885, 0.00225757177364, 0.00234615611922, 0.00243803959034, 0.00253166443316, 0.00262273767195, 0.00270785377092, 0.00278786347255, 0.00286020003846, 0.00292351572779, 0.00297616685915, 0.00301875977858, 0.00305467041317, 0.00308218015638, 0.00310361538224, 0.00311941159952, 0.00312995287037, 0.00313818349298, 0.00314399112784, 0.00314857534847, 0.00315204541434, 0.00315469474046, 0.00315616031941, 0.0031564594051, 0.00315723116261, 0.00315793280775, 0.0031575484154, 0.00315746932358, 0.0031577681266, 0.00315719329992, 0.00315634782921, 0.00315676644375, 0.00315695966287, 0.00315639851765, 0.00315668532226, 0.00315723651577, 0.00315727608705, 0.0031570384566, 0.00315677622086, 0.00315685614379, 0.00315682322074, 0.00315687001233, 0.00315692977572 ] }, spectrum_data_point_t { xystar: [0.0, -0.056484824123486134], uv: [6.0, 3.0], spectrum: [ 0.00393061128765, 0.00393015204309, 0.00392602139435, 0.00392381216193, 0.00392150849447, 0.00391726141708, 0.00391090846804, 0.00390097367815, 0.00388643818206, 0.00386753180586, 0.00384055679577, 0.00379588542058, 0.00373867574634, 0.00366725849013, 0.00357765171778, 0.00346937354498, 0.00334960361697, 0.00322235406519, 0.00308126353323, 0.00293418545807, 0.0027780002437, 0.00262759102448, 0.0024857855331, 0.0023481730074, 0.00221999173469, 0.00210208229272, 0.00200441521187, 0.00192227538174, 0.00185753572925, 0.00181889169911, 0.001807231056, 0.00181508871018, 0.00185896941018, 0.00192229591425, 0.00200523325957, 0.00211533822181, 0.00224557649699, 0.00239115988518, 0.00255225877031, 0.00272060249933, 0.00289310631273, 0.0030657331214, 0.00323058147807, 0.00339195851958, 0.00354308156314, 0.00367899255909, 0.00380180377391, 0.00391332529309, 0.00400513862491, 0.00408282155861, 0.00415154121793, 0.00420415478297, 0.00425220836406, 0.00428704483905, 0.00431422686818, 0.00433368848828, 0.00434576272821, 0.00435382572986, 0.00435992284346, 0.00436342967654, 0.00436526906208, 0.00436816811466, 0.00436647795583, 0.00436418010608, 0.00436280155202, 0.00436243917703, 0.00436237759614, 0.00436150054786, 0.00436082729711, 0.0043622305523, 0.00436391444554, 0.00436456041716, 0.00436513668501, 0.00436791445276, 0.00437045725046, 0.00437207814499, 0.00437465138395, 0.00437709512096, 0.00437787247127, 0.00437845343911, 0.00437863417119 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, -0.056484824123486134], uv: [6.999999999999999, 3.0], spectrum: [ 0.00315625371272, 0.00315606964643, 0.00315503417792, 0.00315425864744, 0.00315330636532, 0.00315194609843, 0.00314918156101, 0.00314578659348, 0.00313973377083, 0.00312792028666, 0.00310500959599, 0.0030704263246, 0.00302061609733, 0.00295467566719, 0.00287393127619, 0.00277858835306, 0.00267063759051, 0.00255200930136, 0.00242686936608, 0.00229707009486, 0.00216461601972, 0.00203410119135, 0.00190996324241, 0.00179431296109, 0.00169163283302, 0.00160441792138, 0.0015350617766, 0.00148996870116, 0.0014704047751, 0.0014801840155, 0.00152319500139, 0.00159854032637, 0.00170620967788, 0.00184419747217, 0.00201089010616, 0.00220465828838, 0.00242039474739, 0.00265473266721, 0.00290462752568, 0.00316305303841, 0.00342421930477, 0.00368306189706, 0.00393409833917, 0.00417343798497, 0.0043956005232, 0.00459721017843, 0.00477593135646, 0.00493170194002, 0.005064910656, 0.00517519341098, 0.00526670512845, 0.00533974939944, 0.00539618656533, 0.00544012115741, 0.00547383908853, 0.00549801056722, 0.00551445412923, 0.00552563095085, 0.00553294916322, 0.00553713752937, 0.00553951145115, 0.00554064112295, 0.00554144226995, 0.00554196372988, 0.00554179217471, 0.00554239107708, 0.00554388270608, 0.00554536535364, 0.00554693525123, 0.00554822433636, 0.00554974017029, 0.0055513165446, 0.00555245731041, 0.00555404808789, 0.00555531809237, 0.00555630076429, 0.00555742884806, 0.0055578486979, 0.00555840473838, 0.00555910237882, 0.00555910151016 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, -0.056484824123486134], uv: [8.0, 3.0], spectrum: [ 0.00244245242755, 0.00244260645252, 0.00244287841899, 0.00244237210085, 0.00244051565323, 0.00243744055582, 0.00243369234713, 0.00242870706689, 0.00242019914808, 0.00240784212081, 0.00238511158952, 0.00234983617145, 0.00230378180714, 0.00224398459268, 0.00217076558271, 0.00208336729175, 0.0019842454745, 0.00187642839306, 0.00176196891131, 0.00164530033608, 0.001529910705, 0.00141996243401, 0.00131663625599, 0.00122484623367, 0.00114777899286, 0.00108980090742, 0.00105539283108, 0.00104878482934, 0.00107590000433, 0.00113968048787, 0.00124093397457, 0.00138125173281, 0.00155934618513, 0.00177342074415, 0.00202100226914, 0.00229902866706, 0.00260237304152, 0.00292585475281, 0.0032657492211, 0.00361356758758, 0.00396336999779, 0.00430996381645, 0.00464349362923, 0.00495798619372, 0.00524871769621, 0.00551203107098, 0.00574453941117, 0.00594448146811, 0.00611391614456, 0.00625380176911, 0.00636637135735, 0.00645619046559, 0.00652671062058, 0.00658119533683, 0.00662304026727, 0.00665442966498, 0.00667804847309, 0.00669592697835, 0.00670981925304, 0.0067199003272, 0.00672664024839, 0.00673059838508, 0.00673295183594, 0.00673417355808, 0.00673404844003, 0.00673370294516, 0.0067330721698, 0.00673240221114, 0.00673278683395, 0.00673350927803, 0.00673378538953, 0.00673376488808, 0.00673329651546, 0.00673316664283, 0.00673273970257, 0.00673225106716, 0.00673180592486, 0.00673149994812, 0.00673135472592, 0.00673118822262, 0.0067312337202 ] }, spectrum_data_point_t { xystar: [0.1638359986175532, -0.056484824123486134], uv: [9.0, 3.0], spectrum: [ 0.00172080149781, 0.00172020640998, 0.00171975225391, 0.00171962329779, 0.0017192845796, 0.00171776994193, 0.00171452632813, 0.00170890084926, 0.00170101091071, 0.00168873681602, 0.0016676707614, 0.00163568748578, 0.00159125035757, 0.00153431105432, 0.00146518805967, 0.0013853274161, 0.00129519257452, 0.00119748876587, 0.00109598254733, 0.00099396043034, 0.000895215010063, 0.000802999741659, 0.000721572889693, 0.00065427631373, 0.000604653536297, 0.000577621377919, 0.000577859201212, 0.000612350791838, 0.000685326985215, 0.000800050475538, 0.000959394951715, 0.00116323286984, 0.00141116124623, 0.00170180114163, 0.0020304096578, 0.00239363250686, 0.00278531177128, 0.00319882148113, 0.00362911476138, 0.00406675155026, 0.00450492308039, 0.00493430979168, 0.00534620343903, 0.00573519922576, 0.0060934463446, 0.00641752560069, 0.00670360373041, 0.00695019076046, 0.00715928764724, 0.007332540019, 0.00747395154535, 0.0075868673746, 0.00767462149801, 0.00774272770115, 0.00779468110157, 0.00783388815622, 0.00786303475491, 0.00788381365238, 0.00789872185956, 0.00790951751076, 0.00791696811372, 0.00792170981711, 0.00792451701423, 0.00792640488086, 0.00792823198613, 0.00792938760199, 0.00792942308841, 0.00792928010311, 0.00792967918448, 0.0079299017576, 0.00793021670115, 0.00793025425097, 0.00793028404725, 0.00793048624509, 0.00793010851222, 0.00792998261994, 0.00792942803491, 0.00792890461874, 0.00792857051087, 0.00792815304605, 0.00792815295643 ] }, spectrum_data_point_t { xystar: [0.21844799815673765, -0.056484824123486134], uv: [10.0, 3.0], spectrum: [ 0.00100096294693, 0.00100182548072, 0.00100211292297, 0.00100100572591, 0.00100096723868, 0.000999787581884, 0.000998203171022, 0.000992590817659, 0.000984585951298, 0.000971593584882, 0.000950055015715, 0.000919914354842, 0.000878832053144, 0.000825343931605, 0.000759766146604, 0.000685260492545, 0.000604587141212, 0.00051861601157, 0.000431189626245, 0.000343443769176, 0.000260059405153, 0.00018586357365, 0.000126574514387, 8.3124172198e-5, 6.02415637378e-5, 6.44260407239e-5, 0.000100563509042, 0.000174324914975, 0.000291869582702, 0.000458824878455, 0.000676777868181, 0.000945881295666, 0.00126458135947, 0.00163183703549, 0.00204143474323, 0.0024884320181, 0.00296783814768, 0.00347141620573, 0.00399161511726, 0.00451936676256, 0.00504464654522, 0.0055589193243, 0.00605155871109, 0.00651409352131, 0.0069413952258, 0.00732659746625, 0.00766530523083, 0.00795939813547, 0.00820740319142, 0.00841182614975, 0.00857842531627, 0.00871200941073, 0.00881674393624, 0.0088975009236, 0.00895807326527, 0.00900439656065, 0.00903863867402, 0.00906278591225, 0.00907984860632, 0.00909248249778, 0.00910150418769, 0.00910717965638, 0.00911080800811, 0.00911356320777, 0.00911553387799, 0.00911690210187, 0.00911772336507, 0.0091187852523, 0.00911929490021, 0.00911908986892, 0.00911917993919, 0.00911928838455, 0.0091191010821, 0.00911820906827, 0.00911787651327, 0.00911782306086, 0.00911763389396, 0.0091173496952, 0.00911748838504, 0.00911718873298, 0.00911721769789 ] }, spectrum_data_point_t { xystar: [-0.2730599976959221, 0.0], uv: [1.0, 4.0], spectrum: [ 0.0, 7.34970943041e-19, 5.45503065922e-18, 0.0, 0.0, 0.0, 9.75623841823e-19, 0.0, 1.88576745316e-18, 0.0, 2.7977886011e-19, 7.25113687654e-19, 1.04041861011e-18, 2.50167481476e-17, 0.00067195117861, 0.0031395113783, 0.00689741118884, 0.0113358891872, 0.0158146944665, 0.0197105971371, 0.0225415507409, 0.0239953045536, 0.0239009037508, 0.0222682881531, 0.019210086771, 0.0149540353254, 0.00990407874367, 0.00482110462061, 0.000943643692416, 0.0, 0.0, 0.0, 0.0, 8.05758374867e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 1.77485641151e-18, 0.0, 5.55100914606e-18, 1.76040199416e-17, 0.0, 1.2323224417e-17, 5.96943765875e-18, 3.67299810624e-17, 1.24275746475e-17, 1.16607094585e-17, 0.0, 0.0, 0.0, 0.0, 5.86249108776e-18, 9.36481197e-18, 1.06156308151e-17, 9.29702613401e-18, 1.06375612436e-17, 2.07334287139e-18, 4.97512651402e-18, 1.78291373045e-18, 1.45101418679e-18, 2.4699695361e-18, 2.06945072518e-19, 3.74036665317e-19, 0.0, 5.7360861104e-19, 2.45866517923e-18, 7.2090070054e-20, 5.04845466993e-18, 5.58158043335e-18, 2.62562652335e-18, 3.75061575006e-18, 0.0, 0.0, 0.0, 0.0, 1.8038214061e-18, 3.76285401269e-19, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.2184479981567377, 0.0], uv: [1.9999999999999991, 4.0], spectrum: [ 0.0047111122482, 0.00471097654301, 0.00471199494176, 0.00471263403933, 0.00471474736159, 0.00471963914107, 0.00472850154286, 0.00474244345159, 0.00476901147566, 0.00481552097018, 0.00489192410948, 0.00500598574501, 0.00516270108874, 0.00536105169139, 0.00559489221057, 0.00585491044911, 0.0061327604702, 0.00641489538161, 0.00668943563591, 0.0069401241346, 0.00715260636924, 0.00731504575244, 0.00741765438149, 0.00745153631072, 0.0074068558056, 0.00727085472306, 0.0070335172244, 0.00668323595037, 0.00621708269667, 0.00563805708196, 0.00496295322676, 0.00421501647291, 0.00342282762472, 0.00262037325374, 0.00184647238977, 0.00114539354285, 0.000567666739966, 0.000166995201203, 1.67108245467e-19, 0.0, 1.76021325916e-19, 0.0, 4.78299785589e-20, 0.0, 0.0, 1.10374932892e-19, 9.64585822128e-20, 1.48850577813e-19, 1.44176091827e-19, 1.10962149306e-19, 0.0, 0.0, 2.60051259087e-19, 1.51409265984e-19, 0.0, 1.40592573089e-19, 0.0, 1.81860741026e-19, 2.86607091755e-19, 2.75522710518e-19, 0.0, 4.78610473046e-20, 0.0, 6.92693897926e-20, 1.97297744438e-19, 0.0, 6.86415642387e-20, 2.55371036069e-19, 1.53410538288e-19, 1.26057679943e-19, 1.95440799414e-7, 1.71950764079e-7, 6.13812443287e-8, 9.55826799821e-8, 4.82483756235e-7, 1.10014569165e-6, 1.77482476218e-7, 3.13075577495e-7, 5.16356407315e-7, 4.69158614298e-7, 1.27336333149e-7 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, 0.0], uv: [3.0, 4.0], spectrum: [ 0.00522780422835, 0.00522780976156, 0.00522906500383, 0.00522878998589, 0.00522649942294, 0.00522539887765, 0.00522428617914, 0.00522363013027, 0.00522494603157, 0.00522251551035, 0.00522021561275, 0.00521940192811, 0.00521761134955, 0.00521474296461, 0.0052143314855, 0.00520724849121, 0.00519533292074, 0.00518013111474, 0.0051600715153, 0.00513318388079, 0.0050959233612, 0.00505179416361, 0.00499954148174, 0.00493145272949, 0.00485417934339, 0.00476768298563, 0.00466251087821, 0.00453519012639, 0.00438835465804, 0.00422049153168, 0.00403271429804, 0.00382292425035, 0.00359080815733, 0.00334176637949, 0.00307785408642, 0.00279928942049, 0.002512506439, 0.00222281217713, 0.00193181911421, 0.0016416407816, 0.00136431168334, 0.00110312223536, 0.000862946254159, 0.000644981027984, 0.000454825627491, 0.000302830398902, 0.000184858880548, 9.0913133883e-5, 3.1225729491e-5, 4.7643348223e-6, 0.0, 1.97094378929e-20, 2.88982141311e-20, 8.22679629879e-20, 0.0, 4.84807968812e-20, 7.58129119221e-20, 6.10836553228e-20, 1.16467030247e-20, 2.7581510345e-20, 0.0, 1.43138948914e-8, 5.6751207466e-20, 1.02195495672e-6, 1.0812368607e-6, 2.37777121163e-7, 3.01152423184e-7, 1.28360511258e-6, 0.0, 0.0, 1.63600436894e-6, 1.49027016449e-7, 0.0, 2.50276831198e-6, 2.56667587891e-6, 1.21011871554e-6, 1.93741406675e-6, 3.04101083657e-6, 2.41309712546e-6, 2.31479218271e-6, 2.50070681774e-6 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, 0.0], uv: [3.9999999999999996, 4.0], spectrum: [ 0.00456361922635, 0.00456339763694, 0.00456281443906, 0.00456290597464, 0.0045626360729, 0.00456187600007, 0.0045607587863, 0.00455937956918, 0.00455767825376, 0.00455502668218, 0.00455154171887, 0.00454698846633, 0.00454188946384, 0.00453515906997, 0.00452571339776, 0.00451409899251, 0.00449842739848, 0.00447942718446, 0.00445586274256, 0.00442786000764, 0.00439560319887, 0.00435801541358, 0.0043144769202, 0.00426537840237, 0.00420921799419, 0.00414526042925, 0.0040724545436, 0.00399017272705, 0.0038976979278, 0.00379346302725, 0.00367732847978, 0.00354950582284, 0.00341068100482, 0.00326069373626, 0.00310075989828, 0.00293305081485, 0.00275874083094, 0.00258001680424, 0.00239977503092, 0.00221926219835, 0.00204205699795, 0.00187187013837, 0.00171052834463, 0.00156078181184, 0.00142412169924, 0.00130167150716, 0.00119437906465, 0.00110174530961, 0.0010238187969, 0.000959945641219, 0.000907439060184, 0.000865393123514, 0.000832325176084, 0.000805950795877, 0.000785595613989, 0.00077054016766, 0.000759134164045, 0.000750636254094, 0.000744366816568, 0.00073973384067, 0.000737230103908, 0.000735490256825, 0.000734305878382, 0.000733098289542, 0.000732243891888, 0.000730845525057, 0.000729315802119, 0.000727827082801, 0.000727295499174, 0.000726797684323, 0.000726789459451, 0.000726824997815, 0.000726482636827, 0.000726979343669, 0.00072719156914, 0.000727124533341, 0.000727125785832, 0.000726945373683, 0.000726596993193, 0.000725934256068, 0.000725640939597 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.0], uv: [5.0, 4.0], spectrum: [ 0.00385154747171, 0.00385139717529, 0.00385159157077, 0.00385214114018, 0.00385246908587, 0.00385119298808, 0.00384906348993, 0.00384613758634, 0.00384363947472, 0.00384051768098, 0.00383852187679, 0.00383459037204, 0.00383288350061, 0.00382889423259, 0.00382459737421, 0.00381761809856, 0.00380922418757, 0.00379754230315, 0.00378470787736, 0.00377021103245, 0.00375275670102, 0.00373299721526, 0.00370896268526, 0.00368323790968, 0.00365371862835, 0.00362242516022, 0.003586816978, 0.00354714256297, 0.00350154957619, 0.00345061347157, 0.00339429612314, 0.00333275180989, 0.00326645931411, 0.00319481601207, 0.0031176590355, 0.00303425223244, 0.00294670904685, 0.00285779019579, 0.00276693820455, 0.00267619011913, 0.00258518112416, 0.00249731617789, 0.00241465214837, 0.00233857656348, 0.00226952663651, 0.00220595948876, 0.00215148599341, 0.00210574604909, 0.00206738699869, 0.0020370353472, 0.00200978301984, 0.00198767293787, 0.00197030891442, 0.00195760063231, 0.00194763723274, 0.001939912577, 0.00193482086212, 0.0019315172632, 0.00192947881271, 0.00192840955996, 0.00192741982832, 0.00192706792456, 0.00192742474457, 0.00192709043554, 0.0019259085001, 0.00192445624474, 0.00192249182727, 0.00192091557326, 0.00191942486978, 0.00191785840517, 0.00191635941035, 0.0019151171566, 0.00191449354501, 0.00191477161504, 0.00191501631454, 0.00191561692223, 0.00191621597999, 0.00191727665316, 0.00191793401367, 0.00191859751273, 0.00191919200403 ] }, spectrum_data_point_t { xystar: [0.0, 0.0], uv: [6.0, 4.0], spectrum: [ 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108, 0.00311941566108 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, 0.0], uv: [6.999999999999999, 4.0], spectrum: [ 0.00239438477804, 0.00239432495366, 0.00239404693311, 0.00239434535352, 0.00239460005516, 0.00239549662376, 0.00239622233678, 0.00239690262653, 0.00239898315315, 0.00240023707386, 0.00240284409441, 0.00240603527935, 0.00240903685689, 0.00241303245372, 0.00241805513267, 0.00242357284352, 0.00243067097412, 0.00243979863872, 0.00245069880366, 0.00246340131083, 0.00247884623546, 0.00249726952549, 0.00251908605816, 0.00254536976296, 0.00257463140537, 0.00260699034481, 0.00264406189366, 0.00268523500016, 0.00273135621277, 0.00278309832948, 0.00284095829688, 0.00290456640647, 0.00297377105491, 0.00304885344578, 0.00312869389208, 0.00321261903734, 0.00330024006258, 0.00338967292438, 0.00348028583292, 0.00357049645765, 0.00365883192957, 0.00374301463642, 0.0038219374236, 0.00389630467267, 0.00396342301787, 0.00402492323675, 0.00407935057238, 0.00412659447834, 0.00416768384286, 0.00420082268876, 0.00422864462602, 0.00425129410551, 0.00426847848918, 0.00428205891935, 0.00429192718536, 0.00429812048385, 0.0043015273519, 0.00430363561007, 0.00430492935484, 0.00430550085979, 0.00430599703053, 0.00430601141027, 0.00430623723837, 0.00430650280706, 0.00430658332484, 0.00430681194503, 0.00430685089432, 0.00430736301456, 0.00430765002507, 0.00430776906572, 0.004308020915, 0.00430817936541, 0.00430902095077, 0.00430976686988, 0.00431059221643, 0.00431163432133, 0.00431204409082, 0.00431274146112, 0.00431341587713, 0.00431386571606, 0.0043142158751 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, 0.0], uv: [8.0, 4.0], spectrum: [ 0.00168151964593, 0.00168166497133, 0.00168142913432, 0.00168171725571, 0.0016823939839, 0.00168260864625, 0.00168223202137, 0.00168120435028, 0.00168089011601, 0.00168122457362, 0.00168348581048, 0.00168648888748, 0.00169270181671, 0.00170135621271, 0.00171231611666, 0.00172546442073, 0.00174262182991, 0.00176393443627, 0.00178765239225, 0.00181585709001, 0.00184710668882, 0.00188304782377, 0.00192497072787, 0.00197357556517, 0.00202935693408, 0.00209282593097, 0.00216442770466, 0.00224581540078, 0.00233896540542, 0.0024437223774, 0.00256016961383, 0.00268851480645, 0.00282792468748, 0.00297733089646, 0.00313700248684, 0.00330608123809, 0.00348093252582, 0.00366010702991, 0.00384190835411, 0.00402179643114, 0.00419842893575, 0.00436862826911, 0.00452970525098, 0.00467907815769, 0.00481527380496, 0.00493769311235, 0.00504542698645, 0.00513761291551, 0.00521439755734, 0.00527834030758, 0.00533082897643, 0.00537243513974, 0.00540454710997, 0.005429494443, 0.00544845757789, 0.00546257379381, 0.0054733948279, 0.00548070253144, 0.00548625427693, 0.00549074027774, 0.00549421467806, 0.00549650563841, 0.00549746400292, 0.00549793760269, 0.00549837443061, 0.00549847213651, 0.00549825343908, 0.00549795135771, 0.00549727943386, 0.00549620965684, 0.00549595497732, 0.00549607155778, 0.00549616681442, 0.00549607265627, 0.00549616375305, 0.00549611058095, 0.00549607050569, 0.00549571992612, 0.00549552543932, 0.0054952132659, 0.00549529104192 ] }, spectrum_data_point_t { xystar: [0.1638359986175532, 0.0], uv: [9.0, 4.0], spectrum: [ 0.000961796447815, 0.000961438586324, 0.000961548949336, 0.000960869548428, 0.000960301499152, 0.000959892509604, 0.000960179070233, 0.000961515599434, 0.000962653834818, 0.000964033300623, 0.000967556817925, 0.000973000090996, 0.000981450458787, 0.000993275998974, 0.00100843682413, 0.00102942505193, 0.00105478171408, 0.00108369528891, 0.00111847772831, 0.00115988808096, 0.00120816672384, 0.00126392738783, 0.00132747072268, 0.00140057647202, 0.00148408635097, 0.0015787929821, 0.00168662533925, 0.00180917052219, 0.00194811227535, 0.00210445470526, 0.00227963919406, 0.00247144017509, 0.00268105648075, 0.00290727145927, 0.00314840214443, 0.00340239503191, 0.00366552797318, 0.0039340107633, 0.0042043805217, 0.00447297091332, 0.00473650563211, 0.00498994467376, 0.00523052938627, 0.00545567185141, 0.00566123626946, 0.00584531668676, 0.00600706642097, 0.00614652664093, 0.00626362295172, 0.00636053160723, 0.00643915343459, 0.0065010281726, 0.00654937689891, 0.00658666803006, 0.00661476994524, 0.00663598781598, 0.0066513015516, 0.00666286493956, 0.00667079700346, 0.00667580629407, 0.00667954560854, 0.00668183979808, 0.00668315534328, 0.00668381519406, 0.00668509763138, 0.00668595727897, 0.00668666944548, 0.00668717512676, 0.00668740525774, 0.00668730813239, 0.00668707575391, 0.00668709691761, 0.00668684137864, 0.00668650245038, 0.00668660813628, 0.00668668676056, 0.00668680954768, 0.00668695893347, 0.00668691369629, 0.00668730491888, 0.00668735244817 ] }, spectrum_data_point_t { xystar: [0.21844799815673765, 0.0], uv: [10.0, 4.0], spectrum: [ 0.00024739191151, 0.000246986597168, 0.000245920885842, 0.00024375918344, 0.000241626523433, 0.00023831740756, 0.000237461577668, 0.000236953490834, 0.000236346937166, 0.000238018047384, 0.000243952724016, 0.000253873296527, 0.000266627523068, 0.000284685353492, 0.000306557965747, 0.000334206756875, 0.00036758129978, 0.000407887281203, 0.000455983575801, 0.00051214946085, 0.000576341683264, 0.000650388317591, 0.000735257437693, 0.000831033603429, 0.000941683413645, 0.00106598502816, 0.00120755486908, 0.00136849479048, 0.00155338720609, 0.00176150448873, 0.00199455114954, 0.00225344820204, 0.00253510344724, 0.00283843503124, 0.00315943000955, 0.00349778492625, 0.00384741989183, 0.00420597904008, 0.00456745722975, 0.0049266015182, 0.00527770743539, 0.00561532279009, 0.00593673888476, 0.00623471929802, 0.00650837463726, 0.00675278601872, 0.00696876216717, 0.00715355692307, 0.00730958922917, 0.00743811367082, 0.00754268125846, 0.00762714608393, 0.00769237304323, 0.00774232339771, 0.00778081241705, 0.00781035177792, 0.00783188525038, 0.00784806950592, 0.00785893386194, 0.00786597326943, 0.00787068329028, 0.00787445259861, 0.00787607308465, 0.00787699704094, 0.00787782997311, 0.00787776711718, 0.00787824406096, 0.0078787775357, 0.00787954848701, 0.00787917104757, 0.00787894085046, 0.00787866324289, 0.00787821345775, 0.00787758172517, 0.00787706607528, 0.00787706637962, 0.00787710704867, 0.00787767670104, 0.00787710545435, 0.00787795160569, 0.00787790807527 ] }, spectrum_data_point_t { xystar: [-0.2730599976959221, 0.056484824123486106], uv: [1.0, 4.999999999999999], spectrum: [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.85237060658e-17, 4.18099983294e-17, 0.0, 0.0, 4.82153413681e-18, 2.68506736141e-17, 6.0177867623e-17, 0.0, 2.19126714725e-17, 0.0, 0.0, 0.0067266335743, 0.0202098412247, 0.0340744334966, 0.0438085417018, 0.0466386326056, 0.0420824711269, 0.0311873831919, 0.0166307586267, 0.00335384314773, 3.30892090639e-16, 0.0, 1.79141742449e-16, 1.92647677192e-17, 0.0, 5.89433168697e-17, 1.45581734823e-16, 0.0, 8.43241996102e-17, 0.0, 0.0, 8.47957736444e-17, 0.0, 0.0, 3.18169543125e-16, 3.63106333836e-16, 4.20567076156e-16, 0.0, 1.72108854926e-17, 1.39089143551e-16, 4.98184849966e-17, 0.0, 1.94574073657e-16, 3.4508733992e-16, 3.3473492278e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.92620839966e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.2184479981567377, 0.056484824123486106], uv: [1.9999999999999991, 4.999999999999999], spectrum: [ 0.00129107923288, 0.00129047703083, 0.00129245279151, 0.00129713352878, 0.00130631555156, 0.00132340898607, 0.00135410819668, 0.00140841030044, 0.00150714801137, 0.00167755349863, 0.00196023327236, 0.00238737393316, 0.00297170067044, 0.00370800044038, 0.00457695581511, 0.00554964849544, 0.00658930353455, 0.00765046235515, 0.0086827182255, 0.00963323396617, 0.0104604106838, 0.0111243345935, 0.0115926467624, 0.0118426727456, 0.0118488002624, 0.0115872341063, 0.0110301847432, 0.0101648250334, 0.00900358274553, 0.0075889480961, 0.00600773746559, 0.00436706622789, 0.00279316018551, 0.00142752736096, 0.000435939965155, 8.63941841197e-20, 0.0, 3.93501148297e-19, 3.68025316263e-19, 0.0, 4.8066524196e-19, 0.0, 1.10941050142e-18, 8.06554960317e-19, 6.9848389505e-19, 0.0, 3.68065384467e-19, 0.0, 1.08201693935e-18, 1.46233628452e-18, 0.0, 0.0, 0.0, 2.04720640446e-19, 2.57243340993e-19, 0.0, 0.0, 0.0, 5.74903945475e-19, 6.1638895931e-19, 5.37364997354e-20, 0.0, 6.00484871252e-19, 2.67214161652e-19, 0.0, 5.8884713061e-19, 0.0, 0.0, 7.89080673539e-20, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.70913021719e-7, 6.75195129323e-7, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, 0.056484824123486106], uv: [3.0, 4.999999999999999], spectrum: [ 0.00394914483256, 0.00394901346557, 0.00394978062204, 0.00395158066983, 0.00395360384565, 0.00395561489703, 0.00396054336989, 0.00397227436417, 0.00399103436988, 0.00402425045599, 0.00407846378912, 0.00416117049222, 0.0042772673491, 0.0044251129034, 0.00460342220623, 0.00480982418143, 0.0050370291405, 0.00527798471542, 0.00552676615083, 0.0057747307465, 0.00601070736282, 0.00622668131906, 0.00641510266503, 0.00656681677141, 0.00667603538159, 0.0067306201198, 0.0067229953394, 0.00664418763842, 0.00648366693805, 0.00623338777265, 0.00589980048742, 0.00548804418047, 0.0050054964408, 0.0044647998467, 0.0038763455879, 0.00325714512181, 0.00263332855056, 0.0020224042872, 0.00144684281845, 0.000933424141857, 0.000507063280928, 0.00019312325851, 1.78224243016e-5, 0.0, 0.0, 1.53248703848e-19, 0.0, 0.0, 6.81708689641e-20, 3.37259226504e-19, 0.0, 0.0, 0.0, 1.29384849287e-19, 0.0, 2.31255180324e-19, 3.18616453759e-19, 1.89325168066e-19, 1.42701348634e-19, 1.23037451739e-19, 0.0, 3.22978799606e-19, 0.0, 7.67888306245e-20, 0.0, 0.0, 3.56283233439e-19, 1.39866315415e-19, 3.03240536019e-7, 4.24936059448e-7, 3.79866125731e-7, 4.24575264811e-20, 5.48217955941e-7, 3.09475112561e-7, 8.35079464777e-7, 7.81259630246e-7, 3.72059222081e-19, 2.67044169078e-7, 5.35193882e-7, 6.01222641095e-7, 2.31120990028e-8 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, 0.056484824123486106], uv: [3.9999999999999996, 4.999999999999999], spectrum: [ 0.00375571080025, 0.00375562996312, 0.00375618417943, 0.00375550596142, 0.00375630507335, 0.0037583224569, 0.00376091076677, 0.00376428906255, 0.00377152583874, 0.00378592706995, 0.00381069163626, 0.00384874867626, 0.00390212359679, 0.00397110969114, 0.00405506576673, 0.00415250322712, 0.00426221602141, 0.00438241690639, 0.00450893557115, 0.00463798255329, 0.00476515081565, 0.00488599181464, 0.00499835529711, 0.00509812331119, 0.00518031342489, 0.00524189700063, 0.00527746947784, 0.00528092848041, 0.00524885500596, 0.00517671999976, 0.0050638855301, 0.00491049060937, 0.00471632761407, 0.00448263732318, 0.00421264887837, 0.00391166098995, 0.00358473262695, 0.00323730138801, 0.00287668241959, 0.00251095651274, 0.00214727124604, 0.0017956574309, 0.00146267760685, 0.00115499093476, 0.000880427708607, 0.000641250378439, 0.000440896540554, 0.000281225942953, 0.000159614098133, 7.46793966478e-5, 2.31568718448e-5, 0.0, 1.13686565366e-20, 0.0, 1.0519432823e-20, 5.21249455664e-20, 9.65643071233e-21, 0.0, 4.61904315613e-20, 0.0, 1.95792471034e-20, 0.0, 0.0, 5.19540424989e-7, 3.22216144777e-7, 3.98041097298e-7, 9.35727425867e-7, 1.09525398858e-6, 7.41912643343e-7, 1.11452959576e-6, 1.37316151998e-6, 1.14899955984e-6, 1.03179785652e-6, 1.08558720525e-6, 6.84134826494e-7, 7.22125925451e-7, 9.36173770132e-7, 1.06476281226e-6, 1.30807547629e-6, 1.55335609635e-6, 1.54549140859e-6 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.056484824123486106], uv: [5.0, 4.999999999999999], spectrum: [ 0.00306831535751, 0.00306816417356, 0.00306889286396, 0.00306981336722, 0.00307095108822, 0.00307266896186, 0.00307744084702, 0.00308287986109, 0.00309259374462, 0.00310751600647, 0.00313351503369, 0.00317068780008, 0.00322125690902, 0.0032880187649, 0.00336678408051, 0.00345915352035, 0.00356562585802, 0.00368391352753, 0.00381098458484, 0.00394244262917, 0.00407556068704, 0.00420703382845, 0.00433239703439, 0.00444707355824, 0.00455141889007, 0.00464107289129, 0.00471016165756, 0.00475497957256, 0.00477273404837, 0.0047615454848, 0.00471801113441, 0.00464318787835, 0.00453507911784, 0.00439419864066, 0.00422489273236, 0.00402938476063, 0.00381191131641, 0.00357664090238, 0.00332829044026, 0.00307117725682, 0.00281169285477, 0.00255418513679, 0.00230470456786, 0.00206722497792, 0.00184651485486, 0.00164493705024, 0.00146515203579, 0.00130967505521, 0.00117574219618, 0.00106400864034, 0.000973749042299, 0.000902376017481, 0.00084737757163, 0.000804787764687, 0.00077234614347, 0.000747251030533, 0.000728109664737, 0.000714346281301, 0.000703620310904, 0.00069590430287, 0.000690466295825, 0.00068725139835, 0.000684770161693, 0.000682645833429, 0.000681281115655, 0.000680870603331, 0.000679992164812, 0.000680380087715, 0.000681510370349, 0.000681181328598, 0.000680047038844, 0.000679125644796, 0.000677905748199, 0.000677413668657, 0.000677115338526, 0.000677595481073, 0.000677730867656, 0.000677604120123, 0.000677375344955, 0.000677097093364, 0.00067702115062 ] }, spectrum_data_point_t { xystar: [0.0, 0.056484824123486106], uv: [6.0, 4.999999999999999], spectrum: [ 0.00235213438702, 0.00235265948988, 0.00235382772128, 0.00235484489216, 0.00235632646404, 0.00235929683999, 0.00236392463197, 0.00237007500814, 0.00237917440915, 0.00239566082626, 0.00242187159191, 0.00246053995227, 0.00251380919143, 0.00258326633886, 0.00266715345575, 0.00276673143901, 0.00287875751682, 0.00300165763988, 0.00313707933093, 0.00328009433915, 0.00342726013728, 0.0035750900858, 0.00371970538538, 0.00385889689933, 0.00399098448078, 0.00411224535857, 0.00421888514676, 0.00430849971081, 0.00437681107144, 0.00441959406407, 0.00443706229616, 0.00442822548326, 0.00439394942875, 0.00433437522273, 0.00424701730467, 0.00413737576545, 0.00400815078487, 0.00385964243551, 0.00369716835388, 0.00352479627566, 0.00334924261693, 0.00317320665147, 0.00299939148291, 0.00283411471357, 0.00268152501153, 0.00254347550684, 0.00241920971519, 0.00231179793878, 0.00222124832083, 0.0021468260241, 0.00208540686005, 0.00203538653323, 0.00199655475654, 0.00196692780348, 0.00194338681373, 0.00192551211147, 0.00191272716803, 0.001902832915, 0.00189546922533, 0.00188991480947, 0.00188674429609, 0.00188485911368, 0.00188381115312, 0.00188300242205, 0.00188308503211, 0.00188355376617, 0.00188323873731, 0.00188289208729, 0.0018822028972, 0.0018815904869, 0.00188053398409, 0.00187969344382, 0.00187884504801, 0.00187815386496, 0.00187791032921, 0.00187773212108, 0.0018774415505, 0.00187700959805, 0.00187626135945, 0.00187590285437, 0.00187576927877 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, 0.056484824123486106], uv: [6.999999999999999, 4.999999999999999], spectrum: [ 0.00165777522963, 0.001656525778, 0.00165593611864, 0.00165511109416, 0.00165470643693, 0.00165478945993, 0.00165660377194, 0.00165980509329, 0.00166764588984, 0.00168238770536, 0.00170739016494, 0.00174415808846, 0.00179758980823, 0.00186905135196, 0.00195705524194, 0.00206300327231, 0.00218531401422, 0.00232298074709, 0.00247234548606, 0.00262985720938, 0.00279403299192, 0.00296089603906, 0.00312930631638, 0.00329487078212, 0.00345576565975, 0.0036077944776, 0.00374993401874, 0.00387926219479, 0.0039916903305, 0.00408688497433, 0.00416145173041, 0.0042151967398, 0.00424786032728, 0.00425912682197, 0.00425095064673, 0.0042239566837, 0.0041807623104, 0.00412324663942, 0.00405335611041, 0.00397333318045, 0.00388553184001, 0.00379422849694, 0.00370265347298, 0.00361315758125, 0.00352876243993, 0.00345094978266, 0.00338215450527, 0.00332239069275, 0.00327140084643, 0.00323084825143, 0.00319731215625, 0.00317078470113, 0.00315046382848, 0.00313414791567, 0.00311962253712, 0.00310841596364, 0.00309994115588, 0.00309255086322, 0.00308526303144, 0.00307915458666, 0.0030740100993, 0.0030698146508, 0.00306768581233, 0.00306622878064, 0.00306430201927, 0.00306446696012, 0.00306482725386, 0.00306506691514, 0.00306578825, 0.00306658864747, 0.00306776803171, 0.00306902701361, 0.00307063528288, 0.00307259052644, 0.00307424593331, 0.00307589484245, 0.0030778182551, 0.00307924699596, 0.0030799818391, 0.00308044876128, 0.00308071074913 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, 0.056484824123486106], uv: [8.0, 4.999999999999999], spectrum: [ 0.000905383547515, 0.000905747696491, 0.000905264577302, 0.000905702679382, 0.000907487011437, 0.000911778812856, 0.000917598221972, 0.000924308380533, 0.000934303143024, 0.000951424067209, 0.000981562795743, 0.0010263771701, 0.00108670094492, 0.00116363704921, 0.0012602320375, 0.00137220271357, 0.00150366469274, 0.00164942238931, 0.00180834327855, 0.00197915532718, 0.00215817487604, 0.0023421971812, 0.00252961146654, 0.00271894466694, 0.00290713886638, 0.00309266594821, 0.00327314568368, 0.00344390339776, 0.00360368238701, 0.00375121585332, 0.0038834928459, 0.00400177814501, 0.00410348988691, 0.00419112484866, 0.00426282104683, 0.00431936314882, 0.00436235782145, 0.00439209705064, 0.00441131216098, 0.00442011253807, 0.004419750869, 0.00441281536001, 0.00440186377865, 0.00438797949772, 0.00437418092426, 0.00435986859341, 0.00434637818574, 0.00433482036157, 0.00432363629345, 0.00431366052174, 0.00430628052834, 0.00429990799492, 0.00429518231373, 0.00429203274399, 0.00428918391482, 0.00428685704247, 0.00428511457041, 0.0042836443852, 0.00428236320381, 0.00428089608249, 0.00428003673737, 0.00427949188901, 0.00427918972251, 0.00427997144231, 0.0042812285868, 0.00428225838757, 0.00428315017992, 0.00428264286945, 0.0042831701661, 0.00428248665587, 0.00428110423914, 0.0042803550837, 0.00427922666412, 0.00427881952925, 0.0042775554499, 0.0042773552462, 0.00427780803932, 0.00427689146418, 0.00427695533535, 0.00427661587444, 0.00427652879209 ] }, spectrum_data_point_t { xystar: [0.1638359986175532, 0.056484824123486106], uv: [9.0, 4.999999999999999], spectrum: [ 0.000201458296072, 0.000201259401349, 0.000201430023599, 0.000201736772141, 0.000201983085725, 0.000203042652675, 0.000205339570811, 0.000210561401801, 0.000219561935994, 0.00023525290151, 0.000262993538742, 0.000307683269754, 0.000370507445664, 0.000453140961103, 0.000554139713855, 0.000673865699715, 0.000813497531867, 0.00096993538239, 0.00114267147581, 0.00132964039245, 0.00152578674005, 0.00172907660719, 0.00193845065896, 0.00215121074533, 0.00236568028265, 0.00257994094478, 0.00279327769184, 0.00300347359388, 0.00320757307985, 0.00340571717795, 0.0035968214302, 0.0037786303484, 0.00395185204283, 0.00411592054115, 0.00426964462452, 0.00441294720115, 0.00454506315122, 0.00466617172538, 0.00477709211401, 0.00487743220089, 0.00496795710661, 0.00504819547675, 0.00511822346822, 0.00517861185971, 0.00523023795334, 0.00527430271769, 0.00531128872292, 0.00534133470817, 0.0053655299078, 0.00538466438133, 0.00540035173943, 0.00541324257988, 0.00542281281688, 0.0054299125453, 0.00543568364028, 0.00544033582313, 0.00544350668884, 0.00544653421249, 0.00544864298621, 0.00544956449157, 0.00545024017474, 0.00545047088216, 0.0054502091305, 0.00545010632812, 0.0054497136449, 0.00544930627879, 0.00544886001995, 0.00544877153702, 0.00544868855019, 0.00544845762105, 0.00544824813646, 0.00544794352807, 0.00544773459553, 0.00544743473349, 0.0054472189396, 0.00544679384257, 0.00544679026659, 0.00544662240018, 0.00544626606821, 0.0054465642138, 0.00544625099672 ] }, spectrum_data_point_t { xystar: [0.21844799815673765, 0.056484824123486106], uv: [10.0, 4.999999999999999], spectrum: [ 1.92769335555e-6, 1.37360513351e-6, 8.71790612511e-7, 1.79955584192e-7, 5.34021427589e-20, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.09268516026e-20, 1.62677904939e-19, 0.0, 6.54152757036e-20, 2.73290434806e-19, 1.12593212447e-20, 0.0, 2.92449053213e-5, 0.000157340453052, 0.000360608604748, 0.000620949978232, 0.000920848294074, 0.00124918850638, 0.00159602116369, 0.001955410364, 0.00231824765963, 0.00267687269206, 0.00302799591741, 0.0033660515505, 0.00368727267715, 0.00398985604878, 0.00427186279908, 0.0045329454216, 0.00477256585964, 0.00499013185653, 0.00518717429914, 0.0053626416973, 0.00551670146383, 0.00565312371109, 0.00577126511647, 0.00587300866495, 0.00595918290972, 0.00603071544765, 0.00609051371103, 0.00613894871351, 0.00617886257874, 0.00621111258979, 0.00623610455212, 0.00625502830803, 0.00626955299347, 0.00628030342276, 0.00628802500874, 0.0062956340952, 0.00630138434623, 0.00630467402934, 0.00630663083975, 0.00630810824094, 0.00630894391625, 0.00630911033534, 0.00630942712143, 0.00630933127776, 0.00630946841462, 0.0063094029945, 0.0063091919095, 0.00630926518525, 0.00630978362664, 0.00631044192253, 0.00631085664534, 0.00631094414133, 0.00631098205033, 0.00631074942486, 0.00631035757024, 0.00630996662911, 0.006309738591, 0.00630957988118, 0.00630955124689, 0.00630951117535, 0.00631005903714, 0.00631012577622 ] }, spectrum_data_point_t { xystar: [-0.2184479981567377, 0.11296964824697227], uv: [1.9999999999999991, 6.0], spectrum: [ 0.0, 2.1352544766e-18, 1.15721348301e-18, 4.97865859685e-19, 0.0, 0.0, 0.0, 3.18378374817e-19, 1.90790444059e-18, 0.0, 0.0, 1.00359216809e-18, 0.00021699481259, 0.000999400716976, 0.00229699033323, 0.00402745384529, 0.0060786702822, 0.0083164191158, 0.0105926874383, 0.0127486185162, 0.0146468692817, 0.0161757052815, 0.0172477979987, 0.0178030842649, 0.0177865347557, 0.0171509500654, 0.0158548216626, 0.013910924974, 0.0114104976727, 0.00853812103564, 0.00557506735269, 0.00288507830299, 0.00087729637637, 1.20930452995e-18, 0.0, 0.0, 4.93270500484e-19, 2.69843558616e-18, 0.0, 4.0373965693e-18, 0.0, 0.0, 0.0, 0.0, 6.1507295012e-18, 0.0, 7.28393606997e-18, 2.28406581297e-18, 4.13196120664e-18, 0.0, 6.12811278368e-18, 2.33730854174e-18, 1.7310770908e-18, 9.94624228027e-19, 1.4248512339e-18, 1.73165261796e-18, 7.51822360409e-19, 0.0, 5.74837749165e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.44045035743e-19, 1.45979239035e-18, 1.0246925209e-18, 1.0650655192e-18, 3.9753966372e-19, 4.8252077173e-19, 4.17702104545e-19, 0.0, 0.0, 0.0, 0.0, 2.04876094117e-19, 4.95302515907e-19, 2.02421238299e-7, 4.59727132122e-19 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, 0.11296964824697227], uv: [3.0, 6.0], spectrum: [ 0.00198748905677, 0.00198795988863, 0.00198905701, 0.00199139753607, 0.00199626841049, 0.00200524163139, 0.0020214612418, 0.00205135097116, 0.00210350660477, 0.00219605336277, 0.00235072824535, 0.00258626173639, 0.00291148973663, 0.00332729412851, 0.00382779596523, 0.00440179929899, 0.00503423996835, 0.00570590438603, 0.00639436322126, 0.00707269670381, 0.00771798437081, 0.00830726556172, 0.00881944223714, 0.0092361374907, 0.00953924359265, 0.00970811160498, 0.00971800710684, 0.0095479442521, 0.00918637682873, 0.00863206760331, 0.00789630220062, 0.00700493352175, 0.00599387489393, 0.00490527293229, 0.00378676772686, 0.00269616304312, 0.00169939099519, 0.00086680490808, 0.000273698830734, 0.0, 2.46041822463e-19, 2.04463913231e-19, 1.78201708691e-19, 0.0, 1.54164929862e-19, 1.81463923939e-19, 4.00030119035e-19, 0.0, 5.85299177945e-20, 0.0, 9.31782101984e-20, 0.0, 0.0, 0.0, 9.96222103271e-20, 0.0, 1.3745688206e-19, 5.21841632779e-20, 1.70504213453e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.68058309424e-8, 1.63791735401e-7, 0.0, 7.00747417016e-8, 4.24525579494e-7, 2.70157185847e-7, 6.9493400322e-7, 8.76207407963e-7, 4.25890222851e-7, 4.47661280186e-7, 5.30160906003e-7, 4.19235863366e-7, 2.79212864207e-7 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, 0.11296964824697227], uv: [3.9999999999999996, 6.0], spectrum: [ 0.00262927878119, 0.00263001325013, 0.00262965078328, 0.00263105216766, 0.00263365004897, 0.00263810287821, 0.00264663897094, 0.00266234177351, 0.00268545211246, 0.00273382672703, 0.00280651555404, 0.00291336718575, 0.00306626377037, 0.00326110113109, 0.00349805045516, 0.00377117930361, 0.00407693895865, 0.00441228453599, 0.00476664071786, 0.00512800093172, 0.00548517236295, 0.00583178696348, 0.00615695962558, 0.00645224725252, 0.00670886557543, 0.00691261064299, 0.00705483138293, 0.00712570216733, 0.0071121061889, 0.00700858042627, 0.00680912322123, 0.006518288525, 0.00614469989507, 0.00569420912738, 0.00517646478696, 0.00460274655016, 0.0039908183025, 0.00335931840011, 0.00272847806822, 0.00211790082099, 0.00154628023143, 0.00103746375879, 0.000611348860169, 0.000288408873156, 8.10244116455e-5, 3.99375895093e-20, 0.0, 1.12748181582e-19, 1.48623874871e-19, 5.07656531098e-20, 2.23006069104e-19, 2.10965887916e-19, 7.4197188647e-20, 2.02530672574e-19, 1.14494233647e-20, 0.0, 9.94740170483e-21, 0.0, 0.0, 3.47816299462e-19, 4.45381502754e-22, 2.17321196857e-19, 1.40476046753e-19, 0.0, 1.99681742091e-19, 6.75041334532e-20, 5.32756361759e-20, 2.71630441448e-7, 0.0, 0.0, 6.14444764316e-7, 1.13657006912e-6, 8.46653924712e-8, 0.0, 1.02912041671e-6, 8.23053666693e-7, 4.21840856958e-8, 0.0, 7.88040365724e-8, 0.0, 5.50571415715e-21 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.11296964824697227], uv: [5.0, 6.0], spectrum: [ 0.00225414649188, 0.00225393204463, 0.00225356635707, 0.00225483333669, 0.0022579583522, 0.00226151327277, 0.00226680731867, 0.00227813923991, 0.00229635503756, 0.00232846537743, 0.00238412108243, 0.00246252616622, 0.0025715004516, 0.0027173193105, 0.00289692496542, 0.00310317452929, 0.0033360692436, 0.00359421859803, 0.00387311736703, 0.00416308287017, 0.00445575566297, 0.00474450040415, 0.00502365860022, 0.00528758749779, 0.005530829797, 0.0057447851193, 0.00591978643527, 0.00604932357462, 0.00612827829032, 0.00614823403118, 0.0061048048623, 0.00599815303584, 0.00583542150129, 0.00561031696457, 0.00533104581421, 0.00500301990676, 0.00463334415746, 0.00423014763966, 0.0038033516419, 0.00336515646968, 0.00291992725192, 0.00247969967736, 0.0020575977827, 0.00166223181664, 0.00130372043484, 0.000986532947471, 0.00071201480831, 0.000486726711618, 0.000310938461599, 0.000174392275519, 8.10211799422e-5, 2.86447119124e-5, 0.0, 8.30048139007e-20, 1.85351298645e-19, 1.79647647315e-19, 5.21352171678e-20, 1.48586011312e-19, 5.61825871117e-20, 1.30042152484e-19, 0.0, 9.28640194261e-20, 9.56264753312e-20, 6.00334601366e-20, 8.99972506458e-20, 1.10262405327e-19, 1.21337469694e-19, 3.02444473606e-7, 1.30075391988e-6, 2.22537671325e-6, 1.85079964919e-6, 1.17364088918e-6, 1.37859829839e-6, 2.00183311872e-6, 1.20402499058e-6, 3.1122989287e-7, 4.02187186643e-7, 3.84853747502e-7, 1.45290354886e-7, 1.16043513774e-19, 1.46907276789e-19 ] }, spectrum_data_point_t { xystar: [0.0, 0.11296964824697227], uv: [6.0, 6.0], spectrum: [ 0.00161820540752, 0.00161861221842, 0.00161847474526, 0.00161932507098, 0.00162109394845, 0.00162332860202, 0.00162770472117, 0.00163633807548, 0.00165298575559, 0.00168062667003, 0.00172729280498, 0.00180075071072, 0.00190330028589, 0.00203984605965, 0.0022068264401, 0.0024051788726, 0.0026317608521, 0.00288345848041, 0.00315647555887, 0.00344534815993, 0.00374129105277, 0.00403700363526, 0.00432731683862, 0.00460584594723, 0.00486957670298, 0.00510946925661, 0.00532151661864, 0.00549961093426, 0.0056330180178, 0.00571949651007, 0.00575483664973, 0.005738868099, 0.00566795679979, 0.00554452360873, 0.00536983396914, 0.00514893747959, 0.00488852278959, 0.00459348475746, 0.00427333526484, 0.00393243498596, 0.00358188644017, 0.00322945510136, 0.0028865804626, 0.00255852010844, 0.00225269459647, 0.00197259722519, 0.0017227862845, 0.00150561663224, 0.00131991079874, 0.00116788309546, 0.00104351669536, 0.000944024135699, 0.000866526870846, 0.000807271726222, 0.000761697771237, 0.000727847210657, 0.00070272942851, 0.000684737507003, 0.000672321431001, 0.000663199444457, 0.000656232100349, 0.000649658255272, 0.000645278308165, 0.000642093880398, 0.000639350796459, 0.000637278149328, 0.000635212611648, 0.000633883921856, 0.00063324321748, 0.000632343354473, 0.000632595180188, 0.000632750662456, 0.000632891504076, 0.000632754050132, 0.000631619471173, 0.000631045978761, 0.000631577625447, 0.000631061770993, 0.000631154240244, 0.00063165085361, 0.000631459605078 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, 0.11296964824697227], uv: [6.999999999999999, 6.0], spectrum: [ 0.000882493777461, 0.000881705278857, 0.000882602183772, 0.000883409980422, 0.000884756224786, 0.000888376377698, 0.000893675769878, 0.000903455701221, 0.000921105729404, 0.000951138169817, 0.00100195236053, 0.00107833093428, 0.00118622983748, 0.00132683698536, 0.00150204459779, 0.00170972960208, 0.00194667628475, 0.00221101684444, 0.00249735813735, 0.00280078664911, 0.00311395207575, 0.00343026091326, 0.00374278601684, 0.0040471865385, 0.00433801345009, 0.00460953016285, 0.00485602300237, 0.00507182555464, 0.00525029922473, 0.00538574427431, 0.00547491277416, 0.00551770393462, 0.00551326718183, 0.00546294367959, 0.00536853389381, 0.00523334969729, 0.00506214509627, 0.00485974624109, 0.00463072341496, 0.00438212804714, 0.00412163801792, 0.00385713870389, 0.00359551172963, 0.00334131813335, 0.00310264851378, 0.00288429659739, 0.0026883534835, 0.00251735271588, 0.00237220688175, 0.00225221341279, 0.00215322214657, 0.00207435856748, 0.00201160680469, 0.0019639546382, 0.0019274565918, 0.00189920505731, 0.00187886198183, 0.00186367787351, 0.00185223893691, 0.00184391457655, 0.00183701292948, 0.00183276541422, 0.00182995569392, 0.00182808730412, 0.00182662005211, 0.0018259220627, 0.00182559170935, 0.00182493371959, 0.00182447614855, 0.00182435761227, 0.00182400159488, 0.00182408440876, 0.00182384844699, 0.00182347322961, 0.00182325891488, 0.00182301969513, 0.00182304253017, 0.00182311723576, 0.00182302931489, 0.00182359408429, 0.00182370657821 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, 0.11296964824697227], uv: [8.0, 6.0], spectrum: [ 0.00016488961411, 0.000164102352059, 0.000165801979055, 0.000167874232366, 0.000170313081751, 0.000172031427297, 0.000178858261908, 0.000188937302795, 0.000206355159034, 0.000239092822234, 0.000291178821009, 0.000369927492607, 0.000480309359486, 0.00062500866921, 0.00080001869199, 0.00100811867362, 0.00125648073207, 0.00153013148141, 0.00182375433065, 0.00213953216841, 0.00246578952273, 0.00280235815495, 0.00313748808963, 0.00346564643398, 0.0037849192405, 0.00408770792591, 0.00437139774911, 0.00462916148962, 0.00485496553953, 0.00504214130417, 0.00519119864458, 0.0052972021616, 0.00536407200572, 0.00539328179037, 0.00538228464542, 0.00533363238693, 0.00524731403538, 0.00513355839821, 0.00499856151071, 0.00484015337325, 0.0046685850846, 0.0044892027732, 0.00430951873824, 0.00413123581832, 0.00395892546847, 0.00379762203604, 0.00365484150858, 0.00352927397233, 0.0034201051603, 0.00332956714422, 0.00325095654926, 0.00318561903807, 0.00313544563458, 0.00309428976861, 0.00306033854408, 0.00303455666855, 0.00301595948436, 0.00300241854872, 0.00298748758715, 0.00297673004049, 0.00297059081424, 0.00296690615978, 0.00296372534142, 0.00296244493857, 0.00296102145707, 0.00296186235101, 0.00296449094466, 0.00296198307317, 0.00296245828049, 0.00296430662036, 0.0029656846385, 0.0029685722772, 0.00297009753231, 0.00297156094345, 0.00297281649209, 0.00297369231323, 0.00297409370313, 0.0029758009901, 0.00297467073241, 0.00297567638229, 0.00297584332186 ] }, spectrum_data_point_t { xystar: [0.1638359986175532, 0.11296964824697227], uv: [9.0, 6.0], spectrum: [ 1.72895767792e-8, 8.08524299853e-8, 5.48817661668e-8, 2.05892750533e-20, 0.0, 5.49441061985e-20, 0.0, 2.83072186135e-20, 0.0, 0.0, 0.0, 0.0, 7.46798798285e-20, 3.33754935221e-20, 3.2590496735e-5, 0.000133780473526, 0.000300376979773, 0.000527801488319, 0.000808837599054, 0.0011318868907, 0.00148717597586, 0.00186410993522, 0.00225389817958, 0.0026479948129, 0.00303784312699, 0.00341820404614, 0.00378182528557, 0.00412262181891, 0.00443534511463, 0.00471289483633, 0.00495105319878, 0.00514942557844, 0.0053059366488, 0.00542029096026, 0.00549357832563, 0.00552876423123, 0.00552876998317, 0.00549729426051, 0.00543762858095, 0.00535335634115, 0.00525101513815, 0.00513663836408, 0.00501605309479, 0.00489400443295, 0.0047741285448, 0.00466021076982, 0.00455629434294, 0.00446353698641, 0.00438325351486, 0.00431593306967, 0.00425996484556, 0.00421493576159, 0.00418019176743, 0.00415269824786, 0.00413171277582, 0.00411670941757, 0.00410590577836, 0.00409823647104, 0.0040931396611, 0.00408872023732, 0.0040850724277, 0.00408223409946, 0.00408056064816, 0.00407909356647, 0.00407737171798, 0.00407604611186, 0.00407563002539, 0.00407498373302, 0.00407456175032, 0.00407455409576, 0.00407372837359, 0.00407329693058, 0.0040734896966, 0.00407253201456, 0.00407212461703, 0.00407202925703, 0.00407109825312, 0.00407100159636, 0.00407094512658, 0.00407021206718, 0.00407027181173 ] }, spectrum_data_point_t { xystar: [-0.2184479981567377, 0.16945447237045844], uv: [1.9999999999999991, 7.0], spectrum: [ 1.00324917886e-18, 5.53108447967e-18, 3.11828901548e-18, 5.5057087059e-18, 1.92405961356e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 1.51345380295e-18, 0.0, 6.46228592287e-18, 1.82967724254e-18, 0.0, 0.0, 0.00175837508494, 0.0051086555725, 0.00947521898763, 0.0142054824268, 0.0187229839026, 0.0225588346612, 0.0253530132414, 0.0268756875729, 0.026957301587, 0.0254889539137, 0.0224342364451, 0.0179589818298, 0.012523321047, 0.00692834668445, 0.00229306075975, 0.0, 0.0, 0.0, 0.0, 2.45915935639e-17, 1.22937186245e-17, 0.0, 0.0, 3.68312639482e-18, 0.0, 0.0, 2.53711087387e-17, 7.50598252114e-18, 3.30745532888e-18, 4.68630883914e-18, 8.52146487664e-18, 0.0, 7.60091114649e-19, 1.26943925342e-17, 0.0, 0.0, 0.0, 0.0, 1.57356106699e-18, 0.0, 0.0, 0.0, 2.25913004989e-19, 0.0, 1.18458906935e-18, 0.0, 5.4866327814e-19, 1.72597898863e-18, 0.0, 1.12498243732e-18, 2.79005988202e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.47232364546e-18, 6.54676033147e-20, 5.03136649389e-19, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, 0.16945447237045844], uv: [3.0, 7.0], spectrum: [ 1.15743165544e-19, 0.0, 1.09770033088e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.69617148166e-5, 0.000193544207676, 0.000538786613928, 0.00108473856172, 0.00183256735001, 0.00276601122186, 0.00385705562488, 0.00507139088168, 0.00636538053708, 0.0076883401117, 0.00898364366252, 0.0101977581165, 0.0112828691563, 0.0121990688182, 0.0129136312579, 0.0133902476701, 0.0135914773209, 0.0134751722763, 0.0130109019999, 0.0121876844141, 0.0110231415145, 0.00956624270525, 0.00789557784145, 0.00610982029053, 0.00432140911166, 0.00266031746231, 0.00127517971551, 0.000329470675459, 4.55768191655e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 7.18035687855e-19, 2.78953862625e-18, 3.77527808635e-19, 1.21159999337e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 2.530707565e-19, 6.5751162674e-19, 0.0, 0.0, 2.32307425394e-19, 0.0, 0.0, 9.14953171361e-20, 0.0, 1.0499651231e-19, 4.81498546498e-19, 0.0, 1.95808790488e-20, 1.49106968617e-19, 1.41126886319e-19, 1.66448601873e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.35633978014e-19, 1.70646856102e-19, 1.52944808236e-7, 1.92712471547e-7 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, 0.16945447237045844], uv: [3.9999999999999996, 7.0], spectrum: [ 0.00115873621413, 0.00115929670516, 0.00116045356524, 0.00116271987518, 0.00116701528728, 0.00117553931187, 0.00119072326331, 0.00121727852919, 0.00126534199166, 0.00134850164349, 0.00148740569878, 0.00169916267577, 0.00199330178565, 0.00237176561652, 0.00283117088615, 0.00336335048895, 0.00395899279681, 0.00460242401727, 0.00527740010213, 0.00596309467986, 0.00663912819498, 0.00728560151263, 0.007882938979, 0.0084168846055, 0.00886939618161, 0.00921968461558, 0.00944793988847, 0.00953313638189, 0.00945740721202, 0.00921093395605, 0.00879530471792, 0.00822067831597, 0.00750401662751, 0.00666808391263, 0.00574106582812, 0.00475622918955, 0.0037537579058, 0.00277649694128, 0.00187275481428, 0.0010929847855, 0.000488320385958, 0.000108187095042, 0.0, 0.0, 0.0, 5.61286719647e-20, 5.8876416571e-20, 0.0, 7.99871652998e-20, 0.0, 1.28234817948e-19, 0.0, 0.0, 6.98755120264e-20, 2.38723851719e-19, 2.91013251543e-19, 0.0, 1.3169907363e-19, 0.0, 1.88601006723e-19, 1.5349857474e-19, 4.21442245785e-19, 3.17180082928e-19, 5.35320536919e-19, 4.06940372797e-8, 2.78507644942e-19, 4.0508948797e-7, 5.73694327217e-7, 7.15507203868e-7, 8.07934753441e-7, 1.63843722886e-6, 2.30697905025e-6, 1.79772365321e-6, 1.46131034262e-6, 1.28547133647e-6, 1.35481174738e-6, 1.18220603741e-6, 1.21040725936e-6, 1.38067866522e-6, 1.20124384248e-6, 1.37276378593e-6 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.16945447237045844], uv: [5.0, 7.0], spectrum: [ 0.0012537484039, 0.00125332419504, 0.0012544515174, 0.00125726779142, 0.00125967512714, 0.00126438915539, 0.00127452008628, 0.00129118247446, 0.00132213044587, 0.00137502264339, 0.00146418515679, 0.00160219515685, 0.00179456881183, 0.00204606628439, 0.0023546197472, 0.00271633186239, 0.00312694529195, 0.00357800423002, 0.0040613507904, 0.00456254882731, 0.00506835176514, 0.00556727188032, 0.00604801968309, 0.00649767185926, 0.00690583656437, 0.00725977532605, 0.00754758883539, 0.00775380493596, 0.00786706496354, 0.00787591929892, 0.00777760337144, 0.00757054254782, 0.00726154661542, 0.00685625739552, 0.00636495030494, 0.00580005133705, 0.00517629459866, 0.00451071224441, 0.00382452333013, 0.00313697713328, 0.00247141066386, 0.00184711720303, 0.00128808066868, 0.000812575381552, 0.000436550378989, 0.000173348294329, 2.73253250975e-5, 1.82538537761e-20, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.58391461091e-20, 0.0, 0.0, 6.34473049936e-8, 7.82280219055e-8, 2.27227947472e-20, 1.13518481073e-20, 3.32422836006e-7, 3.19746063258e-7, 4.20048425851e-7, 4.92256952386e-7, 5.25267650336e-7, 7.56897833923e-7, 3.26520965927e-7, 3.07709840257e-8, 2.94720740877e-7, 1.84154202342e-7, 3.12041358615e-7, 4.48603512631e-7, 2.32232115726e-7, 4.33291170677e-7 ] }, spectrum_data_point_t { xystar: [0.0, 0.16945447237045844], uv: [6.0, 7.0], spectrum: [ 0.000817431207442, 0.000817701931495, 0.000817489702638, 0.000818393403807, 0.000820701557474, 0.000824733596875, 0.000832335086187, 0.000845363905191, 0.000868053702417, 0.000911100880877, 0.000985532765366, 0.00110164594974, 0.00126422658346, 0.00147631479187, 0.00173797993504, 0.00204557368986, 0.00239770310187, 0.00278857025075, 0.00320943461199, 0.0036503447432, 0.00410277460106, 0.00455777715179, 0.00500636355515, 0.00543628551199, 0.00583952786326, 0.00620758682913, 0.00652988348664, 0.00679559185874, 0.0069924099607, 0.00711142479481, 0.00714799719819, 0.00710091361259, 0.00697079790649, 0.00676151798533, 0.00647623143203, 0.00612373310143, 0.00571115083682, 0.00525013977948, 0.00474941350686, 0.00422451895564, 0.00368868061711, 0.00315585374832, 0.0026409925672, 0.00215382392821, 0.00170677194807, 0.0013077526039, 0.000964731647765, 0.000677709106011, 0.000447782874199, 0.000271393366789, 0.000145943560148, 6.23864492186e-5, 1.50541172303e-5, 9.49633637992e-21, 0.0, 0.0, 0.0, 4.43760612514e-20, 5.09081419119e-20, 0.0, 0.0, 3.70128308284e-20, 3.23762984869e-20, 1.23283242811e-20, 0.0, 4.05851737477e-8, 5.75398975948e-7, 2.51598044213e-7, 3.27723957156e-7, 4.04111272838e-7, 3.44466201599e-7, 3.74078735681e-7, 4.98015323176e-7, 7.45340069726e-7, 1.07096958757e-6, 1.26980426947e-6, 1.35816214948e-6, 1.7764146569e-6, 2.32577381875e-6, 2.21033579737e-6, 2.57002465945e-6 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, 0.16945447237045844], uv: [6.999999999999999, 7.0], spectrum: [ 0.000123470784956, 0.000125795322865, 0.000124841881045, 0.00012464217155, 0.000125497661553, 0.000130410215895, 0.000138568671191, 0.000152379097111, 0.00017805118245, 0.000221104619245, 0.000296551039953, 0.000411434392809, 0.000575274436747, 0.0007864524321, 0.0010486048463, 0.00135447234652, 0.00170610450676, 0.00209909944064, 0.00252181591418, 0.00297131083764, 0.00343038831909, 0.00389435188675, 0.00435144401306, 0.0047956959147, 0.0052182378245, 0.00561180604206, 0.00596698198893, 0.00627046410867, 0.00651346100632, 0.0066913165508, 0.00679552467609, 0.00682935070607, 0.00678889563497, 0.00667327642512, 0.0064899027481, 0.00624256014001, 0.00594111004332, 0.00558938791173, 0.00519893120257, 0.00478257801236, 0.00434609774803, 0.00390645764436, 0.00347370093354, 0.00305683260711, 0.0026673651643, 0.00231140233792, 0.00199351090092, 0.00171588983599, 0.00148333655333, 0.00128537365315, 0.00112682509748, 0.000997968433538, 0.000896017214386, 0.000817180100542, 0.000756407372833, 0.000709098674681, 0.000675048876521, 0.000649098503623, 0.000627867738875, 0.00061305216602, 0.000603226830062, 0.00059422761148, 0.000587716867816, 0.000583695810775, 0.00058247439678, 0.000580864504859, 0.000579218126224, 0.000578621039087, 0.0005792580081, 0.00057968991984, 0.000580490922012, 0.000581668119013, 0.000581669918877, 0.00058416354397, 0.000586748817985, 0.000586771860098, 0.000588154413673, 0.000589072991631, 0.000590133761552, 0.000590204912664, 0.000590050022171 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, 0.16945447237045844], uv: [8.0, 7.0], spectrum: [ 1.17780477003e-7, 4.30972465934e-8, 2.06847476991e-8, 5.12658028331e-8, 8.51983875354e-8, 0.0, 0.0, 0.0, 2.78620628933e-20, 4.32669317324e-20, 6.52961307177e-20, 2.6178249261e-20, 9.32141316482e-6, 8.97942738923e-5, 0.000246058816506, 0.000476471830472, 0.000773480339697, 0.00113694390684, 0.00155629872122, 0.00201696700795, 0.0025066446994, 0.00300971545155, 0.00351736074581, 0.00402008837596, 0.00450515506443, 0.00496755979101, 0.0053943725039, 0.00577318126165, 0.00609607379467, 0.00635477421165, 0.00654363933453, 0.00666046774664, 0.00670647248332, 0.00667915397174, 0.00658368568603, 0.0064245287692, 0.00620749962606, 0.00594117425656, 0.00563362993809, 0.00529437697032, 0.00493440933484, 0.00456394596578, 0.00419526265977, 0.00383744308036, 0.00349821075282, 0.00318602652359, 0.00290672764276, 0.00266246430095, 0.00245405382357, 0.00227894953773, 0.00213735221361, 0.00202320582689, 0.00193234227451, 0.0018641914668, 0.0018120293016, 0.00177227778131, 0.00174323366202, 0.00172109690904, 0.00170580065178, 0.00169409496648, 0.00168572357589, 0.00168044025397, 0.00167690364494, 0.00167499898635, 0.00167283135787, 0.0016712557074, 0.00167073597055, 0.00166995119061, 0.00166883069575, 0.00166790842941, 0.00166776530537, 0.00166728594735, 0.00166702413312, 0.0016671533362, 0.00166670217763, 0.0016671916947, 0.00166730764897, 0.00166727637584, 0.00166755352906, 0.00166731484089, 0.00166739542715 ] }, spectrum_data_point_t { xystar: [0.1638359986175532, 0.16945447237045844], uv: [9.0, 7.0], spectrum: [ 0.0, 0.0, 4.29651284701e-20, 0.0, 0.0, 0.0, 0.0, 1.45247848932e-19, 0.0, 0.0, 8.70021509786e-20, 1.60702609378e-19, 0.0, 2.17581417559e-19, 3.7981715774e-20, 0.0, 4.50866365081e-19, 0.0, 1.88826734862e-20, 6.4352110369e-5, 0.000353785894203, 0.000810838603668, 0.00138456298171, 0.00203504198293, 0.00272791763533, 0.00343433633662, 0.00412857431135, 0.00478732075364, 0.00538972825105, 0.0059165593689, 0.00635429982966, 0.00669688565158, 0.00694041990745, 0.00708387764299, 0.00713051824326, 0.00708438293872, 0.00695393765734, 0.00674777154317, 0.00647633909568, 0.00615357372261, 0.00579269504551, 0.00540824455041, 0.00501478357961, 0.00462527057032, 0.00425198091749, 0.00390361181486, 0.0035883880797, 0.00331033905461, 0.00307054305261, 0.00286938946847, 0.00270509423268, 0.00257294376162, 0.00246786339579, 0.0023869542821, 0.00232506237735, 0.0022793413613, 0.00224560509447, 0.00222034241994, 0.0022028985343, 0.00218988577368, 0.00218081398682, 0.00217426546123, 0.00216992294849, 0.00216705364262, 0.00216444825874, 0.00216246507797, 0.00216111254753, 0.00215986516774, 0.00215951878429, 0.00215901137028, 0.00215863926745, 0.00215841604998, 0.00215801444528, 0.00215837915499, 0.00215855489475, 0.00215860019113, 0.00215857137368, 0.00215855050682, 0.00215849173016, 0.00215850957937, 0.00215842200504 ] }, spectrum_data_point_t { xystar: [-0.2184479981567377, 0.22593929649394454], uv: [1.9999999999999991, 8.0], spectrum: [ 0.0, 0.0, 0.0, 0.0, 7.56462927966e-18, 4.4197680874e-18, 0.0, 0.0, 3.38215562424e-18, 0.0, 0.0, 1.52668283426e-17, 1.69321187674e-17, 0.0, 1.3666063215e-18, 0.0, 1.54936459218e-17, 4.37354254198e-18, 0.000509586877105, 0.00789037250479, 0.0184608381156, 0.0292084626302, 0.0378245912223, 0.0428910195784, 0.0435345681236, 0.0394004640909, 0.0307300456435, 0.0189395915214, 0.00707923296529, 7.94242154775e-17, 0.0, 1.59737460554e-16, 1.62437176154e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 5.50004537727e-17, 0.0, 4.46463919619e-17, 0.0, 0.0, 1.40523725316e-16, 1.90882266375e-16, 0.0, 1.3892505383e-16, 0.0, 2.92978030348e-17, 1.49594699025e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.99301249534e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.45344071248e-18, 5.06908663547e-18, 8.15141519915e-19, 2.93252662558e-19, 0.0, 9.64334535637e-19, 0.0, 2.17742806627e-18, 4.97533478236e-18, 5.07921139064e-18, 2.12467440537e-18, 4.54252930488e-19, 7.81374479164e-18, 1.02859849585e-17, 1.24055491983e-17, 1.92537506713e-17, 1.71398989735e-17, 2.40413233157e-17 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, 0.22593929649394454], uv: [3.0, 8.0], spectrum: [ 0.0, 0.0, 1.46142178274e-18, 5.43425955348e-19, 5.99280560586e-19, 2.27730061452e-18, 0.0, 3.44746124243e-19, 7.97171769262e-19, 0.0, 9.58958877852e-19, 0.0, 5.9392790888e-19, 0.0, 0.000524416374598, 0.00166387920113, 0.00332545007305, 0.00538702058481, 0.00770385415052, 0.0101077751071, 0.0124414410895, 0.0145680700899, 0.0163735136852, 0.0177658336642, 0.0186595381864, 0.018973705745, 0.0186292357661, 0.0175795802956, 0.0158336103919, 0.013476980118, 0.0106820988557, 0.00768986886325, 0.00478207355017, 0.0022812953904, 0.000552385559844, 0.0, 0.0, 0.0, 3.56778726115e-18, 2.18845101785e-19, 8.27745488259e-19, 6.29225575521e-20, 0.0, 1.18246360023e-18, 0.0, 5.77384841248e-18, 7.65251353963e-18, 0.0, 0.0, 0.0, 6.15483568748e-19, 0.0, 0.0, 3.84967027766e-19, 5.64791080255e-20, 0.0, 0.0, 8.47627713942e-19, 5.86819219654e-19, 7.59324383674e-19, 5.10483278518e-19, 9.25482652137e-20, 8.02411063435e-19, 8.08437795217e-19, 1.38463195432e-18, 9.15995169758e-19, 1.87736083037e-18, 2.26585366544e-19, 0.0, 0.0, 1.46626293557e-18, 1.96030846926e-19, 2.97185314575e-19, 9.0844283593e-20, 9.64452889567e-19, 1.38384007758e-18, 9.02090088826e-19, 1.41115689013e-18, 1.7658432489e-7, 2.37042170289e-18, 7.43368528019e-8 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, 0.22593929649394454], uv: [3.9999999999999996, 8.0], spectrum: [ 2.92540044307e-19, 1.82277245419e-7, 0.0, 3.26901989366e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.85714991694e-5, 0.0002827584854, 0.0006597045278, 0.00120372025123, 0.00190804536803, 0.00275566970226, 0.00372480594099, 0.00478791485685, 0.00591177430212, 0.00705420182253, 0.00817297709187, 0.00923025811061, 0.0101940296102, 0.0110345355522, 0.0117211235176, 0.0122205037945, 0.0124952011026, 0.0125144053664, 0.0122530998602, 0.0117039094885, 0.0108808075687, 0.00981453587461, 0.00854924678279, 0.00713928314459, 0.00565027768456, 0.00415979066991, 0.00275512920101, 0.00153211324164, 0.0005930245744, 4.55396567845e-5, 5.71045304426e-20, 0.0, 1.36505005611e-19, 0.0, 1.72209004881e-19, 6.10266414079e-20, 6.94017844189e-19, 0.0, 2.67765376456e-19, 1.33670610948e-19, 0.0, 3.47574921219e-19, 4.96620483579e-20, 1.37994522527e-19, 5.41780634636e-19, 2.6637211968e-19, 0.0, 0.0, 1.29016747737e-19, 1.5113599984e-19, 4.01665153867e-19, 1.78348438348e-19, 2.16946019026e-19, 2.70277890388e-19, 2.01884624346e-19, 1.93141133839e-20, 0.0, 2.49124134832e-19, 0.0, 0.0, 5.4039744943e-7, 2.95648672441e-7, 0.0, 4.25358339875e-7, 3.81835189631e-7, 4.2767387722e-7, 4.1641820813e-7, 1.64692885726e-7, 2.47245726962e-7, 1.73016942183e-7, 1.89414024977e-7 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.22593929649394454], uv: [5.0, 8.0], spectrum: [ 1.57971644663e-19, 4.32833836047e-19, 6.62665532281e-7, 2.60039114807e-19, 1.17204908541e-6, 6.70846769028e-6, 1.54953175903e-5, 3.88644742553e-5, 8.52533294443e-5, 0.000168261847351, 0.000316868727693, 0.000537517589908, 0.000847936530438, 0.00125249198377, 0.00174572761575, 0.00232029601632, 0.00297233070499, 0.00367966930581, 0.00443013015852, 0.00521043136583, 0.00598503437016, 0.00674263382228, 0.00746762900978, 0.00813394580271, 0.00872816241882, 0.00923172752883, 0.00962213514035, 0.00987998925188, 0.00997597519707, 0.0099089475088, 0.00967148628256, 0.00926732537248, 0.0087041251558, 0.00800144191385, 0.0071809988305, 0.00626870037961, 0.00529318556188, 0.00429642334327, 0.00330714703195, 0.0023718347551, 0.0015422154332, 0.000853006625022, 0.00033838584431, 4.53334709259e-5, 0.0, 0.0, 1.04492363518e-19, 3.28855402727e-19, 0.0, 0.0, 4.63798358987e-20, 0.0, 3.97323363439e-20, 2.90325801671e-19, 3.95149936606e-20, 0.0, 0.0, 2.93643160178e-19, 1.58026893759e-19, 2.63497306809e-19, 4.88643757594e-19, 4.00524800711e-19, 3.1208486352e-19, 0.0, 6.9945730853e-19, 5.19050215671e-8, 1.13078898458e-18, 1.36457007803e-18, 3.14882675709e-7, 6.92872950854e-19, 1.18584612616e-18, 1.12239079082e-6, 6.46467213784e-7, 6.74139450422e-7, 9.13799582086e-7, 1.62291512694e-18, 1.23968986092e-6, 1.62628826088e-6, 1.6362240113e-6, 1.3526102775e-6, 1.54244699695e-18 ] }, spectrum_data_point_t { xystar: [0.0, 0.22593929649394454], uv: [6.0, 8.0], spectrum: [ 2.0174225742e-7, 2.10170050037e-19, 0.0, 0.0, 0.0, 0.0, 1.01345040333e-19, 0.0, 1.04855463874e-5, 4.75432124484e-5, 0.000133854793248, 0.000284729339352, 0.00050835374287, 0.000811565295193, 0.00119126405086, 0.00164120829995, 0.00215448081606, 0.00272677187185, 0.00334556613741, 0.00399234227173, 0.00465280313812, 0.00531299122071, 0.00595516127301, 0.00656735544283, 0.00713569512836, 0.00764767442951, 0.00808646741561, 0.00843093852623, 0.00866849036413, 0.00878891817632, 0.00878385210506, 0.00865010843429, 0.0083936771503, 0.00802185615773, 0.00754307903531, 0.00696764185712, 0.006315594587, 0.00560298700222, 0.00485206981614, 0.00408594963247, 0.00332646750341, 0.0026014567884, 0.00193277899591, 0.00133911907324, 0.000841454425851, 0.000453472615449, 0.000183134835826, 3.36503715519e-5, 1.27111135889e-19, 3.36453542162e-19, 2.12407130248e-19, 1.25702482569e-19, 1.63268240341e-19, 2.52425420786e-19, 0.0, 0.0, 0.0, 2.46046557496e-19, 0.0, 1.80364384735e-19, 3.61355478585e-20, 5.18457890325e-20, 0.0, 1.77570716277e-19, 2.01461492549e-19, 1.15514118182e-19, 2.05776066624e-19, 1.50983622848e-19, 4.25475237318e-19, 1.63821465955e-19, 2.69568235464e-19, 2.03261437561e-19, 5.12534342428e-19, 2.11042695934e-7, 5.61726396997e-7, 8.89593672483e-7, 6.75405968361e-7, 2.06071201368e-7, 1.49289556954e-19, 3.56489734831e-7, 2.59927364839e-7 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, 0.22593929649394454], uv: [6.999999999999999, 8.0], spectrum: [ 0.0, 5.83091007189e-8, 5.69914544676e-8, 8.7235589821e-20, 0.0, 0.0, 4.23357394871e-20, 0.0, 1.00537321473e-19, 5.02892080112e-20, 0.0, 0.0, 6.16443087267e-5, 0.000214315452984, 0.000460525268129, 0.000795713167534, 0.00121389026471, 0.00170817467884, 0.00226707644361, 0.00287285096673, 0.00350849467369, 0.00415757932591, 0.00480395283437, 0.00543400231228, 0.00603566234513, 0.00659412814279, 0.00709425696147, 0.00752205285692, 0.00786211724197, 0.00810186530231, 0.00823547306457, 0.00826013736684, 0.00817483811063, 0.00798327906626, 0.00769162757206, 0.00730792982269, 0.00684335211094, 0.0063116930062, 0.00572686975508, 0.00510494512726, 0.00446473261873, 0.00382472528017, 0.00320113821107, 0.00261164259528, 0.00206926822009, 0.00158422944231, 0.00116527315423, 0.000816420471355, 0.000536374474073, 0.000322696989904, 0.000169202964233, 6.89552234426e-5, 1.5061518083e-5, 0.0, 0.0, 1.23870075954e-20, 0.0, 0.0, 1.11455074081e-21, 0.0, 0.0, 0.0, 0.0, 0.0, 1.80740200243e-7, 2.22954811986e-7, 4.5923834441e-7, 3.3021904364e-7, 2.30808678761e-7, 1.47242438181e-19, 2.47411409963e-7, 2.52651567253e-7, 1.42392710292e-7, 3.39141587398e-7, 4.30851077412e-7, 5.42002570397e-7, 6.52034766829e-7, 6.94074271936e-7, 7.96149183052e-7, 8.92049300998e-7, 8.77709473785e-7 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, 0.22593929649394454], uv: [8.0, 8.0], spectrum: [ 4.21913394903e-7, 8.79041152544e-20, 0.0, 0.0, 2.4144528837e-20, 4.97948677704e-20, 1.19987056653e-19, 4.78983607297e-20, 5.63441270706e-20, 7.87222405715e-21, 1.17523488322e-19, 3.83649875941e-20, 0.0, 1.02536512303e-19, 0.0, 6.69712522937e-20, 8.42538462995e-5, 0.000344006772946, 0.000760732391116, 0.00130100742756, 0.00193265668681, 0.00262566420455, 0.00335169917482, 0.0040886612954, 0.00481602344963, 0.00551399884053, 0.00616495549284, 0.00674894610307, 0.00724776951998, 0.00764671494755, 0.00793786197634, 0.00811648666365, 0.00818042435392, 0.00813045928736, 0.00797198851748, 0.00771301144021, 0.00736247007926, 0.00693203695087, 0.00643612729762, 0.00589079426802, 0.00531276681393, 0.00471939405306, 0.00412776589215, 0.00355370296618, 0.00301131856906, 0.00251236590789, 0.00206468802983, 0.00167231616182, 0.00133673201072, 0.00105621366663, 0.000826819959571, 0.000642489299627, 0.000496990482907, 0.000384843300765, 0.000300220947743, 0.000237891283879, 0.000192459475052, 0.000159783145323, 0.000136303331131, 0.000119535743113, 0.000107922024361, 9.955889446e-5, 9.33646234974e-5, 8.84645387886e-5, 8.4933966917e-5, 8.23834535006e-5, 8.04261181935e-5, 7.88317554134e-5, 7.76549578168e-5, 7.68614403582e-5, 7.6554756699e-5, 7.61124919678e-5, 7.56917457626e-5, 7.54689339133e-5, 7.51054863267e-5, 7.51715335682e-5, 7.48603764359e-5, 7.46748410058e-5, 7.46553682777e-5, 7.45513109309e-5, 7.46236061547e-5 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, 0.28242412061743066], uv: [3.0, 9.0], spectrum: [ 0.0, 5.40638980202e-18, 3.79097030517e-18, 0.0, 0.0, 3.65588574062e-18, 2.3450752937e-18, 0.0, 5.42328368498e-19, 6.10413390233e-19, 0.0, 1.15231008677e-17, 0.0, 0.0, 0.0, 1.5401123701e-18, 1.13526070435e-18, 0.0018606310292, 0.00512513077078, 0.00922286536706, 0.0136229039882, 0.0178599480328, 0.0215558946223, 0.0244275897182, 0.0262363240179, 0.0267812216293, 0.0258902242939, 0.0235101219185, 0.0197662916631, 0.0150087208629, 0.00982081324337, 0.00498247433139, 0.00137654737518, 0.0, 0.0, 2.99706351585e-18, 2.03187410024e-17, 0.0, 0.0, 1.08794156507e-17, 0.0, 0.0, 0.0, 0.0, 6.418695001e-18, 6.03369843634e-18, 0.0, 1.71562159006e-17, 3.67661954042e-18, 5.83616717755e-19, 0.0, 0.0, 8.30479377815e-18, 0.0, 4.13420703492e-18, 0.0, 1.75549242947e-18, 0.0, 1.53168382422e-18, 1.90830344867e-18, 8.09184631019e-19, 1.39554076469e-18, 3.50007817028e-18, 1.24540691789e-18, 1.44565913256e-18, 1.06289088685e-18, 0.0, 6.22511144003e-20, 2.43432973759e-18, 9.71706264603e-20, 0.0, 4.036897289e-18, 4.84159427198e-18, 4.66578111812e-18, 2.4261294153e-18, 5.62126981846e-18, 5.24272312429e-18, 1.16833724037e-18, 3.62953617898e-18, 3.37182640478e-18, 5.08072347351e-18 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, 0.28242412061743066], uv: [3.9999999999999996, 9.0], spectrum: [ 3.00730998403e-19, 3.56316982458e-19, 0.0, 0.0, 6.2306507841e-19, 3.03152447431e-20, 1.01060290001e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 4.13327465058e-19, 1.72716093828e-18, 0.000346748749437, 0.00113167041717, 0.00230652058811, 0.00380395453246, 0.00553762644701, 0.00740094236316, 0.00928913530358, 0.011108095069, 0.012774127102, 0.0142208738771, 0.0153818611128, 0.0161921692042, 0.0165770370065, 0.0164806687389, 0.0158702788937, 0.0147497987897, 0.0131732037987, 0.0112318399265, 0.00903955455708, 0.00673395619958, 0.00448018982043, 0.00246596200363, 0.000897292801075, 0.0, 1.53257526022e-19, 9.43386752759e-19, 0.0, 7.42309769397e-20, 1.15394705913e-18, 1.24826575038e-18, 7.46302667942e-19, 1.95379559107e-18, 0.0, 0.0, 4.4543038961e-19, 0.0, 0.0, 0.0, 3.39128315882e-19, 4.75979961655e-19, 8.02652414021e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.04751369663e-7, 0.0, 0.0, 1.98870157e-8, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.28242412061743066], uv: [5.0, 9.0], spectrum: [ 7.57292035957e-20, 7.52732853788e-19, 7.97589038632e-19, 6.46994361399e-19, 1.25684377956e-19, 0.0, 0.0, 0.0, 0.0, 3.02751471778e-19, 3.43912812892e-19, 3.959604922e-19, 1.07197340187e-5, 0.000241266822017, 0.000687017135726, 0.00133431730834, 0.00216544913264, 0.00315329058162, 0.00426148328263, 0.00544253416929, 0.00665093925688, 0.00784258176773, 0.00897972796072, 0.0100272998072, 0.0109495752545, 0.0117130871756, 0.0122774734626, 0.0126064672917, 0.0126689409387, 0.0124483462418, 0.011947142067, 0.0111854112849, 0.0101872768478, 0.00899557179493, 0.00765465714475, 0.00622610003527, 0.00477475247047, 0.00337709904641, 0.00211562615352, 0.00107271225829, 0.000338602579869, 0.0, 0.0, 9.12999645599e-19, 0.0, 0.0, 0.0, 0.0, 1.38891275596e-19, 1.62481575619e-19, 3.41771366047e-19, 2.57024136795e-19, 2.50369411189e-19, 0.0, 5.55890333807e-19, 0.0, 0.0, 9.96045949746e-20, 0.0, 0.0, 0.0, 0.0, 0.0, 1.07380144796e-19, 8.17901585076e-20, 1.57700536083e-19, 1.78249812563e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 4.92974990947e-8, 1.97811105507e-8, 1.43130866538e-7, 2.02299362634e-7, 3.32008864541e-7, 3.67843259317e-7, 1.94264526291e-7, 2.73354161192e-7, 3.44352074641e-7 ] }, spectrum_data_point_t { xystar: [0.0, 0.28242412061743066], uv: [6.0, 9.0], spectrum: [ 6.61802184708e-7, 5.04394836815e-7, 1.97825146718e-7, 2.04709059976e-19, 0.0, 1.31747845215e-19, 5.84153580382e-20, 2.63684222702e-20, 0.0, 0.0, 1.66740417461e-19, 0.0, 6.24380370148e-20, 9.72825240113e-5, 0.000368960775949, 0.000804378840019, 0.00139467084639, 0.00212189887813, 0.00296314078482, 0.00388408305091, 0.00485081788101, 0.00582947634265, 0.00679183106046, 0.00771297677575, 0.00856579473681, 0.00932556115362, 0.00996306836228, 0.0104491902937, 0.010761027937, 0.010877430418, 0.0107947060676, 0.0105144387864, 0.0100441697627, 0.00940098717996, 0.00860399784966, 0.00768053586801, 0.00666266070611, 0.00558732781591, 0.00449459632889, 0.00342712866052, 0.00243157161341, 0.00155327329938, 0.000835892703292, 0.000318100346174, 3.21223634966e-5, 0.0, 1.12025785602e-19, 3.11973652159e-19, 3.70677934067e-21, 0.0, 0.0, 0.0, 0.0, 0.0, 1.92853228667e-20, 0.0, 1.52285321399e-19, 1.13246756002e-19, 4.93733266858e-8, 2.9996040988e-8, 1.00945172233e-8, 4.48220966647e-19, 1.1994679198e-7, 3.43658449481e-7, 6.19571013753e-7, 5.21767412854e-7, 7.19963942128e-7, 5.58733038417e-7, 7.76789618379e-7, 1.08680622914e-6, 1.1854628502e-6, 8.62655066776e-7, 9.13978055399e-7, 1.24120563238e-6, 1.0036158403e-6, 7.25423478913e-7, 8.21699323118e-7, 6.02373072106e-7, 4.3804428522e-7, 5.13608489352e-7, 2.70489580131e-7 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, 0.28242412061743066], uv: [6.999999999999999, 9.0], spectrum: [ 0.0, 1.92083412172e-7, 1.16904795978e-19, 0.0, 0.0, 1.86548263929e-19, 0.0, 1.10840212376e-19, 0.0, 4.34548951496e-20, 1.21355802834e-19, 1.63899055637e-20, 0.0, 0.0, 9.86781430993e-20, 8.17420396487e-5, 0.000375187486363, 0.000861530992309, 0.00151436064773, 0.00229570571201, 0.003167027381, 0.00408992367622, 0.00503341585342, 0.00596603994654, 0.006862672521, 0.00769753742515, 0.00844292109482, 0.00907278018588, 0.00956264619838, 0.00989276776823, 0.0100549896741, 0.0100443006402, 0.0098623185847, 0.00951801126762, 0.00902368250213, 0.00839529809601, 0.0076528301214, 0.00682085434301, 0.00592686236388, 0.0050015328825, 0.00407719705132, 0.00318600033, 0.00235978948548, 0.00162605166628, 0.00101111191809, 0.000533865495508, 0.000204017858382, 2.64017136096e-5, 0.0, 3.55357225353e-20, 0.0, 1.74393975263e-19, 6.13011692302e-20, 0.0, 1.13297607006e-19, 1.56171251367e-19, 3.76401262564e-19, 0.0, 1.47133706754e-19, 2.98408802344e-19, 1.47477843245e-19, 2.62978663448e-19, 5.37678322758e-19, 3.5757798749e-19, 3.64146290475e-19, 2.10774353314e-8, 5.29199431901e-19, 3.30887055813e-19, 4.50749083595e-19, 1.20279392449e-7, 4.09135916891e-19, 1.77867097494e-7, 4.46630189094e-7, 2.06868628067e-7, 3.01304981596e-7, 5.63581992211e-7, 6.13185061189e-7, 6.1752419189e-7, 7.90241956453e-7, 8.5779437675e-7, 1.07451267222e-6 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, 0.28242412061743066], uv: [8.0, 9.0], spectrum: [ 2.31373773206e-19, 2.66034702223e-20, 1.23690456243e-20, 6.12492627809e-20, 8.50070507806e-20, 1.13277060005e-19, 4.43637521591e-19, 0.0, 1.26152539765e-18, 2.27943504313e-19, 0.0, 4.7545973389e-19, 1.05018533903e-20, 0.0, 0.0, 4.63799339497e-20, 4.46258545057e-19, 1.58757139277e-19, 0.0, 6.28210262341e-6, 0.000435425900031, 0.00117048473427, 0.00211522586906, 0.00318936658476, 0.00432978507354, 0.00548081971868, 0.00659071361738, 0.0076104493537, 0.00849686555039, 0.00921423312209, 0.00974130214451, 0.0100659830518, 0.0101866339112, 0.0101072343857, 0.00983383232542, 0.00938257076723, 0.00877472861586, 0.00803644177781, 0.00719442024366, 0.00628093862922, 0.00533077602033, 0.00438267327784, 0.00346954276415, 0.0026200001667, 0.00186498119347, 0.00122502048207, 0.000714338096734, 0.000339775721961, 0.000103327523389, 0.0, 6.74941725571e-20, 8.11994368614e-20, 1.18480520166e-19, 0.0, 0.0, 0.0, 0.0, 1.058220135e-19, 0.0, 3.49256066233e-20, 0.0, 2.16949958168e-20, 1.84696076612e-20, 6.52788491424e-20, 0.0, 3.32376845878e-7, 4.02241202854e-20, 3.14300694718e-7, 4.18608498743e-7, 0.0, 5.61781809452e-7, 1.97118008289e-7, 0.0, 1.07065410249e-6, 1.10072072249e-6, 2.34758903268e-7, 5.93297878948e-7, 6.46293368442e-7, 7.103818921e-7, 9.49057756177e-7, 1.08387246588e-6 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, 0.33890894474091676], uv: [3.0, 10.0], spectrum: [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 8.10183188095e-19, 0.0, 6.22878967624e-18, 0.0, 2.00214405627e-17, 2.45445828631e-17, 3.10288828689e-18, 0.0, 0.0, 0.0, 1.12193710768e-17, 1.31700199555e-18, 5.77682426923e-18, 0.00262253007048, 0.00941019242549, 0.0180367507612, 0.0266018315085, 0.0337382268519, 0.0384038300368, 0.0398322782868, 0.037513974516, 0.0314746549639, 0.0225172017541, 0.0123904818394, 0.00375536797553, 1.0115913883e-17, 0.0, 0.0, 0.0, 0.0, 3.17397014961e-17, 1.86758059803e-17, 7.82615951541e-18, 6.85444090872e-17, 1.31489674273e-17, 1.21334795842e-17, 0.0, 3.85456080126e-17, 1.0974458023e-16, 8.25675454905e-19, 0.0, 0.0, 0.0, 4.2195969464e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.02181226917e-18, 2.73609295482e-18, 0.0, 3.75341702877e-19, 2.36618906657e-18, 1.13537378421e-17, 4.34387619627e-18, 4.47297747457e-18, 4.60108792392e-18, 8.59598487671e-18, 8.2335530463e-18, 1.04012657485e-18, 1.8120935944e-18, 3.89843803535e-18, 1.01677589344e-17, 5.61735790949e-18, 2.39972500764e-18, 4.23796082009e-18, 5.84601175326e-18, 2.30392644615e-18, 8.37371893909e-18, 8.46429436279e-18 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, 0.33890894474091676], uv: [3.9999999999999996, 10.0], spectrum: [ 0.0, 0.0, 3.64421863289e-19, 1.5768013001e-18, 0.0, 3.89771418036e-19, 3.82470574833e-19, 0.0, 0.0, 0.0, 2.39068910148e-18, 4.65822589427e-19, 0.0, 2.56490204354e-18, 0.0, 7.55391667828e-19, 7.92993153796e-5, 0.00132833222928, 0.0035085800684, 0.00630580197011, 0.00942252857371, 0.012587067184, 0.01557084108, 0.0181871202621, 0.0202729729598, 0.0216735231307, 0.0222404122576, 0.0218654759367, 0.0205106620591, 0.0182370048605, 0.0152160051788, 0.0117092907724, 0.00803489253651, 0.00457015046398, 0.00174641090244, 4.72299288342e-5, 2.07049116066e-18, 0.0, 0.0, 0.0, 4.66152984291e-18, 0.0, 0.0, 2.11326176984e-18, 6.71206928174e-18, 2.50974857456e-18, 6.53738361899e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 7.07448841641e-19, 2.37207416489e-18, 5.79605911622e-19, 0.0, 9.34505169046e-19, 3.1597856761e-19, 6.18681265312e-19, 1.03311744307e-18, 1.45725593136e-18, 2.8405812309e-18, 2.33566914545e-18, 1.0075931809e-18, 1.61488308474e-18, 1.52449599038e-18, 8.97894975302e-19, 6.22891202293e-19, 2.05299908473e-18, 1.96048615229e-18, 2.25425598364e-18, 1.80905466007e-18, 2.80883021965e-18, 1.83996731967e-18, 2.8576774058e-18, 3.25775231221e-18, 2.41997313031e-18, 2.39456214189e-18, 2.69880913684e-18, 1.88676589001e-18 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.33890894474091676], uv: [5.0, 10.0], spectrum: [ 8.54200800672e-19, 4.7405807764e-19, 6.58905854975e-19, 0.0, 9.95394892463e-19, 4.92281795371e-19, 0.0, 4.94243113564e-19, 5.22311249785e-20, 0.0, 0.0, 0.0, 1.7501375963e-18, 1.69532453474e-18, 0.0, 6.19277927485e-5, 0.00066087425909, 0.00172476096042, 0.00316799709797, 0.00487646531872, 0.00673155423252, 0.00862954715367, 0.0104715574683, 0.0121798537796, 0.0136801805622, 0.0149013133731, 0.0157669380774, 0.0162094774248, 0.0161771545314, 0.0156531846534, 0.0146597088809, 0.0132480749759, 0.0114937718101, 0.00949413315908, 0.007359969543, 0.00522641183257, 0.00325034789156, 0.00159794878128, 0.000452717804744, 4.23039648486e-19, 0.0, 0.0, 2.67559407185e-19, 1.55215689656e-20, 0.0, 1.43727943682e-18, 1.34648832452e-18, 5.42156233234e-19, 0.0, 1.32815360831e-19, 0.0, 0.0, 1.4052557702e-18, 0.0, 0.0, 0.0, 3.38122472378e-20, 0.0, 0.0, 5.35569612127e-19, 5.5714886613e-19, 3.50950846698e-19, 0.0, 6.73844693076e-19, 7.93191941813e-19, 2.3683129416e-19, 0.0, 1.30253994965e-19, 0.0, 7.09834254458e-19, 1.27222481653e-18, 0.0, 0.0, 0.0, 5.27860344817e-19, 0.0, 5.44789528737e-8, 6.7455586337e-19, 4.940525233e-7, 5.61291881634e-8, 2.24420297752e-7 ] }, spectrum_data_point_t { xystar: [0.0, 0.33890894474091676], uv: [6.0, 10.0], spectrum: [ 7.07092679493e-19, 7.45260839054e-19, 5.07916211955e-19, 1.39767069705e-20, 2.54565896015e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 1.40225062424e-19, 0.0, 0.0, 8.39781976816e-19, 0.0, 3.12167343192e-19, 0.000270989836599, 0.00092002311246, 0.00189258944265, 0.00311076320993, 0.00448441976452, 0.00593897874236, 0.00740905055683, 0.00883462550218, 0.0101642915605, 0.0113443029013, 0.0123209865309, 0.0130399666995, 0.0134613713304, 0.0135565922827, 0.0133193902438, 0.0127631905995, 0.0119106732058, 0.0108008973017, 0.00947420322866, 0.00799638086706, 0.00643658937707, 0.00486658835213, 0.00337511539639, 0.00204863699656, 0.000985694279395, 0.000275575557673, 0.0, 8.32875048698e-20, 2.92849117256e-20, 7.37719684244e-19, 2.67673588013e-19, 2.68209590434e-20, 0.0, 0.0, 1.00070800105e-18, 2.63275824935e-19, 0.0, 4.10847826905e-19, 3.33986398028e-20, 2.5158626774e-19, 0.0, 8.13896677264e-21, 0.0, 0.0, 6.52929181465e-19, 8.24188394269e-19, 8.80644424712e-19, 4.46952023249e-19, 8.08219235543e-19, 5.02611119771e-19, 4.17928574007e-19, 0.0, 6.68972540215e-19, 6.47444304939e-19, 1.02118189983e-18, 7.32026153592e-7, 1.92406322534e-7, 4.78573615199e-19, 8.74832009928e-7, 2.11466891187e-7, 1.03909766804e-18, 1.84674576273e-7, 2.00002016713e-7, 1.40205128594e-18, 6.82087376686e-7 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, 0.33890894474091676], uv: [6.999999999999999, 10.0], spectrum: [ 0.0, 0.0, 0.0, 4.48229998564e-20, 0.0, 1.46988330187e-19, 0.0, 0.0, 0.0, 7.1793064613e-19, 0.0, 0.0, 4.66323447543e-20, 1.36478489986e-18, 1.15650076291e-18, 2.20644485762e-19, 0.0, 0.0, 0.000241205142551, 0.000928416094249, 0.0019437484852, 0.00318339028338, 0.00455226082949, 0.00597853190677, 0.00738805963278, 0.0087272065947, 0.00993469771355, 0.0109533740172, 0.0117383374258, 0.0122469061049, 0.0124627239684, 0.0123887966016, 0.0120268867795, 0.0113988711276, 0.0105348687458, 0.00947057774119, 0.00824896163386, 0.00692104210966, 0.00555557648967, 0.00420364168517, 0.00293358324211, 0.00182755351608, 0.000925562922255, 0.000304854814874, 1.42593018648e-19, 7.07122753194e-19, 0.0, 0.0, 0.0, 6.41488694753e-19, 9.537859504e-19, 0.0, 0.0, 1.06270404557e-19, 0.0, 8.31690363523e-20, 2.4806442944e-19, 8.67507768151e-19, 2.83242974598e-19, 4.22016079989e-19, 0.0, 5.92740648049e-19, 1.05953974567e-18, 7.73756907064e-19, 1.30019972476e-18, 8.4111405583e-19, 1.27054942088e-18, 1.07942044097e-18, 1.12265072601e-18, 1.83446670137e-18, 7.86308812203e-7, 5.47186382558e-7, 1.54555422535e-18, 1.76983610722e-6, 1.61059921815e-6, 1.06311103203e-18, 1.84378810307e-6, 1.16369049393e-6, 7.7964998179e-9, 1.56342212404e-6, 5.64836426902e-7 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, 0.33890894474091676], uv: [8.0, 10.0], spectrum: [ 4.54795448894e-18, 4.05613172572e-18, 1.76599797167e-17, 5.73050971753e-19, 6.88291149196e-19, 0.0, 0.0, 4.21117137951e-18, 0.0, 0.0, 1.40145252626e-17, 0.0, 4.31357694498e-18, 3.12568417858e-17, 8.42784101866e-19, 4.57534365956e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.59357581974e-17, 0.000966451398451, 0.00303382650674, 0.00565997155596, 0.00836767094471, 0.0108097051031, 0.0127848008516, 0.0141731704053, 0.0149066053916, 0.014966449472, 0.0143798754193, 0.0132145658759, 0.011571953371, 0.00958570395488, 0.00741162879427, 0.00522295681663, 0.00320503350913, 0.00154689356277, 0.000425090444686, 0.0, 7.98683409882e-18, 0.0, 0.0, 1.07509763987e-18, 5.94542792644e-18, 0.0, 1.25345488663e-17, 7.08773566664e-18, 8.4783253258e-18, 1.11143243148e-18, 0.0, 1.2187549346e-18, 6.59186575997e-19, 1.34425633436e-18, 1.33849349353e-18, 1.68850485519e-18, 3.05575695107e-18, 1.84835719544e-18, 1.05964892456e-18, 1.07799228883e-18, 1.65487384637e-18, 1.87819921196e-18, 3.31047481185e-18, 3.53579836876e-18, 3.72556853938e-18, 4.10221488321e-18, 4.38174695662e-18, 3.15753648725e-18, 4.73625792585e-18, 2.69499539836e-18, 3.87491103589e-19, 4.15140920517e-19, 8.92560968169e-20, 1.33337148412e-7, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, 0.395393768864403], uv: [3.0, 11.0], spectrum: [ 1.09257509883e-16, 4.81642433672e-16, 2.86958382618e-16, 0.0, 0.0, 5.08822773798e-18, 1.21906079306e-17, 1.64463469709e-16, 3.32697772125e-17, 0.0, 0.0, 0.0, 2.07274335622e-16, 2.27895275643e-16, 0.0, 0.0, 2.20088402543e-16, 0.0, 0.0, 0.0, 5.9350642001e-17, 3.09535737057e-18, 0.0179615829772, 0.0437873594427, 0.064545914329, 0.0718821518494, 0.0617961871737, 0.0368302305873, 0.00874221859225, 1.68970462155e-16, 9.06189439253e-16, 0.0, 0.0, 0.0, 0.0, 1.05659083048e-15, 0.0, 0.0, 4.02748449369e-16, 0.0, 0.0, 5.26448992742e-16, 0.0, 1.93369511633e-16, 0.0, 9.58855916149e-16, 9.05892281937e-16, 1.82351096149e-16, 5.75174985315e-16, 0.0, 0.0, 1.2784221253e-16, 1.65546091859e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 9.39769974228e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 1.239056335e-17, 6.38299507721e-18, 0.0, 9.16347098997e-19, 1.36179624017e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.02969697325e-17, 1.2554405157e-17 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, 0.395393768864403], uv: [3.9999999999999996, 11.0], spectrum: [ 0.0, 1.11933150362e-18, 0.0, 0.0, 0.0, 0.0, 5.34012333426e-19, 0.0, 0.0, 4.15702695384e-18, 0.0, 1.65258441434e-17, 9.68357512311e-18, 0.0, 0.0, 3.78711436039e-19, 5.47878978392e-18, 0.0, 8.07957272606e-18, 0.00206379606169, 0.00629951649421, 0.0116780401358, 0.0173306927649, 0.0225871556217, 0.0268930441435, 0.0297844249851, 0.0308565857834, 0.0298544594983, 0.0267550283348, 0.0218485937014, 0.0157668525926, 0.00940687834093, 0.00382627658408, 0.000234888614935, 5.44771073058e-18, 0.0, 0.0, 6.37913742661e-18, 1.0243374251e-17, 9.51702909189e-18, 0.0, 2.14720955539e-17, 2.25412999684e-17, 1.11611209012e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 4.90403175879e-18, 0.0, 1.31368340164e-17, 0.0, 2.04055390252e-18, 2.28859272905e-18, 7.43206505809e-18, 0.0, 1.4643908319e-18, 2.5526348031e-18, 1.45279903727e-18, 8.44821047427e-19, 6.89150125706e-19, 0.0, 1.88781055972e-19, 0.0, 2.41226356749e-19, 0.0, 1.00480919216e-18, 1.82633385178e-18, 1.01467373899e-18, 1.44804428099e-18, 3.46128775899e-18, 5.40158581683e-18, 1.72687683335e-18, 3.48223925237e-18, 1.80801333832e-18, 3.32389074202e-18, 8.13522206279e-19, 3.96436392418e-18, 0.0, 3.44766232334e-18 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.395393768864403], uv: [5.0, 11.0], spectrum: [ 2.92092847556e-18, 2.33171391612e-18, 0.0, 0.0, 1.79832861724e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0183779081e-18, 0.0, 3.42014616844e-18, 0.0, 7.22555359434e-19, 0.0, 1.22310081882e-18, 0.0, 0.000814426861543, 0.00269109895638, 0.00527793692024, 0.00825160418219, 0.011333179011, 0.014295573569, 0.0169404659571, 0.019088527838, 0.0205686839214, 0.0212383936378, 0.0210032906842, 0.0198508632315, 0.0178638065047, 0.0152012419632, 0.0120727297687, 0.00873509689335, 0.00549277880905, 0.00269093710335, 0.000717842671042, 0.0, 0.0, 2.80597530456e-18, 5.23127904473e-19, 0.0, 1.49337571699e-18, 0.0, 2.62183688851e-18, 2.17586367255e-18, 0.0, 0.0, 0.0, 1.72297262818e-18, 0.0, 7.90249769121e-19, 4.06358539891e-19, 1.80338595195e-18, 0.0, 1.40978714958e-18, 1.15571286057e-18, 8.52076463783e-20, 0.0, 3.20049836474e-19, 8.52084651253e-19, 3.79104056633e-19, 2.35937427845e-19, 7.57625057054e-19, 1.59516365301e-19, 1.15330432346e-18, 8.88128029202e-19, 6.6370816837e-19, 1.41679355031e-18, 1.76647505334e-18, 1.68873889186e-18, 1.89227452954e-18, 1.88793056031e-18, 1.96010284319e-18, 9.69998385563e-19, 1.51195381085e-19, 2.31932343683e-18, 2.01255028268e-18, 1.47862322356e-7, 1.32772414482e-18, 4.3181739651e-18 ] }, spectrum_data_point_t { xystar: [0.0, 0.395393768864403], uv: [6.0, 11.0], spectrum: [ 1.69417341016e-19, 1.52064615538e-18, 4.58485220328e-19, 3.21420042668e-19, 2.19331256233e-19, 1.46246863133e-19, 1.72702597469e-19, 5.39367386263e-19, 7.6283144781e-20, 0.0, 1.58185682857e-20, 4.07851688047e-19, 2.35256766751e-18, 0.0, 1.21143275761e-18, 1.0371116701e-18, 2.4144155246e-19, 0.0, 0.000134516504783, 0.00115233960685, 0.00280659710099, 0.0048701534114, 0.00714011578665, 0.00945614539795, 0.0116749820078, 0.0136729068322, 0.01532604901, 0.0165228051303, 0.017172667355, 0.0172239058363, 0.0166796489067, 0.0155830060386, 0.0140017171368, 0.0120291144533, 0.00978544796488, 0.00741519990991, 0.0050802544822, 0.00296644078672, 0.00127352744436, 0.000213812923643, 1.7471716129e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 2.31371115364e-19, 6.55545181469e-19, 5.38267060664e-19, 9.50658531625e-19, 0.0, 3.94788360428e-19, 3.12351109861e-19, 0.0, 3.92247940242e-19, 4.80012922916e-20, 8.82313723023e-19, 6.5004371025e-19, 1.54934030612e-19, 0.0, 1.10579060567e-18, 1.52039265105e-19, 8.36876025323e-19, 5.79766221322e-19, 5.11675871171e-19, 4.68514989512e-19, 0.0, 0.0, 9.03198727406e-19, 0.0, 4.97044413327e-19, 9.53388201323e-20, 9.55444185584e-8, 7.21744646467e-19, 1.16801164876e-7, 2.73232259582e-8, 0.0, 1.03202943675e-7, 1.67561990597e-7, 3.23471550501e-7, 0.0 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, 0.395393768864403], uv: [6.999999999999999, 11.0], spectrum: [ 0.0, 3.20212887661e-19, 5.12427074349e-19, 0.0, 0.0, 0.0, 0.0, 1.66280801278e-19, 0.0, 3.87435299857e-18, 0.0, 0.0, 6.31310213024e-18, 0.0, 0.0, 0.0, 0.0, 3.00536596386e-18, 4.51338586286e-18, 0.0, 1.65889016729e-18, 0.00046552066355, 0.00188449268829, 0.00391437036935, 0.00627397159803, 0.00873387446399, 0.0110923196571, 0.0131608389518, 0.0147754701081, 0.015824455953, 0.0162643953515, 0.0160960803895, 0.0153469731751, 0.0140747120851, 0.0123658505069, 0.0103304436406, 0.00810380572284, 0.00584120420266, 0.00371310265504, 0.00190508545341, 0.000605329015392, 2.2400604973e-18, 7.40136092994e-19, 1.43630600416e-18, 1.96042678627e-18, 2.38168975948e-19, 2.35821603619e-18, 0.0, 0.0, 0.0, 6.06544434873e-20, 1.50660900227e-18, 4.27499715313e-19, 0.0, 4.30784291968e-19, 2.16708041448e-18, 6.25424725459e-19, 0.0, 9.42866430381e-19, 1.19176670244e-18, 1.71421688143e-18, 6.94815021938e-19, 1.83927211833e-18, 0.0, 1.48074270026e-18, 1.92254591163e-18, 1.60140499952e-18, 1.61166218776e-18, 1.52379298145e-18, 1.13580084567e-18, 3.90852765599e-19, 2.69189607791e-18, 1.89401860962e-18, 1.42642995296e-18, 6.13809783872e-8, 2.07523072077e-18, 1.72964127829e-18, 1.48442524006e-18, 2.24040214549e-19, 2.47545378835e-18, 2.76250179057e-7 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, 0.45187859298788907], uv: [3.9999999999999996, 12.0], spectrum: [ 5.10322970972e-17, 3.1984680414e-17, 1.91897358802e-17, 0.0, 0.0, 5.52073557066e-19, 2.7450854699e-18, 0.0, 1.04299935282e-17, 0.0, 0.0, 0.0, 9.16460814286e-17, 1.51102358421e-18, 4.6606734707e-17, 3.0214816869e-17, 4.18892236822e-17, 0.0, 0.0, 2.13301176864e-17, 0.0, 0.00252483673143, 0.0118795873382, 0.0238817562668, 0.0352896620212, 0.043603741295, 0.0469031352686, 0.0441111771058, 0.0354091975219, 0.0226228177266, 0.00923491481519, 2.61196274884e-17, 0.0, 0.0, 0.0, 4.38109436461e-17, 0.0, 0.0, 5.54953583576e-17, 0.0, 9.62209437669e-17, 0.0, 8.22890849435e-18, 6.57706458566e-17, 4.43511251827e-18, 0.0, 2.07220838685e-16, 0.0, 0.0, 0.0, 3.54345406497e-17, 0.0, 0.0, 0.0, 0.0, 1.63760748034e-17, 1.87411566267e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.58910925116e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.45187859298788907], uv: [5.0, 12.0], spectrum: [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.44263588095e-17, 0.0, 1.77618821449e-17, 3.80908320661e-19, 0.0, 2.20379367851e-17, 0.0, 7.20337814011e-18, 0.0, 0.0, 0.0, 0.000839749208003, 0.00433354066664, 0.00930758170203, 0.0148398802156, 0.0201793740441, 0.0247007954971, 0.0278550431796, 0.0292079418147, 0.0285127028067, 0.0258024849227, 0.0214240512226, 0.0159591917684, 0.0101409022829, 0.00484315492935, 0.00108071967134, 1.03104584515e-17, 2.06295782595e-18, 7.69259049884e-18, 3.89110874029e-18, 0.0, 0.0, 2.3273966035e-17, 7.35550816628e-18, 2.86305568038e-18, 0.0, 0.0, 1.32062980688e-17, 1.15161925698e-18, 0.0, 1.76259135678e-18, 7.49525654088e-18, 8.66079097807e-19, 0.0, 0.0, 0.0, 3.6435991575e-18, 0.0, 1.09602476123e-18, 5.24498323065e-19, 9.41977752923e-19, 0.0, 2.38431961276e-18, 1.5365994542e-18, 0.0, 1.77164491291e-18, 0.0, 0.0, 6.8905346627e-20, 2.77843773007e-18, 1.34067495594e-21, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [0.0, 0.45187859298788907], uv: [6.0, 12.0], spectrum: [ 7.79420686093e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 8.68025853611e-19, 7.13831323523e-18, 1.16525706401e-17, 4.53180319521e-18, 0.0, 0.0, 0.0, 0.0, 7.46660056019e-18, 5.61188616576e-18, 0.0, 3.41019890177e-18, 0.0, 0.00101647261779, 0.00376169787902, 0.00749827415762, 0.011629608743, 0.0156626925376, 0.0191662503232, 0.0217579959148, 0.0231437971625, 0.0231801100955, 0.0219042040229, 0.0194794239739, 0.0161476187929, 0.0122432891689, 0.0081642289982, 0.00439253257591, 0.0014696600049, 1.8855009376e-18, 2.7578266753e-18, 0.0, 6.40655431208e-18, 0.0, 4.89518270812e-18, 6.04047466445e-18, 6.61583022459e-18, 0.0, 5.17446932132e-19, 0.0, 3.92074657769e-19, 3.17162627728e-19, 1.65630662746e-18, 0.0, 5.7363840438e-20, 3.34625311211e-18, 4.33676537014e-20, 0.0, 0.0, 0.0, 0.0, 3.02743416246e-19, 0.0, 0.0, 8.25390715111e-19, 3.31068583769e-19, 0.0, 2.63469399605e-19, 0.0, 3.55531626399e-19, 6.49407294855e-19, 1.10525238382e-18, 0.0, 0.0, 2.31388480138e-19, 8.53005580957e-19, 0.0, 5.61371085793e-19, 0.0, 7.37269117283e-7, 4.78926105395e-20, 8.65773551212e-19, 4.83468217328e-8 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, 0.45187859298788907], uv: [6.999999999999999, 12.0], spectrum: [ 3.7958994134e-17, 0.0, 7.2630274982e-17, 1.94925070461e-18, 0.0, 9.68649352526e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.55909024599e-18, 6.6269167129e-17, 2.39739407069e-17, 6.04932177904e-17, 0.0, 1.09027955613e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 7.50769328961e-18, 0.0, 4.38175547014e-18, 0.00445918711721, 0.0116867338701, 0.0189096373051, 0.0242917448172, 0.0270258549444, 0.0269164158114, 0.0241343122798, 0.0192118370937, 0.0130236312018, 0.00674793245384, 0.00184392689362, 0.0, 1.91021660042e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.36634970812e-17, 3.30036116925e-17, 5.17844649204e-17, 4.9153623329e-17, 1.74795681383e-17, 1.28452118759e-17, 1.23611223692e-17, 0.0, 2.17853035095e-18, 0.0, 0.0, 0.0, 1.00524584904e-17, 2.53690721039e-17, 6.60832304822e-18, 1.58076654468e-17, 2.89521272058e-17, 0.0, 0.0, 9.30896479455e-18, 1.13613317492e-17, 1.51272881431e-18, 8.37949976152e-19, 7.06947046093e-18, 2.94859994909e-18, 5.00455310754e-18, 2.77909824869e-18, 0.0, 0.0, 8.05634211957e-18, 9.67656612816e-18, 4.4270529574e-18, 1.06617730828e-17, 1.20765722455e-17, 7.37935355514e-7 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.5083634171113752], uv: [5.0, 13.0], spectrum: [ 2.29702870014e-17, 3.55320953493e-17, 2.45080012414e-17, 0.0, 2.18682930421e-18, 0.0, 1.67525845147e-18, 3.58576205696e-18, 0.0, 1.44199618562e-16, 0.0, 7.94324710254e-17, 9.27992243121e-17, 5.30470243548e-17, 0.0, 0.0, 0.0, 0.0, 3.07116532335e-17, 4.55861893302e-17, 0.0, 0.0, 8.10764913042e-17, 0.00522146233622, 0.0169092359245, 0.0301108996308, 0.0408532671093, 0.0460865281035, 0.0441569949205, 0.0354247623204, 0.0223496658039, 0.00890932080935, 0.0, 0.0, 0.0, 1.52099701664e-17, 6.52015259592e-18, 0.0, 3.05216737775e-17, 4.94566049892e-17, 0.0, 0.0, 8.58733946611e-17, 0.0, 0.0, 0.0, 1.86897584401e-17, 0.0, 7.05265306253e-17, 0.0, 8.33336025788e-18, 1.12087957608e-16, 1.89176398544e-17, 2.06702315231e-17, 4.65906462632e-17, 0.0, 3.60073953035e-17, 8.72187984542e-18, 6.9710400256e-18, 4.81459031089e-18, 0.0, 0.0, 5.26319179545e-18, 0.0, 0.0, 1.03141402209e-17, 0.0, 0.0, 0.0, 0.0, 1.04234387508e-17, 1.34459834792e-17, 1.18885690388e-17, 0.0, 0.0, 4.40695822989e-18, 1.1207638957e-17, 1.72388860734e-17, 1.1130864521e-17, 1.27644491506e-17, 1.00120341893e-17 ] }, spectrum_data_point_t { xystar: [0.0, 0.5083634171113752], uv: [6.0, 13.0], spectrum: [ 0.0, 6.65246068751e-17, 1.10391230502e-16, 1.31295745213e-17, 4.43770580676e-18, 1.39674343078e-17, 5.11932721054e-18, 2.73715249786e-17, 1.54559946027e-17, 4.75678167839e-17, 5.61720819121e-17, 0.0, 0.0, 0.0, 5.37186817957e-18, 0.0, 0.0, 1.32590768238e-16, 8.34550416772e-17, 0.0, 5.3241113977e-17, 5.35860970029e-17, 2.81223517282e-17, 1.44983149141e-18, 0.000823075389301, 0.00943263596448, 0.0210265313527, 0.0314666711465, 0.0376453141446, 0.0381046284009, 0.0331557426235, 0.024294707718, 0.0137564470958, 0.0044595663871, 2.3481998511e-17, 0.0, 3.3454817154e-18, 1.96931117254e-18, 0.0, 0.0, 3.89114544572e-17, 0.0, 8.26657997198e-17, 0.0, 6.80120453366e-17, 0.0, 0.0, 0.0, 0.0, 3.27682143299e-17, 0.0, 0.0, 3.29232181995e-17, 4.85073244613e-17, 0.0, 1.89181923757e-17, 1.37686296634e-17, 3.57540377825e-17, 1.2925834341e-17, 3.10551809457e-18, 2.50155389724e-18, 0.0, 7.22474978301e-19, 1.369944539e-17, 0.0, 0.0, 6.66321719372e-18, 9.05921427072e-18, 1.45769800638e-19, 0.0, 1.08879187166e-17, 5.3844328188e-18, 7.68845376826e-18, 9.88221941605e-18, 6.41882379988e-18, 4.1640139687e-18, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.2730601043599837, -0.22593929649394454], uv: [0.9999980468750005, 0.0], spectrum: [ 0.025458568698, 0.0254522907037, 0.0254350759272, 0.0253976554885, 0.0253239131175, 0.025181959663, 0.024930444763, 0.0244766041004, 0.0236680861767, 0.0222722028285, 0.0200261960681, 0.0168335355523, 0.0128503726222, 0.00847601270268, 0.00430773971387, 0.0011501996693, 0.0, 3.49224861096e-19, 2.83282269904e-18, 3.64589712698e-18, 1.05629785327e-18, 7.33857384866e-18, 0.0, 3.20616251913e-17, 0.0, 1.78543677294e-18, 8.34074991691e-17, 1.38565681533e-18, 0.0, 0.0, 2.73379727277e-17, 0.0, 1.35763670728e-17, 4.06451502046e-17, 0.0, 1.09428735223e-17, 0.0, 0.0, 4.54273212192e-18, 0.0, 4.59320784997e-18, 3.24804040306e-18, 0.0, 1.45719641965e-18, 1.18925375581e-17, 3.79347085933e-18, 8.10744949464e-18, 9.4911197767e-18, 9.58634869442e-18, 9.80058091678e-18, 9.29623971271e-18, 4.49946261274e-18, 0.000222156168043, 0.000780511862472, 0.00142594745134, 0.00203304525644, 0.00254857679431, 0.00295989797031, 0.00327842431908, 0.00351965880673, 0.00369931535729, 0.00382939945648, 0.00392209274448, 0.00398808765363, 0.00403499242544, 0.00406825696207, 0.00409195119678, 0.00410832738755, 0.00411979507489, 0.00412790912725, 0.00413342988336, 0.0041371254824, 0.0041396717457, 0.00414136171983, 0.00414247669735, 0.0041434630639, 0.00414385912547, 0.00414403175741, 0.00414404302662, 0.0041439979421, 0.00414394822128 ] }, spectrum_data_point_t { xystar: [-0.29433958464917753, -0.1694544723704584], uv: [0.6103496093750023, 1.0], spectrum: [ 0.00280771860646, 0.00280906543723, 0.00281342940028, 0.00282571779213, 0.00284916782655, 0.00289029215394, 0.00296006720587, 0.00308489676504, 0.00330181647043, 0.00366577522555, 0.00424577784394, 0.00507815252025, 0.00614802103695, 0.00740142066712, 0.00873800288285, 0.0100213719543, 0.0110836680854, 0.011738379582, 0.0118360730956, 0.0113001874502, 0.0101379189077, 0.00843758082973, 0.00635027929827, 0.00411031486384, 0.00202172151668, 0.000474489247833, 0.0, 1.76972626909e-18, 0.0, 0.0, 9.64072922949e-19, 6.95599799609e-18, 1.02606950418e-17, 3.06295173928e-18, 5.66153456149e-19, 0.0, 0.0, 5.99261203803e-18, 0.0, 1.09222234244e-17, 0.0, 8.27231846708e-18, 6.37859817249e-18, 0.0, 0.0, 6.78342993486e-18, 0.0, 1.07361500509e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.03079075276e-18, 0.0, 0.0, 0.0, 1.84976792439e-20, 0.0, 0.0, 0.0, 0.0, 0.0, 1.97854308871e-20, 0.0, 1.32184899746e-19, 0.0, 0.0, 3.87757938731e-7, 0.0, 0.0, 0.0, 3.17456176347e-19, 1.77622189228e-7 ] }, spectrum_data_point_t { xystar: [-0.29625953775797703, -0.11296964824697227], uv: [0.5751933593750014, 2.0], spectrum: [ 8.40054425038e-18, 0.0, 7.99007468102e-19, 1.93292552458e-18, 2.59882484002e-17, 3.48110434946e-19, 0.0, 4.6688644902e-18, 2.64328639104e-19, 2.55809861366e-19, 0.0, 0.0, 1.96249466248e-17, 0.000553304367836, 0.00318802839749, 0.00728062875434, 0.0120562361625, 0.0166262431958, 0.0201495723771, 0.0219829551186, 0.02179739411, 0.0196038845158, 0.0156787350543, 0.0106622256279, 0.0054653805916, 0.00132773345356, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.86091636623e-17, 0.0, 3.69986205597e-17, 0.0, 0.0, 8.77326349187e-17, 0.0, 3.70282900141e-17, 7.70760446269e-17, 0.0, 0.0, 0.0, 0.0, 8.31657390006e-17, 0.0, 0.0, 1.93563147604e-17, 4.30166712105e-17, 0.0, 1.43699504269e-17, 0.0, 0.0, 0.0, 0.0, 8.21058955597e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 3.1732409973e-18, 0.0, 1.25780440695e-18, 0.0, 0.0, 0.0, 0.0, 5.72087471549e-19, 5.48920920802e-19, 0.0, 3.2298674589e-18, 6.75856130536e-18, 1.02918517601e-17, 1.31663110293e-17, 1.26992544264e-17, 1.42465572408e-17, 1.07196472306e-17, 1.25547469676e-17 ] }, spectrum_data_point_t { xystar: [-0.29204630732477826, -0.056484824123486134], uv: [0.6523417968750005, 3.0], spectrum: [ 1.77581253401e-16, 2.66794698842e-17, 0.0, 8.0070909039e-18, 0.0, 4.15316822345e-18, 1.01715765886e-18, 3.46144629307e-18, 0.0, 0.0, 0.0, 0.0, 3.18373955135e-17, 2.0986803773e-17, 0.0, 5.36199523164e-18, 0.00431971649893, 0.0120226971156, 0.0205647438168, 0.0275905007363, 0.0314816634358, 0.0314572903172, 0.0274419820826, 0.0203124041528, 0.0116175863781, 0.00368153420424, 8.05545806103e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.68426495543e-17, 1.24755207593e-16, 2.75024044355e-16, 1.11389614129e-16, 0.0, 0.0, 3.07627251388e-17, 0.0, 4.8071840656e-17, 3.11009065187e-16, 0.0, 0.0, 0.0, 1.65160514468e-16, 0.0, 0.0, 0.0, 0.0, 6.98479287935e-17, 4.35951071902e-17, 0.0, 0.0, 3.87842906573e-17, 2.69076180977e-17, 0.0, 0.0, 3.4736566476e-17, 0.0, 0.0, 0.0, 0.0, 5.90283252621e-18, 9.80608434088e-19, 7.74136614574e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 7.80750683432e-19, 2.9339936105e-18, 2.65848857561e-18, 6.0973518583e-18, 3.50403360065e-18, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.2850598112899802, 0.0], uv: [0.7802714843750014, 4.0], spectrum: [ 2.94036137591e-16, 9.84635495295e-18, 2.77266848334e-17, 0.0, 3.00249380115e-18, 5.57906428508e-17, 1.39881372722e-17, 1.36576867161e-17, 0.0, 0.0, 2.03810921274e-17, 0.0, 0.0, 0.0, 4.45972984724e-17, 1.93267533048e-17, 6.86338611475e-17, 0.00188553214198, 0.0130308296741, 0.0267427664856, 0.0378640943973, 0.0431697516961, 0.0411320435819, 0.0325052716484, 0.0196231323092, 0.00658553750943, 0.0, 0.0, 0.0, 7.04948464729e-17, 0.0, 0.0, 2.7023526489e-16, 0.0, 2.15866396723e-16, 8.15619001767e-17, 1.308148876e-16, 4.07930168068e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.98115894452e-16, 0.0, 3.37442800726e-16, 1.24168563895e-16, 3.46849948298e-16, 2.53499045085e-16, 9.92188499734e-17, 3.60879583755e-16, 2.00922877964e-16, 2.04961568081e-16, 1.72235508061e-17, 1.40334218578e-16, 3.52838684191e-18, 2.95594862186e-18, 7.85115428164e-18, 2.05662348852e-18, 1.9660527093e-17, 2.3777270106e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 9.32019306398e-18, 3.9539506093e-18, 3.36054236435e-18, 0.0, 1.54445722694e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 5.19192028345e-18, 1.09436656785e-18, 0.0 ] }, spectrum_data_point_t { xystar: [-0.2743400730991833, 0.056484824123486106], uv: [0.9765605468750005, 4.999999999999999], spectrum: [ 1.21364952901e-16, 2.40858997747e-16, 0.0, 1.52652901729e-18, 0.0, 1.54527033622e-16, 1.88240116904e-17, 1.63222808603e-17, 1.9766318292e-18, 5.78102942309e-17, 0.0, 3.49476065621e-17, 1.41050169496e-17, 4.52696453405e-17, 9.10649253577e-17, 0.0, 5.65097797859e-17, 0.0, 0.00448508610633, 0.018972690031, 0.0350262814425, 0.0466488334421, 0.050128390313, 0.0447633454348, 0.031892616638, 0.0150262220377, 0.000629810286052, 1.45161516834e-15, 0.0, 0.0, 0.0, 1.55628882578e-17, 0.0, 0.0, 2.31871675062e-16, 0.0, 1.39624732435e-16, 5.3699567593e-16, 5.659734614e-17, 0.0, 0.0, 0.0, 0.0, 5.32773873869e-16, 0.0, 0.0, 1.68996001376e-17, 5.8280122873e-16, 1.55142006009e-16, 6.5703318439e-16, 8.22097287972e-17, 6.24066366442e-16, 1.27681801549e-16, 9.61594479649e-17, 4.16354867674e-16, 3.95505255287e-16, 1.37891398561e-16, 1.38462465031e-16, 1.23624475486e-16, 8.9864392715e-17, 4.89174005783e-17, 5.28698146418e-17, 5.8322103397e-17, 4.7432791578e-17, 7.27766817318e-17, 0.0, 1.44963038571e-17, 1.21318446683e-17, 1.9911787308e-17, 1.49610085674e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.18913526271e-18, 9.20738760271e-18, 1.37887779093e-18 ] }, spectrum_data_point_t { xystar: [-0.2730599976959221, 0.06321457169449544], uv: [1.0, 5.1191425781249995], spectrum: [ 0.0, 0.0, 0.0, 0.0, 0.0, 1.93242012001e-17, 5.66281194976e-18, 0.0, 5.30690629092e-19, 0.0, 1.60621306643e-17, 0.0, 8.86779604881e-17, 1.88646488152e-17, 0.0, 0.0, 6.39905619239e-18, 2.01736753549e-17, 0.00325112740521, 0.0178470919398, 0.0346775821044, 0.0472163214706, 0.0513800755825, 0.0462909047611, 0.0332454237249, 0.0158465902763, 0.000818687659331, 1.48188268012e-16, 7.89562668533e-17, 0.0, 0.0, 2.95293921991e-16, 1.19657941454e-16, 0.0, 0.0, 0.0, 3.15756888825e-16, 0.0, 0.0, 0.0, 9.4766789851e-16, 0.0, 7.8270663917e-16, 6.10384428787e-16, 0.0, 1.20301443884e-16, 0.0, 0.0, 0.0, 0.0, 4.47268365457e-17, 1.13547153462e-16, 5.27341548924e-17, 0.0, 2.67727232785e-17, 7.35922219196e-18, 7.20838895175e-17, 0.0, 0.0, 1.89331168714e-17, 5.08470702839e-17, 1.98445986793e-17, 4.79920778439e-17, 8.55750966633e-18, 3.14903932277e-17, 3.6868408198e-18, 0.0, 0.0, 0.0, 2.33358870515e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.15154283953e-17 ] }, spectrum_data_point_t { xystar: [-0.26175371383038687, 0.11296964824697227], uv: [1.2070292968750014, 6.0], spectrum: [ 0.0, 0.0, 0.0, 7.3898005543e-18, 0.0, 0.0, 3.44730118886e-18, 7.39136644662e-18, 1.3866307553e-16, 1.25587868214e-16, 1.37730567829e-16, 5.79762030103e-17, 0.0, 5.55955784696e-17, 0.0, 9.72501691515e-17, 0.0, 3.08368437077e-17, 1.53114942159e-16, 0.00926192045301, 0.0283524688373, 0.0465230329428, 0.0564626987463, 0.05537299185, 0.0435026496726, 0.0242315190807, 0.00501833116112, 3.06451519274e-17, 0.0, 1.9174775142e-16, 1.12165668991e-16, 0.0, 4.28416190915e-16, 0.0, 4.7169481508e-16, 0.0, 3.19328141396e-16, 2.53337984749e-16, 4.12789303943e-16, 0.0, 0.0, 3.38508990617e-16, 0.0, 0.0, 8.35470086493e-16, 0.0, 6.72661873414e-16, 0.0, 0.0, 0.0, 3.90611991936e-16, 0.0, 3.83995021112e-16, 3.69350336521e-16, 1.45107125077e-16, 0.0, 0.0, 2.69244257834e-17, 6.63958692767e-17, 4.85912983659e-18, 5.23029253722e-17, 0.0, 1.166195788e-17, 1.97222726093e-17, 0.0, 7.22033808563e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.06830712825e-17, 2.67696219838e-17, 7.74319509267e-18, 5.39398863526e-18, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.24756739363759098, 0.16945447237045844], uv: [1.4667949218749996, 7.0], spectrum: [ 9.46423366347e-17, 0.0, 0.0, 0.0, 8.16378990522e-18, 2.00856791204e-18, 2.79025772457e-16, 0.0, 2.69932179232e-17, 9.97460570545e-18, 0.0, 1.63012658611e-16, 1.53789299641e-17, 0.0, 6.96301966375e-17, 0.0, 0.0, 0.0, 1.02316899201e-16, 0.0, 0.018771300452, 0.0421575895222, 0.0589637924345, 0.0638040533495, 0.055176301103, 0.03548305091, 0.0119984824187, 0.0, 2.71533578726e-17, 1.42854319535e-15, 0.0, 1.26294233342e-15, 1.78925571147e-16, 7.90531646738e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.66216607832e-15, 2.73271332788e-16, 1.37362023519e-15, 0.0, 1.76664694973e-16, 0.0, 0.0, 1.11831885389e-15, 0.0, 1.72449657079e-16, 1.54865145445e-16, 0.0, 0.0, 2.46723035875e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.94426571403e-17, 0.0, 0.0, 0.0, 0.0, 5.98547889343e-17, 5.5213102402e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 8.66000532753e-18 ] }, spectrum_data_point_t { xystar: [-0.23130112424359567, 0.22593929649394454], uv: [1.7646464843749987, 8.0], spectrum: [ 0.0, 0.0, 0.0, 5.7766226827e-19, 0.0, 2.05735188166e-17, 0.0, 0.0, 0.0, 1.51475621159e-16, 0.0, 0.0, 3.87187969921e-17, 0.0, 5.91875358968e-18, 1.89152318308e-16, 1.67280072672e-16, 7.18199641588e-17, 2.0556244397e-16, 0.0, 0.00636533334136, 0.0303921698653, 0.0544368033805, 0.0683211349906, 0.0669270497601, 0.0499587691537, 0.0227800814372, 2.80935186836e-16, 0.0, 3.43202138067e-16, 3.75055708872e-16, 6.52294740564e-16, 2.12968102832e-16, 1.3993946272e-16, 0.0, 0.0, 6.1302699193e-16, 0.0, 0.0, 0.0, 1.51350337969e-15, 2.43452855133e-16, 4.00162487331e-16, 0.0, 8.40448003637e-16, 0.0, 1.13707644254e-15, 2.89272609661e-16, 1.59126039235e-16, 0.0, 1.16767893974e-15, 4.22558346818e-17, 0.0, 0.0, 0.0, 3.10707114057e-16, 0.0, 0.0, 1.68326605247e-17, 0.0, 9.57678671557e-17, 2.77896981457e-18, 0.0, 0.0, 0.0, 0.0, 5.87315809708e-17, 0.0, 1.11787206613e-17, 4.80485763267e-17, 7.4016851366e-17, 9.42977449306e-17, 0.0, 0.0, 1.02797227588e-17, 6.72221015034e-18, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.2184479981567377, 0.2662069083882738], uv: [1.9999999999999991, 8.712892578125], spectrum: [ 0.0, 0.0, 2.4614774312e-16, 1.48208774955e-17, 3.47634625238e-17, 6.28204367129e-17, 1.25854276666e-16, 0.0, 3.38207578091e-16, 0.0, 4.34798575082e-17, 0.0, 0.0, 7.36573974655e-17, 0.0, 6.92823913035e-17, 2.01881626825e-16, 1.49407722696e-16, 0.0, 6.37930032245e-17, 0.0, 0.0222148245648, 0.0493658327136, 0.0685730097922, 0.0724769778849, 0.0588780897662, 0.031398459148, 0.00310814642272, 1.29475692305e-15, 7.45516471629e-16, 3.71836506459e-16, 0.0, 0.0, 0.0, 0.0, 1.41671699528e-16, 2.28281371612e-16, 0.0, 0.0, 5.03581464361e-16, 0.0, 0.0, 5.65019568747e-16, 1.22161775617e-15, 4.76194061813e-16, 2.14930843579e-16, 0.0, 9.36346582503e-16, 2.17392007073e-16, 0.0, 0.0, 0.0, 1.9349585372e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.52689904524e-17, 0.0, 1.78123012597e-17, 0.0, 0.0, 0.0, 8.95634968285e-18, 8.49384392692e-18, 0.0, 0.0, 5.22015858384e-17, 8.83051505993e-17, 8.7936924452e-17, 5.28946618602e-17, 6.30650487366e-17, 8.45275547396e-17, 6.49183533893e-17, 4.15764967743e-17, 2.0931479236e-17, 1.00222632972e-17 ] }, spectrum_data_point_t { xystar: [-0.2132215658024008, 0.28242412061743066], uv: [2.0957011718749996, 9.0], spectrum: [ 1.45003753505e-16, 0.0, 0.0, 2.94762948228e-17, 0.0, 4.13015924695e-18, 0.0, 3.05754188446e-17, 2.34913373218e-16, 2.62079876099e-16, 3.77746674352e-16, 9.84109231799e-17, 0.0, 0.0, 0.0, 0.0, 4.29353347665e-17, 0.0, 0.0, 2.26336728862e-16, 2.09818867176e-16, 0.0163483970256, 0.0450455039511, 0.0684887150875, 0.0761275461676, 0.0639116947297, 0.0349177955991, 0.00359813724513, 6.51722048717e-16, 2.26829325135e-15, 0.0, 1.41546125026e-16, 0.0, 2.26400609763e-16, 0.0, 3.1818158734e-16, 1.10494105493e-16, 1.23517759837e-15, 0.0, 0.0, 5.24706965576e-16, 0.0, 5.62344201973e-16, 2.77288397786e-16, 0.0, 0.0, 9.5371381841e-16, 1.16184432997e-15, 0.0, 2.05139016913e-15, 0.0, 0.0, 1.40485180037e-15, 6.52350048446e-16, 0.0, 5.30141216643e-16, 2.42894472331e-16, 2.98893834318e-17, 0.0, 2.88594003531e-16, 1.26192663363e-16, 1.40988908747e-16, 1.75286325157e-16, 9.66517991928e-17, 1.31327559461e-16, 7.44634187829e-17, 6.0847824074e-17, 9.2752842199e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 1.90385791025e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.19268873394440664, 0.33890894474091676], uv: [2.471677734375, 10.0], spectrum: [ 1.88294649365e-16, 0.0, 4.32530248926e-16, 4.87645534882e-17, 9.94475971335e-18, 2.71290582087e-17, 2.09228664434e-16, 0.0, 1.23456160018e-16, 4.90167597368e-17, 3.71715789731e-16, 0.0, 0.0, 2.65486227089e-16, 0.0, 1.46556102031e-16, 9.36288167135e-17, 0.0, 0.0, 9.72776848234e-17, 5.26490718925e-17, 0.00108992252072, 0.0307013796994, 0.0628523911901, 0.0807890520478, 0.0760413697979, 0.0488186311697, 0.0127510013556, 2.58017896231e-16, 0.0, 0.0, 2.66409978841e-15, 0.0, 0.0, 1.77336168856e-15, 0.0, 0.0, 4.2465635743e-16, 0.0, 2.06867491976e-15, 0.0, 0.0, 2.60848859431e-15, 0.0, 0.0, 2.82753271716e-15, 0.0, 3.69847680302e-16, 2.86213835567e-16, 0.0, 9.49658970156e-16, 0.0, 2.77989429166e-16, 0.0, 9.08762696307e-16, 6.5231190274e-16, 3.89202650096e-16, 6.77196961758e-16, 1.41546435973e-16, 1.17371882176e-16, 2.3141219704e-16, 1.51946983497e-16, 1.4337808553e-16, 1.65472302249e-16, 1.1855435559e-16, 7.24897775444e-17, 0.0, 2.57886853636e-18, 6.99635242439e-18, 4.80436212021e-17, 1.26099468772e-16, 1.65765750845e-16, 1.56383072063e-17, 0.0, 0.0, 0.0, 6.92300201492e-18, 6.62440336256e-17, 3.94626350784e-17, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.16922264039241333, 0.395393768864403], uv: [2.901365234375, 11.0], spectrum: [ 0.0, 4.50147706485e-16, 9.73827943658e-17, 0.0, 0.0, 0.0, 8.25311707159e-17, 0.0, 0.0, 0.0, 7.43184267785e-16, 0.0, 8.98493132502e-16, 0.0, 6.80149404892e-16, 6.82216224251e-17, 6.4699181244e-16, 0.0, 2.85588830445e-16, 0.0, 1.03917007884e-16, 3.37482203252e-16, 0.00805623578478, 0.0441632315596, 0.0770019286002, 0.0873600151687, 0.067754824668, 0.0276168020359, 5.24604360716e-16, 0.0, 0.0, 8.15076392354e-17, 0.0, 8.71311069122e-18, 2.76197684488e-15, 0.0, 0.0, 0.0, 0.0, 1.11134746524e-15, 1.60837331105e-15, 0.0, 0.0, 6.11361137695e-16, 0.0, 8.44872578576e-16, 0.0, 0.0, 4.36657946866e-16, 0.0, 6.89863891225e-16, 7.5367198601e-16, 0.0, 1.21459396589e-15, 0.0, 0.0, 0.0, 0.0, 0.0, 1.98469083681e-16, 0.0, 0.0, 0.0, 0.0, 5.88953899449e-18, 0.0, 7.77710452546e-18, 0.0, 1.76521362725e-17, 0.0, 0.0, 0.0, 0.0, 9.06876297561e-18, 6.07751921827e-18, 4.70502463889e-18, 2.87241579507e-17, 2.47073879411e-17, 1.34477706586e-17, 3.37724961567e-17, 3.58917387095e-17 ] }, spectrum_data_point_t { xystar: [-0.16383599861755327, 0.40846702695709286], uv: [3.0, 11.231447265625], spectrum: [ 0.0, 0.0, 0.0, 0.0, 0.0, 2.83259094598e-16, 0.0, 0.0, 0.0, 5.43414747194e-16, 0.0, 8.060038466e-16, 0.0, 3.90376170477e-16, 5.6322280581e-17, 0.0, 3.11262762276e-16, 6.91734764714e-16, 0.0, 0.0, 0.0, 1.87306638686e-16, 0.00237972722479, 0.0396489133272, 0.0763584088976, 0.0903601332827, 0.0722383549714, 0.0307484032911, 8.43888351473e-16, 0.0, 0.0, 0.0, 9.36032083766e-16, 0.0, 0.0, 2.41242470149e-15, 1.37609877002e-15, 0.0, 2.57090414216e-15, 1.0285722206e-15, 5.49562909392e-16, 0.0, 1.39209961924e-15, 0.0, 0.0, 0.0, 0.0, 3.70386108365e-16, 0.0, 2.11446836599e-15, 0.0, 1.03247747115e-15, 0.0, 0.0, 3.05004953815e-17, 4.82857444269e-16, 0.0, 2.28333214469e-16, 1.23535991222e-16, 1.01337508173e-16, 1.44267523701e-16, 2.21184033712e-17, 0.0, 2.82160122469e-17, 1.58780503713e-16, 2.52046086171e-17, 2.17610049559e-16, 0.0, 1.14666955452e-17, 2.28925893654e-17, 2.29523305711e-17, 4.65581888637e-17, 0.0, 1.1005229769e-17, 8.81885391306e-17, 8.75422470641e-17, 5.93807684387e-17, 3.36977674886e-17, 5.22559542724e-17, 1.00906177132e-16, 1.19243376534e-16 ] }, spectrum_data_point_t { xystar: [-0.13957003126762177, 0.45187859298788907], uv: [3.4443339843750005, 12.0], spectrum: [ 0.0, 0.0, 7.5483218602e-16, 0.0, 1.72341034265e-17, 1.46366915346e-16, 0.0, 1.12450263853e-15, 0.0, 0.0, 7.63047156379e-16, 0.0, 3.33295929163e-16, 0.0, 9.75805056865e-16, 0.0, 0.0, 3.21366173872e-16, 2.32610540087e-16, 0.0, 0.0, 1.80219848073e-16, 0.0, 0.0180429021861, 0.0560997781373, 0.0840209682896, 0.0835900299159, 0.0521420631349, 0.00901622740845, 9.23926255859e-16, 2.08483547913e-15, 4.58375645352e-16, 1.06716742432e-15, 0.0, 0.0, 7.74007764343e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 2.56588010924e-15, 2.88766101094e-15, 1.24692208895e-15, 3.76928348522e-16, 1.1929861541e-15, 0.0, 0.0, 0.0, 3.07258427078e-15, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.14350887484e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 4.20669812313e-17, 0.0, 0.0, 0.0, 5.57218194638e-18, 0.0, 1.46276524092e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.10922399907836886, 0.5003100271188159], uv: [3.9999999999999996, 12.857423828124999], spectrum: [ 7.33695763444e-16, 1.56037786376e-16, 0.0, 0.0, 0.0, 0.0, 4.39110119942e-17, 3.12793482673e-15, 0.0, 0.0, 0.0, 3.05568863523e-15, 0.0, 1.11296710399e-15, 0.0, 0.0, 0.0, 0.0, 2.23350993789e-15, 0.0, 1.41017567231e-15, 1.30625126069e-15, 1.58668953668e-17, 2.54962939272e-16, 0.0227485854853, 0.0691546296174, 0.0942323477709, 0.0762934209453, 0.0270250639761, 1.00462287358e-16, 0.0, 0.0, 6.5305325525e-17, 0.0, 0.0, 5.17939625312e-16, 0.0, 5.88881153928e-16, 0.0, 2.84129490082e-15, 0.0, 0.0, 0.0, 0.0, 1.61973891173e-15, 0.0, 4.04710669048e-15, 0.0, 5.04725361618e-16, 5.88725382792e-16, 1.03629965792e-15, 8.03836708282e-16, 1.19981229601e-15, 0.0, 2.77116641121e-16, 0.0, 0.0, 0.0, 5.73020715044e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.50112998668e-17, 0.0, 2.33231992598e-17, 0.0, 7.20131268396e-18, 6.02645778257e-17, 3.52062265269e-17, 0.0, 2.87050906795e-17, 3.1675279995e-17, 4.78399496723e-17, 4.24895684556e-17, 4.65454177752e-17, 5.99684629833e-17, 6.71354666085e-17, 1.19842611601e-16 ] }, spectrum_data_point_t { xystar: [-0.1006909808144329, 0.5083634171113752], uv: [4.156248046875, 13.0], spectrum: [ 7.90052596911e-16, 4.58770605494e-16, 2.6836369942e-15, 8.27830937588e-17, 8.97750072757e-17, 1.17189275731e-16, 1.57086299504e-16, 5.30936386322e-16, 1.54844260788e-15, 1.08224117044e-15, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.65284582822e-17, 1.73181492394e-15, 0.0, 0.0, 5.01230461346e-16, 3.57442184861e-16, 4.10426755787e-16, 7.81845865646e-16, 0.0196105488732, 0.0588771325627, 0.0849834187504, 0.0789353110393, 0.0417020446218, 5.50902335347e-18, 1.24712586833e-16, 0.0, 1.38996138835e-16, 5.97014324018e-16, 1.87186423712e-16, 0.0, 0.0, 0.0, 0.0, 4.64397163158e-17, 0.0, 5.7068795194e-16, 1.97229712642e-15, 2.16328843969e-16, 1.33181041332e-15, 0.0, 0.0, 0.0, 2.17227366923e-15, 3.83460726607e-16, 5.06124342319e-16, 0.0, 0.0, 9.43770281494e-17, 0.0, 0.0, 0.0, 7.26340362459e-18, 0.0, 2.37892219763e-17, 0.0, 1.85834640928e-16, 2.43967524442e-17, 6.11294866121e-17, 1.54882729435e-18, 4.3406933944e-17, 4.26064956721e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 7.17168901551e-18, 7.48451353429e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.05461199953918444, 0.5425081623282562], uv: [5.0, 13.604494140624999], spectrum: [ 1.7509171881e-16, 5.52363246205e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.67566165382e-16, 0.0, 9.67078810562e-17, 1.87583899594e-15, 2.25880005837e-15, 0.0, 1.70921626479e-15, 1.87509955645e-16, 2.58511165502e-16, 0.0, 1.04949901853e-16, 0.0, 0.0139761562766, 0.0521687402921, 0.0782974458149, 0.0723952436192, 0.0375364883789, 0.0, 3.94488695626e-16, 0.0, 1.10255501821e-16, 0.0, 8.7215356e-18, 0.0, 0.0, 0.0, 5.62781883961e-16, 4.00471472326e-16, 0.0, 5.01119699859e-16, 8.35852105057e-16, 1.48001921374e-15, 7.96077893328e-17, 6.16368931941e-16, 9.99725472714e-17, 4.40616213003e-16, 0.0, 9.75802600664e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.10042356181e-16, 1.2296300719e-16, 7.91156971432e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 1.06200185319e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.6619593928e-18 ] }, spectrum_data_point_t { xystar: [0.018026333074456447, 0.5083634171113752], uv: [6.3300800781249995, 13.0], spectrum: [ 5.29530767441e-16, 0.0, 3.98958315409e-16, 3.11518847462e-17, 7.2455611149e-18, 1.81627434234e-17, 8.08045823881e-17, 0.0, 1.6724435972e-16, 6.51852500559e-16, 2.07625369103e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 2.17758760012e-16, 3.88817377271e-16, 3.01461402165e-16, 2.80575931726e-16, 1.15873181895e-16, 1.79275282083e-16, 4.55175115275e-16, 1.2513229913e-16, 0.0, 1.61010029021e-16, 0.00552329641193, 0.0221443445367, 0.037521441276, 0.0445579362778, 0.041685363425, 0.0308227500077, 0.0159593308467, 0.00305401227779, 1.67882870467e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.73268940634e-16, 7.22423344817e-16, 2.71338291654e-17, 0.0, 1.72846471868e-16, 9.78860892802e-17, 8.57498943604e-17, 0.0, 0.0, 4.88959454605e-17, 0.0, 0.0, 2.73452823513e-17, 0.0, 0.0, 0.0, 2.73561867227e-17, 2.17785418013e-17, 2.6840145458e-17, 0.0, 0.0, 2.67205474176e-17, 9.75927665541e-18, 0.0, 8.26362270983e-18, 3.39930457927e-17, 5.17523247617e-17, 3.60414181345e-17, 9.8500821035e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.30781887056e-18, 8.85795882233e-18, 1.85415512154e-17, 0.0 ] }, spectrum_data_point_t { xystar: [0.0, 0.5275595418815132], uv: [6.0, 13.339845703124999], spectrum: [ 3.58119409508e-16, 1.91517822224e-17, 0.0, 0.0, 0.0, 0.0, 2.34653067444e-17, 1.37895557215e-16, 0.0, 4.27384324412e-16, 0.0, 9.5334090719e-16, 1.2737331372e-15, 0.0, 0.0, 1.12587680606e-15, 8.37653051334e-17, 0.0, 0.0, 0.0, 0.0, 4.65298983935e-16, 2.50460910758e-17, 7.09715798075e-17, 1.04834502465e-17, 0.0, 0.00900421884556, 0.0330953976524, 0.0518374945718, 0.0548536928508, 0.0422730320255, 0.0210198440676, 0.00201710247202, 0.0, 7.78833020354e-18, 1.92059104053e-17, 1.23564516236e-17, 0.0, 0.0, 1.06453905302e-16, 0.0, 0.0, 1.11473694024e-15, 9.34839324062e-16, 0.0, 0.0, 0.0, 4.42292569184e-16, 0.0, 0.0, 1.94082281799e-16, 1.33968680564e-16, 2.35194830576e-16, 1.58370430992e-16, 0.0, 0.0, 0.0, 0.0, 4.02803964421e-17, 0.0, 0.0, 7.2054024174e-18, 1.45512935298e-17, 0.0, 4.62296569577e-17, 2.23022582286e-18, 4.57272274242e-17, 1.77964836222e-17, 5.41432907383e-17, 2.34466602096e-17, 8.09603993913e-18, 2.05055550505e-17, 1.56496264061e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [0.08735797311443666, 0.395393768864403], uv: [7.5996113281249995, 11.0], spectrum: [ 1.7951152072e-18, 2.42687023766e-17, 7.14389135811e-18, 0.0, 0.0, 0.0, 3.09872804226e-18, 5.661115257e-18, 0.0, 0.0, 0.0, 5.26731860507e-17, 7.05349197427e-17, 4.65808469994e-17, 2.10411838842e-17, 0.0, 0.0, 0.0, 1.14389718659e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.000577535707165, 0.00451834456686, 0.00970474988625, 0.0146464738623, 0.0185243176133, 0.0208978174603, 0.0215474897364, 0.0204671678441, 0.0178543393759, 0.0140914972665, 0.00971450250153, 0.00538665544921, 0.00187077254129, 2.09364314515e-17, 0.0, 0.0, 0.0, 3.06062186962e-17, 9.33704564276e-19, 0.0, 1.35575214695e-17, 3.07190118131e-17, 0.0, 0.0, 0.0, 0.0, 2.59749865897e-18, 0.0, 6.16471649602e-18, 4.95856840741e-18, 1.90399820513e-18, 0.0, 1.65714840202e-18, 1.41216969578e-18, 6.9100371601e-18, 3.98637220123e-18, 4.46696780318e-18, 1.99076889199e-18, 4.75378201856e-18, 3.14920427226e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.97224568824e-18, 0.0, 3.95960551484e-7, 0.0, 1.99735241309e-7, 7.81919533145e-8, 3.30226189524e-7, 2.60399587908e-7 ] }, spectrum_data_point_t { xystar: [0.05759869992804513, 0.45187859298788907], uv: [7.0546894531249995, 12.0], spectrum: [ 4.39555449169e-17, 0.0, 0.0, 0.0, 6.74220016775e-18, 0.0, 0.0, 1.11369225153e-17, 0.0, 0.0, 3.99795798807e-17, 0.0, 0.0, 0.0, 2.70536194249e-17, 0.0, 1.09208348957e-16, 1.34409432186e-16, 3.90741960306e-17, 1.34452370998e-16, 0.0, 1.39533027894e-17, 3.50845090222e-17, 2.89565430931e-17, 2.15089453962e-17, 4.73535118338e-17, 0.00121322613622, 0.0085356793802, 0.0173307438099, 0.0245055847268, 0.0286050788056, 0.029148617648, 0.0262354367599, 0.0205143512251, 0.0131664089603, 0.0058529724634, 0.000655832646077, 0.0, 0.0, 2.96971044205e-17, 1.26124940592e-16, 2.32900368463e-17, 0.0, 2.86436795492e-17, 0.0, 1.60331797995e-18, 1.23281954051e-17, 0.0, 9.5233505498e-17, 5.73097635986e-17, 0.0, 0.0, 6.35063605741e-17, 0.0, 3.39959770196e-18, 4.68422542756e-18, 5.82433847127e-18, 1.09573051875e-17, 3.88463750905e-18, 7.86632989919e-18, 1.11040091737e-18, 1.645604969e-18, 3.7380054529e-18, 8.72430519799e-19, 0.0, 0.0, 2.48680014875e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.39291046226e-18, 1.57668835266e-18, 0.0, 3.76207209619e-19 ] }, spectrum_data_point_t { xystar: [0.054611999539184386, 0.45651222403869096], uv: [6.999999999999999, 12.082033203125], spectrum: [ 1.45407359517e-17, 0.0, 1.01501793124e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 7.79500683767e-17, 0.0, 4.40854328985e-16, 2.15811070814e-16, 0.0, 0.0, 9.00457713593e-17, 1.07114364291e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00168787882254, 0.00938336739884, 0.0183724452714, 0.0255291334158, 0.0294143971596, 0.0295930742348, 0.0262290249989, 0.0200565523879, 0.0123654048854, 0.00494053005172, 1.12284351985e-18, 0.0, 2.59354527487e-17, 0.0, 0.0, 1.76418862381e-16, 4.8011627064e-17, 0.0, 0.0, 0.0, 0.0, 2.52087415078e-17, 1.45550670118e-17, 0.0, 5.11009593131e-17, 0.0, 5.73822397676e-17, 0.0, 2.73832947487e-17, 0.0, 5.63941670123e-18, 0.0, 1.1213158193e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.69612257625e-18, 5.28564626656e-18, 1.31757257059e-17, 9.98122167698e-18, 1.16619915263e-17, 1.73185303161e-17, 1.30773292026e-17, 1.75234176128e-17, 1.59066309398e-17, 1.85632291472e-17, 1.98273472293e-17 ] }, spectrum_data_point_t { xystar: [0.15839623814001638, 0.22593929649394454], uv: [8.900392578125, 8.0], spectrum: [ 3.6525513374e-18, 3.67597672557e-18, 1.19943205309e-17, 2.51766576114e-19, 9.53829040571e-19, 5.15312908686e-19, 7.42046888094e-19, 1.41829532638e-18, 9.11749207457e-18, 0.0, 0.0, 0.0, 0.0, 1.21189895418e-17, 4.6207900054e-18, 1.0001357954e-17, 0.0, 0.0, 9.68634257443e-18, 3.27814388636e-18, 0.0, 1.41866760671e-18, 0.0, 4.32732386021e-18, 0.0, 0.000379209093989, 0.00138898384087, 0.00277173505094, 0.0043014897429, 0.00580734901758, 0.00718454786774, 0.00836139883294, 0.00928631672964, 0.00992806593486, 0.0102744418708, 0.0103281628571, 0.0101060222873, 0.00963566777399, 0.00895343667686, 0.00810300594928, 0.00713289737019, 0.00609439336644, 0.00503791331937, 0.00400987863608, 0.00305372210016, 0.00220154593093, 0.00147785599604, 0.000897224926751, 0.000466178629771, 0.000181090220948, 3.0462022939e-5, 1.96516133425e-19, 1.94743855685e-19, 5.21595279568e-19, 5.97748474506e-19, 6.31782603606e-19, 8.96008980765e-19, 4.2237229001e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.69457559449e-8, 1.04760770219e-19, 2.27348936999e-19, 1.61942111603e-19, 1.35489884052e-19, 1.13894550664e-19, 6.87034323163e-8 ] }, spectrum_data_point_t { xystar: [0.1363701094196227, 0.28242412061743066], uv: [8.497072265625, 9.0], spectrum: [ 0.0, 0.0, 0.0, 1.9454655954e-20, 0.0, 2.20678978126e-19, 0.0, 0.0, 0.0, 7.21226120623e-18, 0.0, 4.67194561352e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 3.92941001063e-18, 1.87380519621e-18, 2.86447749352e-18, 4.76954445784e-19, 4.15648336554e-18, 0.0, 6.55775379551e-18, 0.0, 0.0, 0.000980124266585, 0.00280882636852, 0.00500556456938, 0.00721425141125, 0.00921887168185, 0.0108770473237, 0.0120895064135, 0.0127986133767, 0.0129882616993, 0.0126755066206, 0.0119065831697, 0.0107526227224, 0.00930242850147, 0.00766007946214, 0.0059407280515, 0.0042578955928, 0.00272958426083, 0.00145984977787, 0.000541205538607, 3.92842598682e-5, 0.0, 8.29787739345e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.96461822484e-7, 0.0, 0.0, 6.9811365538e-8, 0.0, 1.87503503055e-7, 7.38725178644e-7, 7.45053115182e-7, 8.69296053337e-7, 1.12757480718e-6, 4.85230486268e-7, 9.16556248703e-7 ] }, spectrum_data_point_t { xystar: [0.11301067992922935, 0.33890894474091676], uv: [8.069337890625, 10.0], spectrum: [ 1.37657460266e-18, 0.0, 0.0, 1.65614860674e-18, 1.19846525505e-18, 1.51829481315e-18, 0.0, 2.16085981077e-18, 5.69728029177e-18, 2.6161217258e-17, 0.0, 0.0, 0.0, 4.1254249919e-17, 0.0, 2.11275929725e-17, 0.0, 7.47953292923e-18, 0.0, 9.14256678283e-18, 3.65036327947e-17, 0.0, 3.86018284473e-17, 0.0, 0.0, 5.16537735245e-19, 0.000631607151995, 0.00310909256591, 0.00638278034158, 0.00969769445106, 0.0126048315821, 0.0148269329226, 0.0161871923598, 0.0166030587316, 0.0160832707935, 0.0147173604194, 0.0126619050926, 0.0101281912443, 0.00736944482321, 0.00467156618174, 0.00234128917625, 0.000685346299466, 9.25692530305e-18, 0.0, 0.0, 2.47878311548e-17, 5.80402990391e-19, 0.0, 0.0, 8.24956597665e-18, 0.0, 2.23006100445e-17, 0.0, 1.17320394179e-17, 0.0, 0.0, 3.50172794004e-19, 3.70574334459e-19, 1.38332877979e-18, 2.10999111455e-18, 0.0, 0.0, 2.05504189628e-18, 1.53270394923e-18, 1.70897461145e-18, 1.90716147304e-18, 3.79339370079e-18, 1.86317663427e-18, 1.87602714301e-18, 3.79022922965e-18, 1.77119608813e-18, 1.41429354576e-18, 4.12194447801e-18, 5.23540476786e-18, 4.28850134217e-18, 4.3434817178e-18, 5.35605402328e-18, 6.23488204372e-18, 4.1553038842e-18, 7.24287285285e-18, 4.92126142355e-18 ] }, spectrum_data_point_t { xystar: [0.10922399907836883, 0.34767964787107547], uv: [8.0, 10.155275390624999], spectrum: [ 6.01782784005e-18, 1.97127008665e-17, 7.78721760731e-18, 4.69850073443e-19, 0.0, 6.12055663697e-18, 0.0, 1.78481157374e-18, 2.45480461973e-18, 0.0, 2.30418855147e-18, 2.56264606851e-17, 3.24561399788e-17, 0.0, 0.0, 3.69038315517e-18, 1.88218401475e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.11362485084e-18, 1.65867778186e-17, 2.76718775366e-17, 0.000591670845246, 0.00322479232413, 0.00672450130779, 0.0102535537531, 0.0133141200551, 0.0156076959599, 0.0169464778605, 0.017246406452, 0.0165252776007, 0.014897161459, 0.0125523752934, 0.00973890614628, 0.00675438854928, 0.00393467104073, 0.00163333947632, 0.000207994449075, 0.0, 2.25149639359e-17, 6.24088375963e-18, 0.0, 0.0, 9.48161890733e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.19633383869e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.22853310424e-6, 1.32286582092e-7, 7.58913445096e-7, 1.7135235437e-19, 7.44929393284e-8, 3.20726813663e-7, 7.24226763506e-7, 1.540659735e-18, 7.41926615395e-7, 9.69051773543e-7 ] }, spectrum_data_point_t { xystar: [0.20116852684160416, 0.11296964824697227], uv: [9.683595703124999, 6.0], spectrum: [ 3.50368088116e-8, 2.61066157516e-8, 0.0, 7.44377472502e-20, 0.0, 7.07520478481e-19, 6.90149131282e-19, 1.21685292749e-19, 1.33504713127e-18, 1.87735433754e-18, 0.0, 1.78152944876e-19, 0.0, 3.88430161982e-20, 0.0, 0.0, 0.0, 5.80164643082e-19, 2.10312086999e-19, 2.65570806742e-19, 4.84365618936e-19, 3.3015524107e-19, 0.0, 0.000119387037252, 0.000503441613987, 0.00107329070153, 0.00176215729295, 0.00251025727997, 0.00326593949606, 0.00398869266936, 0.00465093560303, 0.0052332398227, 0.00572303485424, 0.00611530971875, 0.00640560085077, 0.00659490943399, 0.00668739929153, 0.00669119423993, 0.00661557640721, 0.006472103852, 0.0062767785039, 0.006042149305, 0.00578340380996, 0.00551424599057, 0.0052469010167, 0.00499273506686, 0.00475715981165, 0.00454577534381, 0.00436184951929, 0.00420448616812, 0.00407375814464, 0.00396729149397, 0.00388299134249, 0.00381864158515, 0.0037697999242, 0.00373390564058, 0.00370698174712, 0.00368705747989, 0.0036735155059, 0.00366428577758, 0.0036580732033, 0.00365338973172, 0.00364980971045, 0.00364674048075, 0.00364389140921, 0.00364179738781, 0.00364070559308, 0.00363994014195, 0.00363894663229, 0.0036386929704, 0.00363832716458, 0.00363760931287, 0.00363747068492, 0.00363718925509, 0.00363699472667, 0.0036367030429, 0.00363642700698, 0.00363626753744, 0.00363644346577, 0.00363612011681, 0.00363625132928 ] }, spectrum_data_point_t { xystar: [0.17994237858321024, 0.16945447237045844], uv: [9.294923828125, 7.0], spectrum: [ 6.02862078815e-19, 8.68441944075e-19, 2.34537007447e-18, 0.0, 6.27888418374e-19, 0.0, 5.56605679962e-19, 1.04109794558e-18, 0.0, 0.0, 2.34374100216e-18, 0.0, 5.70484153056e-19, 0.0, 2.78237008076e-18, 4.62135822211e-20, 1.66957933982e-19, 2.96979249044e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.000149248678795, 0.000740555938732, 0.00163274904059, 0.0026902164825, 0.00379936911097, 0.00487002184304, 0.00584723226955, 0.00669122778614, 0.00737496199289, 0.00788407758213, 0.00821154567685, 0.00835970541161, 0.00833614197692, 0.00815544234688, 0.007834581913, 0.00739962618903, 0.00687679127318, 0.00629061108964, 0.00567071943097, 0.00504283679456, 0.00443091157061, 0.00385404770005, 0.00332759959285, 0.00286091549551, 0.00245712882249, 0.00211763910917, 0.00183861642588, 0.00161210810556, 0.00143267383591, 0.00129397066179, 0.00118781909534, 0.00110852033669, 0.00105025283351, 0.00100855688042, 0.000978757508639, 0.000958004657367, 0.000942814797126, 0.00093192695595, 0.000924587454003, 0.000918680456024, 0.000914783301914, 0.000911779984036, 0.000909336716392, 0.000908011918495, 0.000906697118524, 0.000905992400369, 0.000905558269344, 0.000904815726833, 0.000904832853876, 0.000904501062485, 0.000904328001438, 0.000904560314264, 0.000904032100006, 0.000904508117066, 0.000904382369149, 0.00090430502962, 0.000904426242138 ] }, spectrum_data_point_t { xystar: [0.1638359986175532, 0.21181820078499514], uv: [9.0, 7.750001953125], spectrum: [ 1.25991328825e-18, 1.55218774116e-18, 4.17583700953e-18, 0.0, 6.53196676819e-20, 0.0, 1.11913171094e-17, 0.0, 1.00371323101e-17, 0.0, 0.0, 2.89446616167e-18, 0.0, 6.32754599791e-18, 1.1381263843e-18, 2.37424794065e-18, 3.47256108127e-18, 6.1012486253e-18, 0.0, 0.0, 0.0, 1.46546005436e-18, 1.14905371362e-18, 1.9472658127e-18, 8.03410470719e-20, 0.000475385486038, 0.00146797307899, 0.00276050711896, 0.0041629773546, 0.00553959000652, 0.00679881268906, 0.00787996505675, 0.00874005843762, 0.00934794288374, 0.00969762922548, 0.00979213669128, 0.00964470885532, 0.00927602344524, 0.00871397501467, 0.00799900654503, 0.00716918257672, 0.00626726781083, 0.00533829089081, 0.00441865077402, 0.00354354009044, 0.00274205514529, 0.00203424520111, 0.00143509098055, 0.000949260750661, 0.000573932592177, 0.000304674153089, 0.000127136800861, 2.91799003773e-5, 0.0, 0.0, 5.50079836257e-20, 0.0, 4.03526105304e-19, 2.54254006807e-19, 5.3686676338e-19, 5.68269304374e-19, 6.47334015871e-19, 4.85356536956e-19, 7.95502923817e-19, 7.54388718648e-19, 4.18948428437e-7, 5.79052898567e-19, 4.9509075767e-19, 4.76591474971e-7, 5.7619416237e-19, 4.15332233448e-7, 2.3353396124e-7, 4.98902405933e-19, 7.35928878591e-7, 1.68572566867e-7, 2.10064170919e-19, 8.74422623282e-7, 2.88485131765e-7, 1.57548128189e-19, 1.18154094349e-6, 5.66628300343e-7 ] }, spectrum_data_point_t { xystar: [0.2643669833395862, -0.056484824123486134], uv: [10.840822265625, 3.0], spectrum: [ 0.000197266690303, 0.000198152168969, 0.000200158671912, 0.000201993484934, 0.000202684086341, 0.000202951237512, 0.000203442197363, 0.000202646316007, 0.000198603015646, 0.000190734640024, 0.000179901709764, 0.000164986807702, 0.000146304692939, 0.000123941258487, 9.80771375313e-5, 7.03997162666e-5, 4.34858983975e-5, 2.10540600902e-5, 5.62013524649e-6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.48149903065e-5, 8.77217783064e-5, 0.000224106502557, 0.000426937663405, 0.000697374555392, 0.00103316482522, 0.00143087641527, 0.00188653745693, 0.00239456439959, 0.00294652468658, 0.00353376055151, 0.00414547904511, 0.004769805468, 0.0053950766636, 0.00600931123683, 0.00660156584368, 0.00715996278197, 0.00767572123742, 0.00814232099162, 0.00855543748198, 0.0089133441319, 0.00921702368003, 0.00946898720108, 0.00967416095561, 0.00983771874064, 0.00996543736158, 0.0100633512863, 0.0101369520928, 0.0101917054939, 0.0102321154905, 0.0102611300875, 0.0102815582846, 0.0102964161932, 0.0103067202694, 0.010314597233, 0.0103204197844, 0.010324052614, 0.0103264123852, 0.0103278697478, 0.0103286166586, 0.0103294487376, 0.0103296460324, 0.010329897046, 0.0103301779555, 0.0103300739557, 0.0103303483782, 0.010330610225, 0.0103304271712, 0.0103305283816, 0.0103303485414, 0.0103303692294, 0.0103304598938, 0.0103304557358, 0.0103305385195 ] }, spectrum_data_point_t { xystar: [0.24330083117359216, 0.0], uv: [10.455080078125, 4.0], spectrum: [ 2.61091875907e-5, 2.45148807571e-5, 2.13309194485e-5, 1.75006199267e-5, 1.33685310797e-5, 7.69899191129e-6, 3.39392244037e-6, 7.58607242128e-7, 2.11738148668e-7, 5.17161684891e-8, 0.0, 1.5366994319e-21, 1.92941609236e-21, 1.42887817516e-20, 0.0, 1.99132561581e-20, 3.93018315379e-6, 2.62943022815e-5, 6.63768995861e-5, 0.000122744584833, 0.000194352615969, 0.000282442535906, 0.000386641145667, 0.000501253315675, 0.000633701070245, 0.000784117491975, 0.000955833483923, 0.00115098128176, 0.0013681186745, 0.00161061735353, 0.00187890448042, 0.00217281903229, 0.00249148687179, 0.00283206074673, 0.00319177215103, 0.00356802178026, 0.0039550588609, 0.00435253307183, 0.00475144170296, 0.00514853440264, 0.00553585647432, 0.0059078528839, 0.00625971086764, 0.00658715931642, 0.00688587502847, 0.00715478267545, 0.00739088039123, 0.00759370588758, 0.00776622943861, 0.00790804059326, 0.00802352091482, 0.00811535273471, 0.00818749234729, 0.00824200685753, 0.00828262697081, 0.00831155643231, 0.00833310772056, 0.00834888418932, 0.00835980698664, 0.00836759118204, 0.0083729765562, 0.00837660219359, 0.00837888080868, 0.00838092396409, 0.00838218739949, 0.00838337978547, 0.00838458041727, 0.00838519519703, 0.00838591302841, 0.00838646324552, 0.00838686829778, 0.00838728540291, 0.00838749796865, 0.00838763612021, 0.00838798793896, 0.00838816576414, 0.00838835683372, 0.00838867412732, 0.00838876131718, 0.00838885746089, 0.00838884108449 ] }, spectrum_data_point_t { xystar: [0.22223467900759816, 0.056484824123486106], uv: [10.069337890625, 4.999999999999999], spectrum: [ 1.15245369929e-6, 9.62205469091e-7, 7.33539395123e-7, 3.92202380037e-7, 2.49548099144e-7, 6.62809605248e-8, 0.0, 1.10377923726e-19, 0.0, 8.46658585474e-20, 0.0, 0.0, 1.90029684359e-22, 1.36167834134e-19, 2.27945285961e-19, 5.94855375533e-20, 0.0, 0.0, 3.58243940574e-20, 2.50029741756e-20, 0.0, 3.66376143805e-5, 0.000207466083063, 0.000477091394478, 0.000815736511219, 0.00120181771987, 0.00162042210042, 0.00205529141596, 0.0024934826583, 0.00292001345618, 0.00332778936495, 0.00371213641288, 0.0040700891032, 0.00439619810132, 0.00469172063958, 0.00495258812946, 0.00518248480222, 0.00538059330468, 0.00554848129215, 0.00568880081819, 0.00580423314037, 0.00589841688165, 0.00597191835943, 0.00602936817431, 0.00607168893394, 0.0061035266168, 0.00612714275208, 0.00614321360763, 0.00615559287424, 0.00616397689129, 0.00616948538103, 0.00617394395678, 0.00617718871124, 0.00617863926894, 0.00618057502373, 0.00618213672607, 0.00618210805646, 0.00618223760933, 0.00618199790448, 0.00618102087895, 0.00618042267272, 0.00617968939389, 0.00617975444142, 0.00617989858915, 0.00617967913644, 0.00617944224954, 0.00617939580299, 0.00617918678318, 0.00617899757526, 0.00617899863369, 0.00617862299668, 0.00617836729145, 0.00617827992355, 0.00617797523226, 0.00617752443119, 0.00617743068767, 0.00617728515152, 0.0061767128634, 0.00617691971029, 0.00617662862058, 0.00617665313231 ] }, spectrum_data_point_t { xystar: [0.21844799815673765, 0.06663455128009714], uv: [10.0, 5.1796894531249995], spectrum: [ 4.14745397026e-7, 2.6406579284e-7, 1.32543140345e-8, 0.0, 2.75495565463e-19, 0.0, 2.70983577987e-19, 0.0, 1.77154247881e-20, 6.33183019564e-21, 3.98538652876e-19, 0.0, 0.0, 5.1335596135e-19, 0.0, 0.0, 5.6188777859e-20, 9.53086135943e-20, 0.0, 4.27380301912e-21, 0.0, 0.0, 0.000144432222291, 0.000417457882222, 0.000784922708878, 0.00121681885915, 0.00168727824607, 0.00217487417672, 0.00266226724035, 0.00313378141315, 0.00357803687254, 0.00398980010864, 0.00436381753161, 0.00469425024955, 0.00498234937385, 0.00522776844067, 0.00543186118725, 0.00559543268191, 0.0057226461721, 0.00581433841058, 0.0058759852019, 0.00591247721153, 0.00592868320681, 0.00592930404143, 0.00592011225973, 0.00590457268879, 0.00588635577304, 0.00586647115122, 0.00584701926815, 0.00582894366649, 0.00581342037123, 0.00579978906515, 0.00578920736767, 0.00578025916366, 0.00577239092841, 0.00576648803916, 0.00576153967446, 0.00575760922614, 0.00575633707961, 0.00575573049605, 0.00575431578051, 0.00575390730731, 0.00575350145022, 0.00575251029974, 0.00575230760153, 0.00575149890848, 0.00575041376758, 0.0057497177596, 0.00574895173949, 0.00574835165223, 0.00574766343335, 0.00574797937354, 0.00574887434323, 0.00574897964003, 0.00574930562132, 0.00574987114721, 0.00574990453568, 0.00574907920559, 0.0057492693093, 0.00574928483388, 0.00574896095856 ] }, spectrum_data_point_t { xystar: [0.3066059517331741, -0.1694544723704584], uv: [11.614259765625, 1.0], spectrum: [ 0.000448055179387, 0.000448111689116, 0.000447763932322, 0.000446467048857, 0.000444232548124, 0.000440260980813, 0.000432951124157, 0.000419162769014, 0.00039477850985, 0.000354098362627, 0.000291604158114, 0.000209597314334, 0.000118180638486, 3.80368407636e-5, 0.0, 0.0, 3.74640257717e-19, 0.0, 4.4722304919e-19, 0.0, 0.0, 6.83511926982e-19, 6.89487756518e-19, 1.40936532967e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 1.00612536347e-18, 0.0, 0.0, 1.45763898626e-18, 2.64802378963e-18, 6.15739066088e-19, 0.0, 4.9942949242e-19, 0.0, 0.0, 0.0, 0.0, 0.000719361878561, 0.00217933380534, 0.00414526243809, 0.00640272288636, 0.00876694380689, 0.0110874459866, 0.0132565694278, 0.0152030782577, 0.0168893978039, 0.0183091036733, 0.0194752536715, 0.0204093434852, 0.0211395436545, 0.0216981192036, 0.0221180406573, 0.0224272162135, 0.0226519026663, 0.0228145724589, 0.0229316754484, 0.0230151189971, 0.0230737956959, 0.0231151486631, 0.0231439670959, 0.0231644786995, 0.0231792678069, 0.0231894907254, 0.0231965410465, 0.0232017514248, 0.0232049688033, 0.0232071333853, 0.0232089167722, 0.0232099117811, 0.0232107733958, 0.0232113474929, 0.0232116643364, 0.0232118727112, 0.0232118449145, 0.0232120348202, 0.0232119499786, 0.0232118551746 ] }, spectrum_data_point_t { xystar: [0.28548646753638013, -0.11296964824697227], uv: [11.227541015625, 2.0], spectrum: [ 0.000250549602027, 0.000251452709583, 0.000251035319131, 0.000251943054287, 0.000253356039742, 0.000252561421046, 0.000252810777263, 0.000250887773992, 0.000248485473205, 0.000240406275936, 0.000224181770295, 0.000198124505456, 0.000164778686088, 0.000125295331646, 8.26336566789e-5, 4.20660201895e-5, 1.16170064803e-5, 3.64812680522e-20, 0.0, 6.64503738095e-20, 3.28898900598e-20, 1.09526564068e-19, 1.08270809735e-19, 9.36651261686e-20, 0.0, 0.0, 0.0, 0.0, 1.33087073689e-19, 0.0, 1.12462849073e-19, 0.0, 4.47598299087e-20, 7.29091486159e-21, 5.25636536023e-5, 0.000328468748266, 0.000806997405984, 0.00146270484608, 0.00226944272939, 0.00319417459694, 0.00420107028513, 0.0052568451724, 0.00632408175829, 0.00737057841626, 0.00836617000443, 0.00928929219789, 0.0101209441927, 0.0108522020281, 0.011480120857, 0.0120051038558, 0.0124352216198, 0.0127803214614, 0.0130523887267, 0.0132630343465, 0.0134227726385, 0.0135410111012, 0.0136261601491, 0.0136877818466, 0.0137330371035, 0.0137658147759, 0.013789171165, 0.0138048276006, 0.0138154722901, 0.0138233251254, 0.0138293686576, 0.0138336051554, 0.0138363546725, 0.0138380840147, 0.0138391997799, 0.0138397904444, 0.0138401579417, 0.0138401551041, 0.0138402280602, 0.0138404329634, 0.0138401161483, 0.0138394661719, 0.0138392315997, 0.0138392665857, 0.0138396501605, 0.0138388950849, 0.0138388370719 ] }, spectrum_data_point_t { xystar: [0.2730599976959221, -0.07970747840702072], uv: [11.0, 2.588869140625], spectrum: [ 0.000118565233311, 0.000123262040414, 0.000128919358877, 0.000139190956308, 0.000140326915506, 0.000157471454122, 0.000164553709047, 0.000182120311266, 0.000190177335556, 0.000189546102185, 0.000195127430367, 0.000182270437578, 0.000161461630374, 0.000136216617639, 0.00010589690497, 7.3536774755e-5, 4.47953376902e-5, 2.1127706825e-5, 6.14098886759e-20, 1.18165568349e-19, 1.50522700947e-19, 6.19343199438e-20, 1.13089071484e-19, 5.40449164441e-20, 9.98284769573e-20, 9.45989491016e-20, 6.39750717648e-20, 0.0, 0.0, 0.0, 9.72512544466e-6, 0.000129756423003, 0.000359526905722, 0.000692954002978, 0.00112094150231, 0.00163698486081, 0.00223516061296, 0.0028968306559, 0.00360977044185, 0.00435946901225, 0.00511963142006, 0.0058852465185, 0.00663261560781, 0.00734299364325, 0.00800844966575, 0.00861233980877, 0.00915233244937, 0.00961890929621, 0.010016391677, 0.0103459101367, 0.0106127431111, 0.0108310173006, 0.0110007794012, 0.0111327219081, 0.0112328513819, 0.0113046598165, 0.0113554850397, 0.0113932040434, 0.0114203543128, 0.0114412190468, 0.0114574135164, 0.0114679205428, 0.0114744459452, 0.0114788104756, 0.0114822299725, 0.0114841035555, 0.011485297945, 0.0114868723497, 0.0114878306557, 0.0114875512019, 0.0114882853944, 0.0114892791972, 0.0114878998915, 0.0114882732002, 0.0114890356065, 0.0114877882955, 0.0114880021172, 0.0114878653648, 0.0114876576551, 0.0114879115507, 0.0114882008427 ] }, spectrum_data_point_t { xystar: [-0.27837992110025134, -0.19769688443220146], uv: [0.9025869140625007, 0.5000000000000004], spectrum: [ 0.0104239281828, 0.0104239093013, 0.0104229471446, 0.0104211184481, 0.0104169564189, 0.010408216388, 0.0103929509585, 0.0103650252649, 0.0103148743768, 0.0102253950866, 0.010074312785, 0.00984414033678, 0.00952251077563, 0.0091031779513, 0.00858951154235, 0.00798611371659, 0.0073002158701, 0.00654543063713, 0.00573574655304, 0.00489253073012, 0.00404232472016, 0.00320927491592, 0.00241685966162, 0.00168918816507, 0.00105208067036, 0.000533318191267, 0.000169723536218, 0.0, 0.0, 2.05547286963e-19, 1.01246688419e-19, 0.0, 1.3423878586e-19, 0.0, 2.47380442251e-19, 0.0, 1.16821137258e-19, 0.0, 0.0, 1.19172225885e-19, 3.529192653e-20, 3.37005404328e-20, 0.0, 7.63534051944e-21, 0.0, 4.45847010194e-5, 0.000121839773594, 0.000215053284068, 0.000311612312683, 0.000402844751035, 0.000485504286605, 0.000556412386062, 0.000615387823003, 0.00066195958945, 0.000698421425605, 0.000727925927516, 0.00075035783929, 0.000765864509279, 0.000777051723653, 0.000785015438684, 0.000790608775099, 0.00079535055359, 0.000797696058588, 0.000797728962314, 0.000797930398981, 0.000798554947388, 0.000799046532587, 0.000800028470433, 0.000799954971347, 0.00079901501148, 0.000798881494173, 0.000799315881926, 0.000799565780648, 0.000799590722935, 0.000799529583795, 0.000799530247533, 0.000799107199109, 0.000798712733053, 0.000798422038851, 0.000798286255173, 0.000798186621819 ] }, spectrum_data_point_t { xystar: [0.29509948609003117, -0.1976968844322015], uv: [11.403564941406248, 0.5], spectrum: [ 0.00202603816895, 0.00202403245604, 0.00202007600043, 0.00201281260783, 0.00199987976248, 0.00197814511307, 0.00193686933683, 0.00186300688783, 0.00173373309939, 0.00151841612431, 0.00119451680024, 0.000777205571495, 0.000342882992414, 2.18585131267e-5, 0.0, 0.0, 0.0, 0.0, 1.02415054517e-17, 1.01536539658e-17, 1.19524346786e-17, 1.06557291661e-17, 0.0, 8.95060455358e-18, 1.19674666925e-17, 3.64006502636e-18, 1.20440200833e-18, 5.1700636838e-18, 0.0, 2.29924269662e-17, 0.0, 1.58561845174e-17, 7.57756747454e-18, 0.0, 0.0, 0.0, 4.79240253004e-18, 0.0, 3.53258656541e-18, 0.0, 1.66234562567e-18, 0.0, 1.08946097758e-18, 2.51275764394e-18, 4.65285657194e-18, 0.00199235898488, 0.0055726815377, 0.00993720590368, 0.0144975700138, 0.018859172437, 0.0227914499404, 0.0261822930656, 0.0289959240621, 0.0312539140942, 0.033014557628, 0.0343566350042, 0.0353585737046, 0.0360936554356, 0.0366264025905, 0.0370109591966, 0.0372868007575, 0.037480731712, 0.0376161240696, 0.0377130158091, 0.0377825055681, 0.0378310271749, 0.0378658632156, 0.0378888063078, 0.0379052001371, 0.0379166245115, 0.0379245071062, 0.0379296596166, 0.0379336508317, 0.0379356057728, 0.0379369372027, 0.0379382931141, 0.0379386614219, 0.0379395856283, 0.0379392066324, 0.0379397376926, 0.0379403418607 ] }, spectrum_data_point_t { xystar: [-0.2841797794497497, -0.14121206030871533], uv: [0.7963857421875007, 1.5], spectrum: [ 0.00628432809638, 0.00628485644276, 0.00628571579639, 0.00628729205915, 0.00629178668877, 0.00630159758807, 0.00631787002298, 0.00634579461141, 0.00639401596786, 0.00647672081292, 0.00661126442131, 0.0068064107176, 0.00705936463416, 0.00735894883271, 0.00768162405171, 0.00799681783528, 0.0082671122759, 0.00845105209757, 0.00851058063867, 0.00841611210741, 0.00814900399084, 0.00770319560397, 0.00708339224395, 0.00630702792456, 0.0053918736992, 0.00436329447628, 0.00326102882011, 0.0021488987035, 0.00113528214777, 0.000361717222617, 1.0264905558e-18, 1.93668452079e-18, 0.0, 8.44920321304e-19, 2.35231843066e-20, 4.7753076814e-19, 1.53635208407e-18, 1.06725833199e-18, 0.0, 0.0, 5.10557869414e-19, 0.0, 0.0, 0.0, 5.87712433658e-18, 1.83197370939e-18, 1.24019885473e-18, 2.46747966784e-18, 2.71768790479e-18, 2.40252753623e-18, 0.0, 2.12063487708e-18, 7.54881276926e-19, 0.0, 2.003172608e-19, 0.0, 0.0, 2.32555013113e-19, 0.0, 0.0, 2.40088727814e-19, 5.35762943763e-20, 1.20849244774e-19, 7.73259704349e-20, 3.59009267938e-19, 1.50120540917e-19, 5.30257254457e-20, 0.0, 0.0, 2.28063621048e-19, 6.69156028331e-20, 5.12228686942e-20, 2.69304961117e-19, 3.91276282072e-19, 8.92560968169e-19, 5.1838416372e-19, 2.99849663328e-19, 1.66214413328e-7, 0.0, 2.4055735702e-19, 6.2139423229e-8 ] }, spectrum_data_point_t { xystar: [0.28455310366534964, -0.14121206030871533], uv: [11.2104501953125, 1.5], spectrum: [ 0.00061168578911, 0.000611388358419, 0.000613327629482, 0.000615241332934, 0.000617636141757, 0.000619479482398, 0.000620039116978, 0.000618678698867, 0.000611730662792, 0.000587932550076, 0.000551990186117, 0.000493798688772, 0.000413022101087, 0.000321884859896, 0.000219647275369, 0.000119744078958, 4.2075357895e-5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.62463103768e-20, 2.4742769796e-19, 2.80998930815e-19, 2.06585776493e-19, 0.0, 1.16890215176e-19, 0.0, 3.93228171495e-19, 2.29114683494e-19, 4.18108437463e-19, 4.56428557146e-19, 0.0, 0.0, 0.0, 0.000111855929556, 0.000619107207326, 0.00144776237315, 0.00254093636305, 0.00382753952878, 0.00522551767313, 0.00666767903981, 0.00809458055253, 0.00945624381695, 0.0107068686378, 0.0118248546796, 0.0127970826411, 0.0136162785903, 0.0142929632984, 0.0148409834083, 0.0152752750056, 0.0156113990122, 0.0158658090268, 0.0160562549776, 0.0161966265002, 0.0162980844999, 0.0163714360797, 0.0164233367231, 0.0164611575073, 0.0164881179952, 0.0165073719261, 0.0165211747086, 0.0165305481645, 0.0165363859483, 0.0165404483045, 0.0165431889098, 0.0165447766755, 0.0165460649647, 0.016546892921, 0.0165477585326, 0.0165485879385, 0.0165485931888, 0.0165489554011, 0.0165487661503, 0.0165494749914, 0.0165496786678, 0.016549860804, 0.0165502033349, 0.0165498362918 ] }, spectrum_data_point_t { xystar: [-0.2836064601186499, -0.0847272361852292], uv: [0.8068837890625007, 2.5], spectrum: [ 0.0, 3.94809627166e-18, 3.02699515885e-18, 2.17149279486e-18, 0.0, 0.0, 7.6271275878e-21, 2.66467507353e-18, 3.30558065903e-18, 0.000111068415549, 0.000555692036095, 0.0014090663424, 0.00268804719301, 0.00435479163993, 0.00631341410395, 0.00843497006169, 0.0105477516672, 0.0124582767358, 0.0139851163365, 0.0149790597822, 0.0153444876279, 0.0150424407853, 0.0140773946108, 0.0125083244581, 0.0104227528833, 0.00794384520377, 0.00525814732927, 0.00268691471403, 0.000714062213391, 0.0, 2.9151186855e-19, 0.0, 9.20456545404e-19, 6.32164411287e-18, 2.8996929534e-18, 3.24382839127e-18, 0.0, 7.55865094739e-18, 4.59959782125e-18, 2.55186210695e-18, 2.32345402355e-18, 0.0, 0.0, 0.0, 0.0, 7.81009093921e-18, 2.84338642649e-18, 1.15561073346e-17, 3.88932860562e-18, 1.16513639743e-17, 3.75720181218e-18, 7.96441876388e-19, 4.15830994252e-18, 0.0, 0.0, 0.0, 0.0, 7.81398551357e-19, 0.0, 2.0868446057e-19, 1.38585373884e-19, 0.0, 2.63419148966e-19, 0.0, 0.0, 1.75820027074e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [0.24947659500898114, -0.08372328462958752], uv: [10.568164453125, 2.5177738281249997], spectrum: [ 0.000752303150972, 0.000751456115099, 0.000751035637707, 0.000750179301397, 0.000747828322906, 0.000745257809108, 0.000741344422098, 0.000735917512662, 0.000726382278368, 0.000711889436019, 0.000687801510296, 0.000653729599782, 0.000606037169972, 0.000546898964558, 0.000476982007756, 0.000399444641529, 0.000317184415035, 0.000234230143908, 0.000155349859027, 8.69619110553e-5, 3.5073840106e-5, 3.53500195796e-6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.18139317575e-20, 2.34827716577e-20, 2.75645830151e-5, 0.000156344487784, 0.000384694991594, 0.000709784218776, 0.00112579649752, 0.00162477292269, 0.0021966748174, 0.00282800560565, 0.00350526243252, 0.00421374599292, 0.00493776094158, 0.00565989320097, 0.00636421462851, 0.00703491709098, 0.0076592244585, 0.00822833161981, 0.00873443375859, 0.00917506233502, 0.00954929929845, 0.00986077771228, 0.0101145915146, 0.0103177823394, 0.010477342052, 0.0106000016092, 0.0106924994993, 0.0107609817433, 0.0108109707158, 0.0108472063131, 0.0108732191221, 0.0108911621871, 0.0109040667093, 0.0109129889531, 0.0109189299024, 0.0109233139571, 0.0109267050423, 0.0109291390504, 0.0109307338737, 0.0109320766972, 0.0109330123631, 0.010933823782, 0.0109343381271, 0.0109346626673, 0.0109349196971, 0.010935015115, 0.0109349580342, 0.0109347746162, 0.0109346520556, 0.0109344422283, 0.0109343426886, 0.0109342433988, 0.0109342172561 ] }, spectrum_data_point_t { xystar: [0.2772021543094081, -0.10188225830032176], uv: [11.075847005208333, 2.196289713541667], spectrum: [ 0.000358595883835, 0.000358136654626, 0.000357147902036, 0.000356617878124, 0.000355719270239, 0.000354163201973, 0.000352286992504, 0.00035002619395, 0.000343982638754, 0.000331249374502, 0.000311894967909, 0.00028431972171, 0.000245906684169, 0.000198756537478, 0.000148457169262, 0.000100677501953, 5.49731457986e-5, 1.87737833635e-5, 3.453926489e-20, 2.57985631011e-21, 1.34691964862e-19, 0.0, 1.71853904884e-19, 5.86343663743e-20, 1.47942985084e-19, 2.37339839612e-19, 3.33867623516e-19, 9.69812164142e-20, 0.0, 0.0, 3.01100353513e-19, 1.67915999764e-19, 0.0, 9.86819250572e-5, 0.000362758815861, 0.000787514989029, 0.00135025276354, 0.00203749021394, 0.00282292036392, 0.00368283254374, 0.00459693070347, 0.00553234140117, 0.0064625570474, 0.00736365913062, 0.00821467396964, 0.00899667286052, 0.00969824301379, 0.0103101556098, 0.0108324475101, 0.0112698337638, 0.0116251924829, 0.01190980112, 0.0121330897322, 0.0123073493895, 0.0124389487782, 0.0125367914282, 0.0126106147833, 0.0126632186827, 0.0127017459994, 0.0127297043156, 0.0127494833486, 0.0127620632374, 0.0127714438172, 0.0127777787991, 0.0127818962192, 0.0127842524222, 0.0127860709515, 0.0127867562672, 0.0127870539959, 0.0127874290906, 0.0127872376033, 0.0127873448076, 0.0127878776929, 0.0127875851096, 0.0127879490375, 0.0127876578295, 0.0127879611665, 0.0127883219496, 0.0127885174689, 0.012788998643, 0.0127891146099 ] }, spectrum_data_point_t { xystar: [-0.28080652850165067, -0.028242412061743067], uv: [0.8581533203125007, 3.5], spectrum: [ 0.0, 0.0, 0.0, 0.0, 0.0, 1.03905484239e-17, 2.52200600561e-18, 0.0, 0.0, 0.0, 1.41670588112e-18, 0.0, 4.5002581257e-18, 0.0, 0.000742413333543, 0.00348969793744, 0.00762659958119, 0.012418656254, 0.0171073331756, 0.0209814252783, 0.0235150602453, 0.0243994054981, 0.0235076122298, 0.0209452708732, 0.0169587847365, 0.0119595684164, 0.00661105458348, 0.00204151894314, 0.0, 0.0, 0.0, 0.0, 4.68967262573e-18, 1.62189714791e-17, 0.0, 0.0, 2.10645102638e-17, 7.47702732521e-18, 1.82274150802e-17, 2.50777549836e-17, 4.10244944262e-18, 0.0, 7.72763743982e-19, 0.0, 1.30240876472e-17, 3.42162051697e-17, 4.68744716196e-18, 0.0, 4.6445437645e-17, 0.0, 2.81172855514e-17, 0.0, 1.75918940592e-17, 0.0, 0.0, 0.0, 8.68507639257e-18, 6.085151361e-18, 0.0, 4.07438727531e-18, 1.61203657002e-19, 0.0, 0.0, 0.0, 0.0, 1.60877592671e-18, 2.97809586842e-18, 6.10163294179e-19, 2.52673430511e-19, 1.84695888253e-18, 3.34459284765e-18, 3.35066269943e-18, 2.91004688899e-18, 1.89829556874e-18, 3.8902047515e-18, 0.0, 0.0, 0.0, 2.34354257907e-20, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [0.2361409527066634, -0.028242412061743067], uv: [10.3239755859375, 3.5], spectrum: [ 0.000422675476941, 0.000422108207641, 0.000420755723936, 0.000419493177081, 0.000416731579472, 0.000412052238997, 0.000408581824492, 0.000403584801514, 0.000397478228573, 0.000389983475625, 0.000379647897349, 0.000365388411384, 0.000348374190835, 0.00032756809369, 0.000303358071464, 0.000278591866108, 0.000254675537217, 0.000233343570976, 0.000214804811719, 0.000202032800285, 0.000197118526265, 0.000204448657043, 0.000226528251958, 0.00026268449046, 0.000317902691239, 0.000393807861407, 0.000495917480694, 0.000628775139543, 0.000796123284222, 0.00100252808788, 0.00124862630972, 0.00153480725621, 0.00185923579138, 0.00221806903148, 0.00260903510467, 0.00302829596251, 0.00346986476441, 0.00392815927198, 0.00439615475303, 0.00486681158281, 0.00533216480308, 0.00578435117732, 0.00621690521278, 0.00662314756107, 0.0069958983748, 0.00733168700041, 0.0076284433092, 0.00788378936149, 0.00809913141202, 0.00827702372775, 0.00842094314075, 0.00853620430526, 0.008626004853, 0.00869511369428, 0.00874760124817, 0.00878756530691, 0.00881646747115, 0.00883703713124, 0.00885230602343, 0.00886313107718, 0.00887000169776, 0.00887488156119, 0.00887831727617, 0.00888042890482, 0.00888164394655, 0.00888222971367, 0.008882952011, 0.00888337591855, 0.0088836627569, 0.00888349960944, 0.00888367089236, 0.00888337577171, 0.00888324545732, 0.00888351763733, 0.00888289266708, 0.0088829691338, 0.00888297250303, 0.00888313844468, 0.00888297711787, 0.0088830202079, 0.0088829905212 ] }, spectrum_data_point_t { xystar: [-0.27637996994525194, 0.028242412061743053], uv: [0.9392080078125007, 4.5], spectrum: [ 0.0, 1.62782010939e-17, 0.0, 0.0, 1.18099882308e-17, 0.0, 1.03793225146e-18, 0.0, 0.0, 2.32974588978e-17, 1.65685757543e-17, 0.0, 1.60319161671e-18, 0.0, 0.0, 0.0, 6.35189851361e-17, 0.00416838400449, 0.0131513287851, 0.0233835543041, 0.0320273655621, 0.0371658612996, 0.0377135879972, 0.0336703917765, 0.0257510940043, 0.0154519258439, 0.00537470904257, 0.0, 2.02985312349e-18, 5.1210815568e-17, 0.0, 0.0, 0.0, 2.99226733637e-17, 5.0054823244e-17, 4.63171287601e-17, 4.35394960715e-17, 5.36527081047e-17, 0.0, 0.0, 5.63187072993e-18, 5.11501429198e-17, 0.0, 1.75578901584e-16, 0.0, 7.33221006647e-18, 2.82872426985e-16, 0.0, 1.38037253533e-16, 4.25354817307e-17, 2.3883157815e-17, 0.0, 0.0, 5.72387607076e-17, 2.13359862942e-17, 5.46425178445e-18, 4.98793868261e-17, 1.67913900667e-18, 2.34774698486e-17, 0.0, 8.46999961289e-18, 2.01953274217e-17, 1.03834782653e-17, 1.42715524626e-18, 4.70207459287e-18, 0.0, 3.85404896879e-18, 5.67376148605e-18, 0.0, 0.0, 0.0, 0.0, 2.79282500729e-18, 6.19602475011e-18, 1.02577869928e-17, 1.17746344909e-19, 0.0, 0.0, 3.70647133437e-18, 7.2431504743e-18, 2.03864872474e-18 ] }, spectrum_data_point_t { xystar: [0.2256078766236664, 0.028242412061743053], uv: [10.1311044921875, 4.5], spectrum: [ 3.56822771849e-6, 3.28535339104e-6, 3.46459065097e-6, 3.23413499301e-6, 2.09478448538e-6, 6.76952524611e-7, 3.60338079119e-8, 0.0, 0.0, 1.78724906014e-21, 9.05418544163e-21, 2.8362742546e-22, 2.27772384505e-20, 0.0, 0.0, 1.94291012302e-20, 2.98116715124e-5, 9.25724191243e-5, 0.000187303685197, 0.000306767381721, 0.000450990643083, 0.000612991359464, 0.000791233597256, 0.000982838759525, 0.00118631701779, 0.00140223850396, 0.00162740935805, 0.00186368709263, 0.0021121000246, 0.00236987934724, 0.00263738143968, 0.00291354934657, 0.00319827542284, 0.00348808166506, 0.00378125685508, 0.00407726845996, 0.00437213180057, 0.00466434476539, 0.00495089917922, 0.00522813950758, 0.00549335824092, 0.00574411849873, 0.00597766609531, 0.00619237131576, 0.00638691072167, 0.00655992162656, 0.00671138413008, 0.00684147797815, 0.00695113830262, 0.00704170019385, 0.00711454548749, 0.00717303206736, 0.00721839616562, 0.00725322885894, 0.00727870243206, 0.00729660816371, 0.00730926134828, 0.00731826789221, 0.00732424221034, 0.00732813461069, 0.00733059582607, 0.00733238506714, 0.00733418627978, 0.00733493423057, 0.00733582575091, 0.0073366122451, 0.00733753879191, 0.00733776574005, 0.00733865296276, 0.00733955925629, 0.007340117399, 0.00734018101016, 0.00734021767528, 0.00734066264857, 0.00734023952901, 0.00734042841943, 0.00734029824306, 0.00734003290058, 0.00734009248939, 0.00733997425641, 0.00733986631081 ] }, spectrum_data_point_t { xystar: [-0.27348668949700916, 0.05872807331382255], uv: [0.9921868489583341, 5.039714192708333], spectrum: [ 2.44113460454e-17, 0.0, 0.0, 3.55265263486e-18, 0.0, 1.12067147207e-18, 0.0, 2.64812602344e-17, 0.0, 1.124394965e-17, 1.72841406419e-16, 5.6334814203e-17, 4.41460939176e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00482114341753, 0.0190097407467, 0.0345922844069, 0.0458910272793, 0.0493836127166, 0.0443789867593, 0.0321076562599, 0.0158344620622, 0.00160099595098, 0.0, 4.95964018682e-17, 3.6542527507e-17, 0.0, 0.0, 2.27976665718e-16, 0.0, 8.968619849e-17, 6.95136060138e-17, 0.0, 0.0, 2.22111338683e-16, 0.0, 0.0, 6.87590478109e-16, 0.0, 3.35408269012e-16, 5.08701717706e-16, 0.0, 1.1587462913e-16, 0.0, 0.0, 2.15042331923e-16, 0.0, 5.99814515245e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.22079176272e-17, 3.77118404989e-18, 0.0, 0.0, 0.0, 4.63396217674e-18, 4.33037048797e-18, 1.89378577264e-17, 0.0, 0.0, 3.02095785665e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.2489539411071413, 0.08042470328708243], uv: [1.441405859375, 5.423828515624999], spectrum: [ 0.0, 0.0, 0.0, 0.0, 9.12713508213e-19, 0.0, 0.0, 1.99421385301e-19, 0.0, 0.0, 1.84422225597e-18, 0.0, 7.54212691991e-19, 0.0, 1.53554118497e-18, 0.00151073543639, 0.00450490091926, 0.008482993115, 0.012896669955, 0.0171671514551, 0.0208113349644, 0.0234654054327, 0.0248762269414, 0.0249227678097, 0.0235519535324, 0.0207807358377, 0.0167228681884, 0.0117389060147, 0.00652576437705, 0.00214923152153, 0.0, 0.0, 3.71128472563e-18, 0.0, 1.25674422066e-17, 0.0, 2.87314872693e-17, 9.47517482423e-18, 2.7478802935e-17, 2.97170013013e-17, 0.0, 0.0, 0.0, 5.21164120456e-18, 0.0, 1.33735423557e-17, 3.64317892689e-18, 0.0, 3.83205909411e-17, 4.97468528582e-19, 5.4047555843e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.65317357529e-18, 9.17240039857e-19, 6.31868632858e-19, 9.82370784106e-19, 2.52716876647e-18, 7.54116704491e-19, 1.03706340135e-18, 5.84678012374e-19, 0.0, 0.0, 1.62536998505e-18, 8.61378232776e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [0.19314730407803718, 0.08110869920420279], uv: [9.536719140625, 5.4359378906249995], spectrum: [ 4.79286979596e-7, 4.46521825788e-7, 2.99223083087e-7, 1.11783605605e-7, 0.0, 6.28775257147e-21, 0.0, 0.0, 0.0, 2.10997600259e-20, 5.06846960705e-20, 0.0, 0.0, 0.0, 0.0, 8.95766203389e-7, 6.80861166029e-5, 0.000200502664505, 0.000388918609223, 0.000625218865231, 0.000899592791724, 0.00120178807441, 0.00152283258162, 0.0018553020836, 0.00219409802072, 0.0025325784328, 0.002866626155, 0.00319103552929, 0.00350133362405, 0.00379205139792, 0.00406123771418, 0.00430644706028, 0.0045260498583, 0.00472068756607, 0.00489016031345, 0.00503510594858, 0.00515489419286, 0.00525199995499, 0.00532796586272, 0.0053840726922, 0.00542382438126, 0.00544946836135, 0.00546387257781, 0.00546942768054, 0.00546815709723, 0.00546139744381, 0.00545285567053, 0.00544325508505, 0.00543333004013, 0.00542431998126, 0.00541568667676, 0.00540883405426, 0.00540373719161, 0.00539915930357, 0.00539607514366, 0.00539416971331, 0.00539227405056, 0.00539099131333, 0.005389907946, 0.00538878176491, 0.00538801149523, 0.00538744788875, 0.0053875040432, 0.00538710673839, 0.00538681370397, 0.00538684377415, 0.00538674351413, 0.00538676334072, 0.00538667216733, 0.00538658012229, 0.00538671885963, 0.00538636408309, 0.00538599483529, 0.00538582339257, 0.00538555369455, 0.00538584338772, 0.00538532501754, 0.0053851033934, 0.00538480329743, 0.00538449505942, 0.00538461199443 ] }, spectrum_data_point_t { xystar: [0.2197102251070245, 0.05986806650902312], uv: [10.023112630208333, 5.059896484375], spectrum: [ 2.9726370987e-6, 2.10185099262e-6, 1.50938270532e-6, 7.66841661172e-7, 3.13079954619e-7, 6.50129467434e-20, 0.0, 0.0, 1.52673830577e-19, 0.0, 1.09904462481e-19, 0.0, 0.0, 0.0, 0.0, 4.53516059772e-20, 2.84911034655e-19, 1.40041211603e-19, 0.0, 1.4967243856e-20, 0.0, 0.000120700984084, 0.0003453991763, 0.000644009762968, 0.000996175133115, 0.00138676099201, 0.00179955464307, 0.00221916885181, 0.00263682500299, 0.00304299378117, 0.00343083320797, 0.00379485918909, 0.00413271817456, 0.00444041835384, 0.00471784076755, 0.00496408782439, 0.00517916119572, 0.00536684780006, 0.00552413367066, 0.00565537296934, 0.0057630943374, 0.00584848934344, 0.00591657442715, 0.00596768373325, 0.00600706461198, 0.00603752905902, 0.00605943064913, 0.00607504710419, 0.00608573349947, 0.00609424518234, 0.00609923828802, 0.0061034300974, 0.00610660606482, 0.00610676370427, 0.0061068788204, 0.00610721819996, 0.00610767941899, 0.00610793181374, 0.00610783209325, 0.0061080462127, 0.00610875519837, 0.00610743279431, 0.0061067291821, 0.00610658027906, 0.00610574400508, 0.00610535333693, 0.00610462580558, 0.00610446732049, 0.00610408708307, 0.00610342794756, 0.00610347715537, 0.0061029550209, 0.00610260885136, 0.00610232408282, 0.00610206634736, 0.00610198984901, 0.00610165091713, 0.0061013801542, 0.0061008858311, 0.00610095918613, 0.0061004590366 ] }, spectrum_data_point_t { xystar: [-0.2365542759453633, 0.14121206030871536], uv: [1.6684560546875007, 6.5], spectrum: [ 5.44188461488e-18, 1.26529925677e-17, 1.1949402695e-17, 1.08961043637e-17, 0.0, 0.0, 0.0, 4.78284367836e-19, 7.35449686716e-18, 3.30439980732e-18, 1.52922501725e-18, 0.0, 0.0, 0.0, 8.36513538545e-18, 0.0, 0.000436219914947, 0.00399555564422, 0.00957857760789, 0.0159568363483, 0.0220635132764, 0.0270613672829, 0.0303362397401, 0.0315495799939, 0.0305138624785, 0.0271914144067, 0.0217416560727, 0.0147601569587, 0.00745717581835, 0.00171438572147, 0.0, 0.0, 2.05656257207e-17, 7.02685346587e-18, 0.0, 0.0, 0.0, 1.7242137684e-17, 5.70146382433e-18, 0.0, 2.94716490339e-17, 7.62115925321e-18, 0.0, 1.73966272367e-17, 3.51204619184e-17, 3.80777984231e-17, 0.0, 1.02054361413e-17, 0.0, 0.0, 1.45932175301e-17, 0.0, 0.0, 0.0, 6.62827718194e-18, 1.0383911796e-17, 1.81935629418e-18, 0.0, 1.02637504904e-18, 0.0, 2.11710587482e-18, 3.69776000207e-19, 4.42708905839e-19, 1.07314924371e-18, 3.64734455341e-18, 0.0, 5.33469640003e-18, 2.25935552658e-18, 5.16738091197e-18, 5.16335372555e-18, 4.79792942913e-18, 8.0817497964e-18, 2.61614142321e-18, 1.53409039825e-18, 2.935704131e-18, 4.43930885586e-18, 5.15587165821e-18, 4.35160663999e-18, 6.46467730251e-18, 9.39222615617e-18, 1.0424954829e-17 ] }, spectrum_data_point_t { xystar: [0.1771957256649802, 0.14121206030871536], uv: [9.2446298828125, 6.5], spectrum: [ 1.80913947623e-6, 1.26854734392e-6, 9.30529052092e-7, 2.88281153356e-7, 4.24884300322e-19, 0.0, 0.0, 0.0, 0.0, 4.74823410911e-19, 0.0, 1.25688477822e-19, 0.0, 0.0, 0.0, 8.76271769087e-20, 2.27283515817e-20, 1.80506685191e-20, 0.0, 6.67714463269e-5, 0.000324141830579, 0.000722343445089, 0.00121854399859, 0.00178000157555, 0.0023811199909, 0.00299486586087, 0.00360237049854, 0.00418372249665, 0.0047220693487, 0.0052002800617, 0.00560955173595, 0.00594357465679, 0.00619911123069, 0.00637556892061, 0.00647387282169, 0.0064976151736, 0.00645169755833, 0.00634521276402, 0.00618656641839, 0.00598265271636, 0.00574834803417, 0.00549136190308, 0.00522147451528, 0.00495309658835, 0.00469241315744, 0.00444868213332, 0.00422707340787, 0.00403002670269, 0.00385970647372, 0.00371361505597, 0.00359533563833, 0.00350049352596, 0.00342470559355, 0.00336600023703, 0.0033206584701, 0.00328756673851, 0.00326343297669, 0.00324592003785, 0.00323281957026, 0.00322342164438, 0.0032174480003, 0.00321336354506, 0.00321007632489, 0.00320747269641, 0.00320589575507, 0.00320426215322, 0.00320276961645, 0.00320195423677, 0.00320093821711, 0.00320001443213, 0.00319997456505, 0.00319925062551, 0.00319886221595, 0.00319887687527, 0.00319857320185, 0.00319847565903, 0.00319827327387, 0.00319828753023, 0.00319815388279, 0.00319838867105, 0.003198331053 ] }, spectrum_data_point_t { xystar: [-0.2289411285486655, 0.1976968844322015], uv: [1.8078603515624998, 7.5], spectrum: [ 1.44282289301e-17, 0.0, 0.0, 8.65701283388e-17, 0.0, 0.0, 0.0, 3.28271605947e-17, 0.0, 4.39405548661e-18, 0.0, 0.0, 4.11639235029e-17, 4.07787410885e-17, 0.0, 3.08656297397e-19, 3.02936355368e-17, 0.0, 0.00132485859169, 0.00955680871733, 0.0207157532139, 0.0315959819512, 0.0397879503046, 0.0438998167667, 0.043168436147, 0.0374421884081, 0.027300141317, 0.0147241852945, 0.00362439930526, 0.0, 6.73246840079e-17, 0.0, 0.0, 0.0, 4.22363469916e-17, 6.64539259184e-17, 3.01801949345e-17, 1.07889836121e-16, 0.0, 0.0, 0.0, 1.1979043399e-16, 0.0, 0.0, 1.79775083887e-16, 0.0, 7.11000644605e-17, 0.0, 0.0, 0.0, 1.44067387889e-16, 0.0, 3.62978529874e-17, 0.0, 3.03108135165e-17, 0.0, 0.0, 7.16407908708e-18, 4.96784891896e-18, 0.0, 0.0, 7.53891130709e-19, 0.0, 6.65682164036e-18, 3.37602685924e-18, 6.76169504924e-19, 2.34647922769e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.28850078495e-18, 3.99074961775e-18, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [0.14090324670637208, 0.20052114770276025], uv: [8.580078515624999, 7.550000390625001], spectrum: [ 1.5901864328e-6, 3.17164797282e-7, 4.69701640619e-7, 1.33101485698e-20, 0.0, 0.0, 0.0, 0.0, 6.47957060658e-20, 3.76743538766e-19, 0.0, 7.61345095506e-20, 1.18036418491e-19, 0.0, 2.91458586065e-19, 0.0, 0.0, 0.0, 0.000105641555067, 0.000424639837621, 0.000910410160789, 0.00151463800537, 0.00219588848271, 0.00292167644086, 0.00366464808519, 0.00440011603675, 0.00510532201929, 0.00575859233034, 0.0063375764386, 0.00682436735294, 0.00720810253951, 0.00748536294964, 0.00765189893022, 0.00770797569231, 0.00765785998305, 0.00750693343932, 0.00726417138078, 0.0069417528939, 0.00655207919317, 0.0061101611907, 0.00563194054096, 0.00513334946955, 0.00463084566089, 0.0041398716853, 0.00367129145778, 0.00323679309015, 0.0028449686056, 0.00250021771185, 0.00220286531906, 0.00195414209329, 0.00175036299464, 0.00158619207023, 0.00145709715925, 0.00135765045608, 0.00128315236153, 0.00122855743814, 0.00118837743458, 0.00115967326537, 0.00113930262722, 0.00112480266888, 0.00111428843206, 0.00110659456747, 0.00110049130828, 0.00109622081055, 0.00109343398133, 0.00109046436037, 0.00108808041843, 0.00108717877226, 0.00108592325984, 0.00108512468077, 0.00108462963925, 0.00108409642757, 0.00108381802199, 0.0010831974599, 0.00108241882262, 0.00108179531492, 0.0010810585339, 0.00108084896474, 0.00108064838418, 0.00108029696837, 0.00108047975349 ] }, spectrum_data_point_t { xystar: [0.1692047919394389, 0.183575715175304], uv: [9.098307942708333, 7.250000651041667], spectrum: [ 0.0, 0.0, 1.20389380979e-19, 0.0, 5.51476977449e-19, 1.07165364637e-18, 0.0, 1.19244705078e-18, 0.0, 3.09275001802e-19, 0.0, 3.77342329279e-19, 9.88928817581e-20, 0.0, 0.0, 0.0, 1.56165820098e-18, 0.0, 6.14696999574e-19, 0.0, 1.80133868371e-19, 1.86127239512e-19, 0.000128590532217, 0.000598134182674, 0.00130273958172, 0.00216027033064, 0.00310326964769, 0.00406706601025, 0.00499062045874, 0.00582826383141, 0.00655346080557, 0.007147659001, 0.00759917820367, 0.00789939232473, 0.00804885699682, 0.00805561628696, 0.00792813834688, 0.00768017850784, 0.00732766475966, 0.00688761913844, 0.00638363866701, 0.00583724277804, 0.0052700113843, 0.00470494650379, 0.00416077073098, 0.00365162626752, 0.00318825337313, 0.00277842613561, 0.0024255221369, 0.00212938171545, 0.00188781802547, 0.00169247238182, 0.00153611290172, 0.00141463012305, 0.00132249218056, 0.00125364276506, 0.00120377443182, 0.00116736177781, 0.0011400990554, 0.00112123116723, 0.00110847883893, 0.0010996647689, 0.00109304791818, 0.00108777297019, 0.00108360531727, 0.00108046488071, 0.00107845449886, 0.0010768712855, 0.00107577231459, 0.00107517651518, 0.00107431464886, 0.00107352546329, 0.00107337015523, 0.00107267997038, 0.00107230566623, 0.00107229472508, 0.00107203085497, 0.00107170081206, 0.00107114305081, 0.00107081022417, 0.00107083850779 ] }, spectrum_data_point_t { xystar: [-0.22273237351902372, 0.2393618337920543], uv: [1.9215488281249993, 8.237630859375], spectrum: [ 0.0, 0.0, 0.0, 4.94554227559e-17, 2.46906963833e-19, 0.0, 0.0, 6.03850122437e-17, 8.05283157717e-17, 9.30687695604e-17, 0.0, 0.0, 2.58851235384e-17, 2.40014241846e-17, 0.0, 1.11590531137e-17, 2.73269487897e-17, 3.23805580555e-17, 0.0, 0.0, 0.0117854464603, 0.0301931703029, 0.0469217960641, 0.0570083987806, 0.0577075840058, 0.0483658403969, 0.0307485120478, 0.0107565110327, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.65676416919e-16, 1.7878365547e-16, 0.0, 1.68549712547e-16, 3.28589388356e-16, 2.54857533697e-16, 0.0, 4.96578334366e-16, 1.77858203427e-16, 0.0, 0.0, 0.0, 1.04324144144e-16, 0.0, 0.0, 1.08272437594e-16, 0.0, 1.5889679549e-16, 2.93723508073e-16, 1.70892197557e-16, 1.29281087105e-16, 2.12318333764e-17, 0.0, 1.03846905665e-16, 0.0, 0.0, 1.61502866592e-17, 4.00068641356e-18, 3.30085688909e-17, 0.0, 0.0, 0.0, 2.44188236793e-18, 2.04173132788e-17, 1.89775813742e-17, 1.14922168207e-17, 5.23964226715e-17, 0.0, 4.1784919608e-17, 4.43792133801e-17, 2.83244361889e-17, 4.63155043685e-18, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.19555791187019658, 0.25658674852220487], uv: [2.419140234374999, 8.542578515625], spectrum: [ 2.30266772318e-17, 6.64318453347e-18, 0.0, 0.0, 9.83805947592e-19, 0.0, 0.0, 0.0, 0.0, 1.61232761768e-17, 8.70682910321e-19, 2.57930627017e-18, 1.57560807526e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00327880875082, 0.00925214559275, 0.0163956775009, 0.0234294467744, 0.0293388409381, 0.0334319574341, 0.0352035518563, 0.0343091217496, 0.0305804220486, 0.0242644094387, 0.0162001823665, 0.00792228307174, 0.00161628012678, 0.0, 5.40372445955e-18, 0.0, 2.65697991288e-17, 0.0, 0.0, 0.0, 6.48064308497e-17, 3.08548459088e-17, 1.82212675149e-17, 0.0, 0.0, 0.0, 0.0, 5.21348351828e-17, 4.59198633338e-17, 8.79053816212e-18, 1.31863381152e-17, 0.0, 0.0, 0.0, 4.2424308662e-17, 0.0, 0.0, 1.15578681403e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 1.31379172226e-18, 1.91125269754e-18, 0.0, 0.0, 9.54938460528e-19, 0.0, 0.0, 6.2002607238e-19, 9.00028041233e-19, 4.73944085501e-19, 9.88314004553e-19, 3.10412625318e-18, 2.67653060268e-18, 4.0754594382e-18, 1.85987842528e-18, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [0.12830358642909417, 0.2541817085556876], uv: [8.3493662109375, 8.5], spectrum: [ 7.74237155221e-20, 2.5747909799e-19, 6.07788508574e-19, 1.57629369784e-19, 1.61080529997e-20, 1.37923531744e-19, 5.62242965412e-19, 5.65961371764e-19, 0.0, 0.0, 0.0, 6.32750995829e-19, 0.0, 0.0, 4.73122070413e-19, 4.31840930675e-19, 1.87930667792e-19, 3.47728348155e-19, 4.44136529076e-19, 0.0, 0.00013613339044, 0.00063549658256, 0.00139098037326, 0.00231541849329, 0.00333924178875, 0.00440477256841, 0.00546100955567, 0.00645913631421, 0.00735315337319, 0.00810861820624, 0.00870404394031, 0.00912573973968, 0.00936769297627, 0.00942968225599, 0.00931663017848, 0.00904103303515, 0.00861651345988, 0.00806242798682, 0.00740175809308, 0.00666063600018, 0.00586710162274, 0.00505007463064, 0.0042388447056, 0.00345869099725, 0.00273337843845, 0.00208127185969, 0.00151589740733, 0.00104444135323, 0.0006683269092, 0.000384299152639, 0.00018526710977, 6.20294800893e-5, 2.92208942676e-6, 7.68376005464e-20, 0.0, 0.0, 0.0, 1.13392976746e-19, 1.9517126126e-19, 0.0, 2.25011478202e-19, 1.54187483865e-19, 2.41083053587e-19, 9.70837730932e-20, 3.73385826334e-19, 1.05630272436e-7, 1.62906363083e-19, 1.98238658804e-8, 3.10044411361e-7, 4.08702395167e-7, 3.99990871252e-7, 5.26244822101e-7, 4.49411014286e-7, 6.47917193915e-7, 7.3714349113e-7, 6.5578461788e-7, 5.92672464043e-7, 7.24097067544e-7, 4.83927699747e-7, 4.2357300216e-7, 2.60797850332e-7 ] }, spectrum_data_point_t { xystar: [-0.1833955742454785, 0.3106665326791737], uv: [2.6418447265625, 9.5], spectrum: [ 0.0, 0.0, 4.70805104299e-18, 1.75627853881e-17, 0.0, 2.60164280582e-18, 0.0, 1.88684552895e-17, 3.17531285463e-20, 0.0, 0.0, 4.07116076955e-17, 2.51386354887e-18, 7.77602486606e-20, 8.60466142095e-18, 0.0, 0.0, 1.12571560462e-17, 0.0, 0.00242111344562, 0.0105871092634, 0.0211196787864, 0.031303233555, 0.0392623730551, 0.0436443767409, 0.0435565521804, 0.0385740815825, 0.0291857893235, 0.017183314106, 0.00588367565427, 3.04389296001e-17, 0.0, 5.01264524126e-17, 1.12320729862e-16, 4.07829629754e-17, 0.0, 0.0, 0.0, 1.19796195223e-16, 0.0, 1.61136214296e-17, 5.69794922676e-17, 0.0, 0.0, 2.05774116056e-18, 0.0, 7.94271357626e-17, 9.91909037779e-17, 1.0126227779e-17, 3.14211022597e-17, 1.18468850913e-16, 0.0, 2.16600237922e-17, 0.0, 0.0, 2.14463290529e-17, 2.26694661126e-17, 2.97487108515e-17, 3.2316071497e-17, 2.49180114773e-17, 1.24776358524e-17, 8.33339818406e-18, 3.92890176765e-18, 1.14660735314e-17, 8.44614302982e-19, 0.0, 1.6036046024e-18, 4.84280150301e-18, 8.60572395419e-18, 1.8376237628e-18, 1.54237692128e-17, 1.22520187456e-17, 8.88686900106e-18, 1.08652849071e-17, 1.22069707946e-17, 1.19990263212e-17, 1.32421962169e-17, 1.4716291894e-18, 4.38581391545e-18, 1.35362747114e-17, 1.38134297119e-17 ] }, spectrum_data_point_t { xystar: [0.11695719687639743, 0.3106665326791737], uv: [8.1416025390625, 9.5], spectrum: [ 3.5102566516e-19, 9.19919246988e-19, 9.75121902453e-19, 2.43699221275e-19, 7.38027499366e-20, 4.99379641513e-19, 0.0, 5.82327680539e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 2.15381251731e-18, 0.0, 5.05470864793e-18, 1.98583767893e-18, 0.0, 3.56957726207e-18, 0.0, 3.57532929263e-19, 0.0, 1.82910280378e-19, 0.000164402478579, 0.00114332103699, 0.00265879901573, 0.00448197293626, 0.00639735696064, 0.00821500701222, 0.0097951755794, 0.0110546559441, 0.0119446310119, 0.0124371124359, 0.0125257433154, 0.0122251147748, 0.0115678179675, 0.0106011419053, 0.00938376795285, 0.00798636134079, 0.00648957822429, 0.00497655243402, 0.00353532456709, 0.00225050704446, 0.00119711829747, 0.000440016087199, 2.95503379179e-5, 9.19898511497e-19, 9.91496905163e-19, 9.46371295945e-19, 0.0, 0.0, 1.37419012135e-20, 6.40554870125e-19, 0.0, 0.0, 1.02991188318e-18, 2.52006290523e-18, 5.88846819464e-19, 4.5132396371e-19, 1.47321607005e-18, 1.0259315596e-18, 2.1001926085e-19, 1.40138384126e-19, 3.45022198159e-19, 0.0, 6.89103953948e-9, 3.81941111064e-7, 2.28107717928e-7, 3.7831361708e-7, 3.1967435292e-7, 2.03037838448e-7, 1.2708257638e-7, 1.92454689329e-7, 3.19218710892e-7, 4.74796435277e-7, 4.04011537932e-7, 4.44133715418e-7, 9.28189568219e-7, 9.23105652193e-7, 8.68469055884e-7, 8.91258188586e-7 ] }, spectrum_data_point_t { xystar: [-0.17239584289298163, 0.36715135680265987], uv: [2.8432607421875, 10.5], spectrum: [ 6.66978481294e-17, 0.0, 0.0, 0.0, 1.23698548427e-17, 0.0, 2.78110883146e-17, 0.0, 3.23929366214e-17, 0.0, 2.20415725551e-16, 0.0, 1.01735932573e-16, 0.0, 6.01147181899e-17, 1.05533600282e-16, 5.58815377179e-17, 0.0, 0.0, 1.89380148397e-17, 0.0, 0.00850868570575, 0.026886393489, 0.0458725007271, 0.0589439684282, 0.0619436066879, 0.0530196751933, 0.034014486174, 0.0119822601373, 2.99940779574e-16, 0.0, 1.27535463774e-16, 0.0, 0.0, 0.0, 2.18476937039e-16, 0.0, 1.02167960481e-16, 0.0, 3.86795325381e-16, 0.0, 3.59585922973e-16, 2.65451321869e-16, 0.0, 2.47402256807e-16, 0.0, 1.41218805641e-16, 0.0, 5.25757641063e-17, 8.23087899085e-17, 5.89974018844e-16, 0.0, 1.91108511648e-16, 1.48563012461e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.36497159584e-17, 0.0, 0.0, 0.0, 2.09367425873e-18, 0.0, 0.0, 0.0, 2.83663129423e-18, 0.0, 9.7451401807e-19, 2.12165639255e-17, 5.2949699853e-18, 4.94695111542e-19, 4.70402080404e-17, 7.92177761606e-17, 9.74901051703e-17 ] }, spectrum_data_point_t { xystar: [0.08300599406990862, 0.363257015016343], uv: [7.5199222656249995, 10.431055078124999], spectrum: [ 5.71796587953e-20, 6.46930694911e-19, 0.0, 2.14458449064e-19, 1.62263265406e-18, 0.0, 4.89325168456e-19, 0.0, 0.0, 0.0, 0.0, 0.0, 3.39291929138e-18, 7.28503736267e-18, 5.73539378507e-19, 3.79453538551e-19, 0.0, 1.17916594971e-18, 0.0, 0.0, 3.19496556876e-18, 1.49600689261e-18, 0.000504307016975, 0.00182619929741, 0.00366458945654, 0.00577762240418, 0.00796065793936, 0.0100231744273, 0.0117968617005, 0.0131620439249, 0.0140539818246, 0.0144458570026, 0.0143368316732, 0.0137501089963, 0.0127317323754, 0.0113500689194, 0.00969058357835, 0.00785304910936, 0.00595288824071, 0.00411534886557, 0.0024748600205, 0.00116074418905, 0.000297935112677, 1.06931458966e-18, 1.23720942236e-18, 0.0, 8.17409344411e-19, 1.42192416031e-18, 0.0, 0.0, 0.0, 1.04362864604e-18, 1.82540507844e-18, 9.56169198786e-20, 0.0, 0.0, 0.0, 4.84380936351e-21, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.40647507972e-8, 0.0, 2.29098193342e-8, 4.57474690925e-7, 1.1248796319e-7, 0.0, 3.13275254995e-7, 0.0 ] }, spectrum_data_point_t { xystar: [0.11048622602865567, 0.34183251245096963], uv: [8.023112630208333, 10.051758463541665], spectrum: [ 0.0, 7.79476879092e-18, 0.0, 0.0, 0.0, 1.49316980148e-18, 0.0, 0.0, 0.0, 2.48405772926e-17, 3.54363573011e-18, 1.16527751606e-17, 0.0, 3.0322270968e-17, 1.628145479e-17, 3.3672907156e-18, 0.0, 0.0, 3.74654415978e-18, 1.59647859363e-17, 0.0, 1.34329309845e-19, 0.0, 1.58750953783e-18, 0.0, 0.0, 0.00152884857421, 0.0042607500802, 0.00740869271718, 0.0104141114935, 0.012947700883, 0.014807985521, 0.0158699337835, 0.0160873828966, 0.0154850550875, 0.0141443721204, 0.0122002272358, 0.00984136848306, 0.00728238789434, 0.00475866596266, 0.00253377300131, 0.000864652608379, 1.33741493695e-17, 0.0, 2.43026268091e-17, 0.0, 0.0, 3.68618378002e-18, 0.0, 0.0, 1.9876212397e-18, 4.23350470371e-18, 2.15533068191e-17, 0.0, 7.8639766722e-18, 9.83108344763e-19, 2.87429652883e-18, 1.37758873933e-18, 1.61376175765e-18, 4.31193441099e-18, 1.8166140782e-18, 4.1156305323e-18, 4.80171732827e-18, 8.42922645034e-18, 1.14017526525e-17, 1.20928481543e-17, 1.36939728116e-17, 1.47133423213e-17, 1.71133858719e-17, 1.55570306257e-17, 1.65183600813e-17, 1.41925830818e-17, 1.19936688958e-17, 1.27698687128e-17, 1.28776536553e-17, 9.84379339652e-18, 1.09449362279e-17, 1.3383025144e-7, 1.07699931856e-7, 4.90008559987e-18, 1.74467611311e-18 ] }, spectrum_data_point_t { xystar: [-0.16563154587583995, 0.39975152156196625], uv: [2.9671217447916667, 11.077149088541667], spectrum: [ 0.0, 7.64719810675e-16, 2.46027592254e-16, 0.0, 1.97424194247e-17, 0.0, 0.0, 4.90678201913e-16, 0.0, 3.71006221883e-16, 8.61189827443e-16, 0.0, 0.0, 3.33299601832e-16, 0.0, 0.0, 3.19739601647e-16, 3.24860974776e-16, 0.0, 2.6304875546e-16, 7.92708696601e-17, 0.0, 0.0111285266392, 0.0419644275041, 0.0702181760694, 0.0814661616267, 0.0686674024288, 0.0354686732299, 0.000532900602666, 3.59945948538e-16, 3.39632582107e-16, 1.58692622923e-16, 0.0, 7.33154804514e-16, 9.67809027452e-16, 0.0, 0.0, 0.0, 9.67679832371e-16, 3.43780596737e-16, 5.09721501476e-16, 0.0, 0.0, 0.0, 0.0, 1.12798886131e-15, 2.42569599963e-15, 1.7551114349e-15, 5.78736374519e-16, 0.0, 0.0, 0.0, 2.61730704938e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.07742675505e-16, 2.17342748402e-17, 0.0, 4.85216106491e-18, 0.0, 0.0, 5.95629258436e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.30747676921e-18, 3.81658260145e-17, 5.12214378248e-17, 6.23271411159e-17, 5.85391789472e-17, 3.76245401549e-17 ] }, spectrum_data_point_t { xystar: [-0.13713800533189321, 0.42060235013233543], uv: [3.4888667968749996, 11.446289453125], spectrum: [ 1.03550356466e-16, 7.28749494497e-17, 5.69449237428e-17, 0.0, 0.0, 2.97065321731e-18, 1.94227811545e-17, 2.8086205469e-17, 0.0, 4.22699887129e-17, 0.0, 1.66699614342e-16, 0.0, 4.26116191556e-18, 0.0, 6.63960207085e-17, 3.37155873265e-17, 3.97198665293e-17, 0.0, 0.0, 0.0, 0.00498319061689, 0.0174720390516, 0.0319953430799, 0.04441921795, 0.0517021526124, 0.0517142440591, 0.0438007418104, 0.0294046616919, 0.0126051223228, 3.77333655729e-17, 3.71462560039e-16, 0.0, 0.0, 0.0, 2.35058455014e-17, 0.0, 0.0, 1.25487701712e-16, 0.0, 0.0, 0.0, 0.0, 3.87224575731e-16, 0.0, 0.0, 3.56738502902e-17, 1.43774035531e-16, 7.03877329806e-18, 6.64028767907e-17, 1.74844177883e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 3.11992142954e-17, 0.0, 0.0, 0.0, 1.98646622963e-17, 5.92369435444e-18, 0.0, 0.0, 0.0, 0.0, 3.27604710759e-20, 0.0, 0.0, 0.0, 0.0, 4.64438187528e-18, 8.16362149928e-19, 0.0, 1.63229799354e-18, 1.04282569661e-17, 2.91899550824e-17, 2.27106473818e-17, 2.11392644328e-17, 1.77045688367e-17, 1.10351452368e-17 ] }, spectrum_data_point_t { xystar: [0.06354516803021264, 0.423636180926146], uv: [7.163575195312499, 11.5], spectrum: [ 1.83208984536e-18, 3.89631688794e-18, 8.93817268559e-18, 2.12280527863e-18, 1.37295819301e-18, 0.0, 0.0, 1.88365227071e-18, 0.0, 1.00315003328e-17, 1.42534971908e-18, 3.5889070279e-17, 2.60053835047e-17, 0.0, 3.46149186407e-18, 0.0, 1.74892742305e-17, 0.0, 0.0, 0.0, 4.47759084751e-18, 0.0, 0.0, 0.0, 0.000559251813694, 0.00344069838865, 0.00759636590377, 0.0120737597484, 0.0160580334882, 0.0190015817344, 0.0206497515996, 0.0209279665796, 0.0198785326936, 0.0176567122248, 0.0145141482971, 0.0108051386543, 0.00696552144046, 0.00350238783766, 0.000979175478232, 6.58513328198e-18, 0.0, 0.0, 2.43854125407e-17, 1.88565782295e-17, 0.0, 4.65919738906e-18, 9.69818195244e-18, 0.0, 0.0, 1.24011631896e-17, 0.0, 0.0, 5.34046280923e-18, 3.07870725492e-18, 5.03394928831e-19, 3.13215122532e-18, 4.11336188077e-19, 3.76854273383e-19, 0.0, 7.35149746763e-19, 5.18928379699e-19, 8.11539116747e-19, 3.87077868717e-21, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.2027867851e-19, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.11933934314145316, 0.46802240436486464], uv: [3.8147779947916667, 12.285807942708333], spectrum: [ 4.02526813228e-16, 0.0, 5.65207872888e-17, 0.0, 0.0, 1.24210470189e-17, 0.0, 0.0, 0.0, 2.2411274972e-16, 2.30138915965e-16, 0.0, 1.77016538637e-16, 0.0, 0.0, 8.90779746699e-17, 0.0, 0.0, 6.36822555872e-17, 2.19607701261e-17, 1.00868129247e-16, 0.0, 0.00104922353747, 0.020207928254, 0.0436371684629, 0.0612850981267, 0.0662425335065, 0.0557297689484, 0.0329253494732, 0.00844405144273, 6.24795252045e-16, 5.08157516648e-16, 3.38067138422e-16, 0.0, 0.0, 1.89937218673e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 9.61984605696e-17, 5.52585840442e-16, 5.43643501646e-17, 5.7738434974e-16, 3.48457476069e-16, 0.0, 4.60136386371e-16, 1.67170384409e-16, 1.7646473694e-16, 0.0, 3.38697744292e-17, 7.6508977977e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.14395327497e-17, 1.9559092254e-16, 0.0, 0.0, 4.97860917985e-17, 0.0, 3.40068771501e-18, 8.02749777429e-17, 3.18170890541e-17, 1.75856473865e-17, 5.66842718733e-17, 5.89868031095e-17, 0.0, 0.0, 8.37253110201e-18, 0.0, 1.41245560488e-17 ] }, spectrum_data_point_t { xystar: [-0.08567259560990789, 0.4841588094634689], uv: [4.431249609375, 12.571484765625], spectrum: [ 3.01585976714e-17, 2.41407144961e-17, 0.0, 0.0, 0.0, 0.0, 7.21315236394e-18, 0.0, 2.84401822678e-17, 7.66519241567e-19, 0.0, 0.0, 3.95677097919e-17, 1.06971794701e-16, 1.78785932487e-17, 3.96517646432e-17, 2.98091020371e-17, 0.0, 0.0, 0.0, 0.0, 4.83945484713e-17, 0.00398585808348, 0.0151888068479, 0.0285891112712, 0.0403075911461, 0.0473095357681, 0.0475774265785, 0.0406181577953, 0.0279951257129, 0.0133715388476, 0.00198768536234, 0.0, 8.92197151224e-20, 1.91006653713e-17, 6.59731248547e-17, 0.0, 0.0, 5.71383844025e-18, 1.31879070644e-16, 1.8021783967e-16, 8.87996539995e-17, 0.0, 9.684059183e-17, 0.0, 9.99056127953e-19, 0.0, 2.34266749343e-17, 0.0, 1.16047649676e-17, 1.3183413082e-16, 0.0, 0.0, 0.0, 1.21546810426e-17, 0.0, 0.0, 2.69513969322e-18, 4.51427641884e-18, 3.42452923022e-18, 0.0, 0.0, 0.0, 0.0, 9.43357690638e-18, 2.134345427e-17, 6.29425369641e-18, 3.53759406393e-18, 1.63696193967e-17, 1.83264711967e-17, 7.7195056548e-18, 1.96112609374e-17, 1.30392115784e-17, 1.46916058601e-17, 1.3273039183e-17, 0.0, 2.30442678878e-18, 0.0, 0.0, 1.23492567868e-17, 4.01529693826e-17 ] }, spectrum_data_point_t { xystar: [0.025450066430565042, 0.475399248847444], uv: [6.466016015625, 12.416406640625002], spectrum: [ 0.0, 1.25749485278e-17, 0.0, 3.76319920014e-18, 0.0, 3.38063433126e-18, 4.42665585835e-19, 0.0, 3.11756990532e-17, 0.0, 2.13297557153e-17, 0.0, 3.531765107e-17, 2.36666429072e-17, 0.0, 4.21219669749e-18, 0.0, 3.97870109784e-18, 0.0, 0.0, 0.0, 2.86934073203e-17, 9.98020207202e-18, 2.44902223875e-18, 0.00233187872092, 0.00780890582714, 0.0145792536175, 0.0209922052059, 0.0257182942132, 0.0279799275337, 0.0276081594865, 0.0248353200718, 0.0201440802426, 0.0142558848071, 0.00812676945665, 0.00292168174833, 0.0, 0.0, 5.19935258333e-18, 0.0, 7.72309293574e-18, 1.34359788547e-17, 3.90417242735e-17, 5.67203986808e-18, 0.0, 5.17558136252e-18, 1.12764891677e-18, 0.0, 0.0, 9.61051082588e-18, 0.0, 8.21519492467e-18, 0.0, 4.07834901578e-18, 4.14127604637e-18, 5.65807098428e-19, 0.0, 3.3978325519e-18, 7.33677894554e-19, 0.0, 0.0, 9.56901250035e-19, 0.0, 0.0, 0.0, 3.88781611218e-18, 5.46852600797e-18, 6.79892511272e-18, 2.34592691828e-18, 4.7866650401e-18, 1.66986544669e-18, 4.71326134001e-18, 3.64365016959e-18, 2.17811558375e-18, 1.02971962999e-18, 3.99765908717e-18, 4.35762862069e-18, 5.11081079226e-18, 3.11122263852e-18, 5.75045358578e-18, 5.98577008001e-18 ] }, spectrum_data_point_t { xystar: [0.055607566335471294, 0.45342313667148976], uv: [7.018229817708333, 12.027344401041667], spectrum: [ 0.0, 1.68296145143e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.46210085566e-16, 0.0, 5.75024210688e-17, 0.0, 0.0, 1.80468397118e-17, 6.74280682275e-17, 6.90743394104e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00245724958278, 0.00986889550888, 0.0182004123204, 0.0247704006299, 0.0283437370609, 0.0285503056793, 0.0255363670802, 0.0199360083769, 0.0128599144043, 0.00585038923915, 0.000821267524753, 8.14212536757e-18, 0.0, 8.45214724806e-18, 7.14713935401e-17, 5.82039651852e-17, 0.0, 0.0, 0.0, 4.56860778618e-17, 9.279858144e-18, 0.0, 3.35685644089e-17, 3.24672608151e-17, 4.63109898541e-17, 0.0, 0.0, 2.76422474461e-17, 3.31501021153e-17, 1.79618601923e-17, 1.22677220069e-17, 0.0, 0.0, 0.0, 3.81708170948e-18, 0.0, 0.0, 0.0, 0.0, 0.0, 2.14252222626e-18, 0.0, 0.0, 1.81659048918e-19, 0.0, 0.0, 0.0, 0.0, 2.08648543118e-19, 0.0, 0.0, 4.71739504507e-19, 5.1519608558e-19, 7.05207868148e-19, 0.0 ] }, spectrum_data_point_t { xystar: [-0.06997165996426725, 0.5197449988503355], uv: [4.718749348958333, 13.201498046874999], spectrum: [ 1.66303660376e-16, 0.0, 1.78463423974e-16, 1.44836563284e-17, 0.0, 3.45957881756e-17, 0.0, 0.0, 1.16774112254e-16, 4.08199133519e-16, 0.0, 7.68602270882e-16, 4.31088185823e-16, 7.47159296604e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 7.39352266752e-17, 9.89049825668e-17, 0.0148922538986, 0.0375322204041, 0.0561019055159, 0.0622309967762, 0.0526526356358, 0.0310815874729, 0.0082447704983, 0.0, 8.36513861024e-17, 0.0, 0.0, 1.61381796489e-16, 6.06891349369e-17, 1.0360820431e-16, 3.6756942106e-16, 0.0, 0.0, 1.55602190724e-16, 1.29003064495e-16, 8.09730405772e-17, 0.0, 0.0, 0.0, 2.18906424179e-16, 0.0, 0.0, 0.0, 2.53911287022e-16, 0.0, 0.0, 7.44129384506e-17, 2.35273543183e-16, 8.2557691736e-18, 2.32333214366e-17, 0.0, 2.19390900094e-17, 0.0, 2.05765307129e-17, 2.95147795093e-18, 2.71759282593e-17, 0.0, 1.87150371653e-17, 4.64717802319e-17, 1.35898045842e-17, 1.53987068718e-17, 1.65796582348e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [-0.02730599976959222, 0.5216986346081299], uv: [5.5, 13.236084960937498], spectrum: [ 9.24752934342e-17, 3.90563690066e-17, 9.51272382456e-17, 0.0, 7.99552564236e-19, 8.84485041987e-18, 1.38783261533e-18, 0.0, 8.03517774241e-17, 4.65598741548e-17, 2.54980623824e-16, 1.75109722558e-17, 7.84679737391e-17, 0.0, 0.0, 1.73983451201e-16, 0.0, 0.0, 1.24712522376e-17, 0.0, 0.0, 0.0, 1.67480335165e-17, 0.0, 0.00411137974316, 0.0172599536975, 0.0323691454927, 0.0436056883339, 0.0470594033699, 0.0417058133204, 0.0295621396273, 0.0147617271419, 0.00270647272222, 2.68132611769e-17, 0.0, 2.31240516408e-17, 4.37475755621e-17, 0.0, 5.66634765588e-18, 6.9853716488e-17, 8.55821315204e-18, 0.0, 2.04628020305e-16, 1.3434165859e-16, 7.51815277509e-17, 0.0, 0.0, 0.0, 1.9547701934e-16, 0.0, 0.0, 0.0, 3.92167072591e-17, 4.32460748909e-17, 4.48693233433e-17, 0.0, 0.0, 2.5627120413e-17, 5.8157167117e-18, 9.33975339626e-18, 0.0, 1.81647938611e-18, 1.12475627173e-17, 0.0, 4.98766018453e-18, 0.0, 0.0, 1.15098397577e-18, 0.0, 0.0, 0.0, 3.99283787308e-18, 4.33499210544e-18, 4.10460994484e-19, 3.03905884059e-19, 3.80979757403e-18, 0.0, 0.0, 4.44313844788e-19, 0.0, 0.0 ] }, spectrum_data_point_t { xystar: [0.0060087776914854825, 0.514762125368088], uv: [6.110026692708333, 13.113281901041667], spectrum: [ 0.0, 0.0, 0.0, 0.0, 0.0, 1.93338217864e-17, 2.53350889881e-17, 0.0, 0.0, 0.0, 1.61227265611e-16, 0.0, 0.0, 0.0, 4.59037251366e-16, 1.27019079857e-17, 6.40160211435e-17, 9.92561789615e-17, 0.0, 2.18941745526e-16, 2.1460175331e-16, 0.0, 1.07051751967e-16, 0.0, 1.75546062865e-17, 0.00151145772444, 0.0146955129168, 0.0303109047478, 0.0412510589145, 0.0438507111116, 0.03809308886, 0.0263481927175, 0.0124188863197, 0.00146807277693, 1.50637835621e-16, 0.0, 0.0, 1.22214262388e-17, 0.0, 6.84691033944e-17, 3.74224599397e-16, 0.0, 0.0, 0.0, 0.0, 2.99910514975e-17, 1.30789826894e-16, 1.48059435997e-16, 4.05916616996e-16, 6.45026506533e-17, 2.6606584345e-16, 0.0, 0.0, 1.07893205131e-17, 0.0, 0.0, 1.35742938534e-17, 1.44397414332e-17, 0.0, 2.2658646767e-17, 1.50832660872e-17, 0.0, 1.40668523737e-17, 5.95205406137e-18, 0.0, 6.99200268532e-18, 0.0, 0.0, 0.0, 0.0, 3.42386013034e-19, 5.04498636532e-18, 0.0, 5.16084971135e-19, 0.0, 0.0, 4.14328825874e-18, 2.56492279833e-18, 4.66543423876e-18, 9.39355685547e-18, 9.85269802799e-18 ] }
+];
+
+// Color matching functions.
+pub const cmf_wavelength: [f64; spectrum_num_samples] = [
+    380.0, 385.0, 390.0, 395.0, 400.0, 405.0, 410.0, 415.0, 420.0, 425.0, 430.0, 435.0, 440.0,
+    445.0, 450.0, 455.0, 460.0, 465.0, 470.0, 475.0, 480.0, 485.0, 490.0, 495.0, 500.0, 505.0,
+    510.0, 515.0, 520.0, 525.0, 530.0, 535.0, 540.0, 545.0, 550.0, 555.0, 560.0, 565.0, 570.0,
+    575.0, 580.0, 585.0, 590.0, 595.0, 600.0, 605.0, 610.0, 615.0, 620.0, 625.0, 630.0, 635.0,
+    640.0, 645.0, 650.0, 655.0, 660.0, 665.0, 670.0, 675.0, 680.0, 685.0, 690.0, 695.0, 700.0,
+    705.0, 710.0, 715.0, 720.0, 725.0, 730.0, 735.0, 740.0, 745.0, 750.0, 755.0, 760.0, 765.0,
+    770.0, 775.0, 780.0,
+];
+const cmf_x: [f64; spectrum_num_samples] = [
+    0.001368, 0.002236, 0.004243, 0.00765, 0.01431, 0.02319, 0.04351, 0.07763, 0.13438, 0.21477,
+    0.2839, 0.3285, 0.34828, 0.34806, 0.3362, 0.3187, 0.2908, 0.2511, 0.19536, 0.1421, 0.09564,
+    0.05795, 0.03201, 0.0147, 0.0049, 0.0024, 0.0093, 0.0291, 0.06327, 0.1096, 0.1655, 0.22575,
+    0.2904, 0.3597, 0.43345, 0.51205, 0.5945, 0.6784, 0.7621, 0.8425, 0.9163, 0.9786, 1.0263,
+    1.0567, 1.0622, 1.0456, 1.0026, 0.9384, 0.85445, 0.7514, 0.6424, 0.5419, 0.4479, 0.3608,
+    0.2835, 0.2187, 0.1649, 0.1212, 0.0874, 0.0636, 0.04677, 0.0329, 0.0227, 0.01584, 0.011359,
+    0.008111, 0.00579, 0.004109, 0.002899, 0.002049, 0.00144, 0.001, 0.00069, 0.000476, 0.000332,
+    0.000235, 0.000166, 0.000117, 8.3e-05, 5.9e-05, 4.2e-05,
+];
+const cmf_y: [f64; spectrum_num_samples] = [
+    3.9e-05, 6.4e-05, 0.00012, 0.000217, 0.000396, 0.00064, 0.00121, 0.00218, 0.004, 0.0073,
+    0.0116, 0.01684, 0.023, 0.0298, 0.038, 0.048, 0.06, 0.0739, 0.09098, 0.1126, 0.13902, 0.1693,
+    0.20802, 0.2586, 0.323, 0.4073, 0.503, 0.6082, 0.71, 0.7932, 0.862, 0.91485, 0.954, 0.9803,
+    0.99495, 1.0, 0.995, 0.9786, 0.952, 0.9154, 0.87, 0.8163, 0.757, 0.6949, 0.631, 0.5668, 0.503,
+    0.4412, 0.381, 0.321, 0.265, 0.217, 0.175, 0.1382, 0.107, 0.0816, 0.061, 0.04458, 0.032,
+    0.0232, 0.017, 0.01192, 0.00821, 0.005723, 0.004102, 0.002929, 0.002091, 0.001484, 0.001047,
+    0.00074, 0.00052, 0.000361, 0.000249, 0.000172, 0.00012, 8.5e-05, 6e-05, 4.2e-05, 3e-05,
+    2.1e-05, 1.5e-05,
+];
+const cmf_z: [f64; spectrum_num_samples] = [
+    0.00645, 0.01055, 0.02005, 0.03621, 0.06785, 0.1102, 0.2074, 0.3713, 0.6456, 1.03905, 1.3856,
+    1.62296, 1.74706, 1.7826, 1.77211, 1.7441, 1.6692, 1.5281, 1.28764, 1.0419, 0.81295, 0.6162,
+    0.46518, 0.3533, 0.272, 0.2123, 0.1582, 0.1117, 0.07825, 0.05725, 0.04216, 0.02984, 0.0203,
+    0.0134, 0.00875, 0.00575, 0.0039, 0.00275, 0.0021, 0.0018, 0.00165, 0.0014, 0.0011, 0.001,
+    0.0008, 0.0006, 0.00034, 0.00024, 0.00019, 0.0001, 5e-05, 3e-05, 2e-05, 1e-05, 0.0, 0.0, 0.0,
+    0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+    0.0, 0.0, 0.0, 0.0, 0.0,
+];
+
+pub fn xyz_from_spectrum(spectrum: &[f64; spectrum_num_samples], xyz: &mut [f64; 3]) {
+    *xyz = [0.0, 0.0, 0.0];
+    for i in 0..spectrum_num_samples {
+        xyz[0] += spectrum[i] * cmf_x[i];
+        xyz[1] += spectrum[i] * cmf_y[i];
+        xyz[2] += spectrum[i] * cmf_z[i];
+    }
+    xyz[0] *= spectrum_bin_size;
+    xyz[1] *= spectrum_bin_size;
+    xyz[2] *= spectrum_bin_size;
+}
+
+// This is 1 over the integral over either CMF.
+// Spectra can be mapped so that xyz=(1,1,1) is converted to constant 1 by
+// dividing by this value. This is important for valid reflectances.
+pub const equal_energy_reflectance: f64 = 0.009358239977091027;
+
\ No newline at end of file diff --git a/src/clovers/spectrum/spectrum_grid.rs.html b/src/clovers/spectrum/spectrum_grid.rs.html new file mode 100644 index 00000000..b79fabde --- /dev/null +++ b/src/clovers/spectrum/spectrum_grid.rs.html @@ -0,0 +1,299 @@ +spectrum_grid.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+
//! Hand-converted from `spectrum_grid.h` in the supplemental material from [Physically Meaningful Rendering using Tristimulus Colours](https://doi.org/10.1111/cgf.12676)
+
+#![allow(clippy::pedantic)]
+#![allow(missing_docs)]
+#![allow(non_camel_case_types)]
+#![allow(non_upper_case_globals)]
+#![allow(non_snake_case)]
+
+use super::spectra_xyz_5nm_380_780_097::*;
+
+/*
+ * Evaluate the spectrum for xyz at the given wavelength.
+ */
+pub(super) fn spectrum_xyz_to_p(lambda: f64, xyz: [f64; 3]) -> f64 {
+    assert!(lambda >= spectrum_sample_min);
+    assert!(lambda <= spectrum_sample_max);
+    let mut xyY: [f64; 3] = [0.0, 0.0, 0.0];
+    let mut uv: [f64; 2] = [0.0, 0.0];
+
+    let norm: f64 = 1.0 / (xyz[0] + xyz[1] + xyz[2]);
+    #[allow(clippy::neg_cmp_op_on_partial_ord)]
+    if !(norm < f64::MAX) {
+        return 0.0;
+    }
+    // convert to xy chromaticities
+    xyY[0] = xyz[0] * norm;
+    xyY[1] = xyz[1] * norm;
+    xyY[2] = xyz[1];
+
+    // rotate to align with grid
+    spectrum_xy_to_uv([xyY[0], xyY[1]], &mut uv);
+
+    if uv[0] < 0.0
+        || uv[0] >= spectrum_grid_width_f
+        || uv[1] < 0.0
+        || uv[1] >= spectrum_grid_height_f
+    {
+        return 0.0;
+    }
+
+    let uvi: [usize; 2] = [uv[0] as usize, uv[1] as usize];
+    assert!(uvi[0] < spectrum_grid_width);
+    assert!(uvi[1] < spectrum_grid_height);
+
+    let cell_idx: usize = uvi[0] + spectrum_grid_width * uvi[1];
+    assert!(cell_idx < spectrum_grid_width * spectrum_grid_height);
+    // assert!(cell_idx >= 0);
+
+    let spectrum_grid_cell_t {
+        inside,
+        num_points,
+        idx,
+    } = spectrum_grid[cell_idx];
+    let num = num_points;
+
+    // get linearly interpolated spectral power for the corner vertices:
+    let mut p = std::iter::repeat(0.0).take(num).collect::<Vec<_>>();
+    // this clamping is only necessary if lambda is not sure to be >= spectrum_sample_min and <= spectrum_sample_max:
+    let sb: f64 = //fminf(spectrum_num_samples-1e-4, fmaxf(0.0,
+        (lambda - spectrum_sample_min)/(spectrum_sample_max-spectrum_sample_min) * (spectrum_num_samples_f-1.0); //));
+    assert!(sb >= 0.0);
+    assert!(sb <= spectrum_num_samples_f);
+
+    let sb0: usize = sb as usize;
+    let sb1: usize = if sb0 + 1 < spectrum_num_samples {
+        sb0 + 1
+    } else {
+        spectrum_num_samples - 1
+    };
+    let sbf: f64 = sb - sb0 as f64;
+    for i in 0..num {
+        let index = idx[i];
+        assert!(index >= 0);
+        let index = index as usize;
+        assert!(sb0 < spectrum_num_samples);
+        assert!(sb1 < spectrum_num_samples);
+        let spectrum = spectrum_data_points[index].spectrum;
+        p[i] = spectrum[sb0] * (1.0 - sbf) + spectrum[sb1] * sbf;
+    }
+
+    let mut interpolated_p: f64 = 0.0;
+
+    if inside == 1 {
+        // fast path for normal inner quads:
+        uv[0] -= uvi[0] as f64;
+        uv[1] -= uvi[1] as f64;
+
+        assert!(uv[0] >= 0.0 && uv[0] <= 1.0);
+        assert!(uv[1] >= 0.0 && uv[1] <= 1.0);
+
+        // the layout of the vertices in the quad is:
+        //  2  3
+        //  0  1
+        interpolated_p = p[0] * (1.0 - uv[0]) * (1.0 - uv[1])
+            + p[2] * (1.0 - uv[0]) * uv[1]
+            + p[3] * uv[0] * uv[1]
+            + p[1] * uv[0] * (1.0 - uv[1]);
+    } else {
+        // need to go through triangulation :(
+        // we get the indices in such an order that they form a triangle fan around idx[0].
+        // compute barycentric coordinates of our xy* point for all triangles in the fan:
+        let ex: f64 = uv[0] - spectrum_data_points[idx[0] as usize].uv[0];
+        let ey: f64 = uv[1] - spectrum_data_points[idx[0] as usize].uv[1];
+        let mut e0x: f64 = spectrum_data_points[idx[1] as usize].uv[0]
+            - spectrum_data_points[idx[0] as usize].uv[0];
+        let mut e0y: f64 = spectrum_data_points[idx[1] as usize].uv[1]
+            - spectrum_data_points[idx[0] as usize].uv[1];
+        let mut uu: f64 = e0x * ey - ex * e0y;
+        for i in 0..(num - 1) {
+            let e1x: f64;
+            let e1y: f64;
+            if i == num - 2 {
+                // close the circle
+                e1x = spectrum_data_points[idx[1] as usize].uv[0]
+                    - spectrum_data_points[idx[0] as usize].uv[0];
+                e1y = spectrum_data_points[idx[1] as usize].uv[1]
+                    - spectrum_data_points[idx[0] as usize].uv[1];
+            } else {
+                e1x = spectrum_data_points[idx[i + 2] as usize].uv[0]
+                    - spectrum_data_points[idx[0] as usize].uv[0];
+                e1y = spectrum_data_points[idx[i + 2] as usize].uv[1]
+                    - spectrum_data_points[idx[0] as usize].uv[1];
+            }
+            let vv: f64 = ex * e1y - e1x * ey;
+
+            // TODO: with some sign magic, this division could be deferred to the last iteration!
+            let area: f64 = e0x * e1y - e1x * e0y;
+            // normalise
+            let u: f64 = uu / area;
+            let v: f64 = vv / area;
+            let w: f64 = 1.0 - u - v;
+            // outside spectral locus (quantized version at least) or outside grid
+            if u < 0.0 || v < 0.0 || w < 0.0 {
+                uu = -vv;
+                e0x = e1x;
+                e0y = e1y;
+                continue;
+            }
+
+            // This seems to be the triangle we've been looking for.
+            interpolated_p = p[0] * w + p[i + 1] * v + p[if i == num - 2 { 1 } else { i + 2 }] * u;
+            break;
+        }
+    }
+
+    // now we have a spectrum which corresponds to the xy chromaticities of the input. need to scale according to the
+    // input brightness X+Y+Z now:
+    interpolated_p / norm
+}
+
\ No newline at end of file diff --git a/src/clovers/textures.rs.html b/src/clovers/textures.rs.html new file mode 100644 index 00000000..51d10040 --- /dev/null +++ b/src/clovers/textures.rs.html @@ -0,0 +1,81 @@ +textures.rs - source
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
+
//! Textures enable different surface textures for colorizing objects in various ways.
+
+pub mod solid_color;
+pub mod spatial_checker;
+pub mod surface_checker;
+
+use enum_dispatch::enum_dispatch;
+use palette::LinSrgb;
+pub use solid_color::*;
+pub use spatial_checker::*;
+pub use surface_checker::*;
+
+use crate::{Float, Vec3};
+
+#[enum_dispatch(TextureTrait)]
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// A texture enum.
+#[cfg_attr(feature = "serde-derive", serde(tag = "kind"))]
+pub enum Texture {
+    /// SolidColor texture
+    SolidColor(SolidColor),
+    /// SpatialChecker texture
+    SpatialChecker(SpatialChecker),
+    /// SurfaceChecker texture
+    SurfaceChecker(SurfaceChecker),
+}
+
+#[enum_dispatch]
+pub(crate) trait TextureTrait {
+    /// Evaluates the color of the texture at the given surface coordinates or spatial coordinate.
+    #[must_use]
+    fn color(&self, u: Float, v: Float, position: Vec3) -> LinSrgb;
+}
+
+impl Default for Texture {
+    fn default() -> Self {
+        SolidColor::default().into()
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/textures/solid_color.rs.html b/src/clovers/textures/solid_color.rs.html new file mode 100644 index 00000000..1d1bb9ae --- /dev/null +++ b/src/clovers/textures/solid_color.rs.html @@ -0,0 +1,81 @@ +solid_color.rs - source
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
+
//! A solid color texture.
+
+use palette::{convert::IntoColorUnclamped, LinSrgb, Srgb};
+
+use crate::{Float, Vec3};
+
+use super::TextureTrait;
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// A solid color texture. Simplest possible [Texture](crate::textures::Texture): returns a solid color at any surface coordinate or spatial position.
+pub struct SolidColor {
+    /// The color of the [Texture](crate::textures::Texture).
+    pub color: Srgb,
+}
+
+impl TextureTrait for SolidColor {
+    /// Evaluates the color ignoring the given surface coordinates and spatial position - always returns the solid color.
+    #[must_use]
+    fn color(&self, _u: Float, _v: Float, _position: Vec3) -> LinSrgb {
+        self.color.into_color_unclamped()
+    }
+}
+
+impl SolidColor {
+    /// Creates a new solid color texture with the specified color.
+    #[must_use]
+    pub fn new(color: Srgb) -> Self {
+        SolidColor { color }
+    }
+}
+
+impl Default for SolidColor {
+    fn default() -> Self {
+        // 18% grey
+        Self {
+            color: LinSrgb::new(0.18, 0.18, 0.18).into_color_unclamped(),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/textures/spatial_checker.rs.html b/src/clovers/textures/spatial_checker.rs.html new file mode 100644 index 00000000..b691f937 --- /dev/null +++ b/src/clovers/textures/spatial_checker.rs.html @@ -0,0 +1,143 @@ +spatial_checker.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+
//! Checkered texture based on the world coordinates.
+
+// TODO: object-aligned spatial checker?
+
+use palette::convert::IntoColorUnclamped;
+use palette::{LinSrgb, Srgb};
+
+use super::TextureTrait;
+use crate::{Float, Vec3, PI};
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// A standard checkered texture based on spatial 3D texturing.
+pub struct SpatialChecker {
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_even"))]
+    /// Uniform color for the even-numbered checkers of the texture.
+    pub even: Srgb,
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_odd"))]
+    /// Uniform color for the odd-numbered checkers of the texture.
+    pub odd: Srgb,
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_density_spatial"))]
+    /// Controls the density of the checkered pattern. Default value is 1.0, which corresponds to filling a 1.0 unit cube in the coordinate system with one color of the pattern. Even values preferred - odd values may create a visually thicker stripe due to two stripes with same color being next to each other.
+    pub density: Float,
+}
+
+#[cfg(feature = "serde-derive")]
+fn default_even() -> Srgb {
+    // White minus middle gray 18%
+    LinSrgb::new(0.82, 0.82, 0.82).into_color_unclamped()
+}
+
+#[cfg(feature = "serde-derive")]
+fn default_odd() -> Srgb {
+    // Middle gray 18%
+    LinSrgb::new(0.18, 0.18, 0.18).into_color_unclamped()
+}
+
+#[cfg(feature = "serde-derive")]
+fn default_density_spatial() -> Float {
+    1.0
+}
+
+impl SpatialChecker {
+    /// Create a new `SpatialChecker` object with the specified colors and density.
+    #[must_use]
+    pub fn new(color1: Srgb, color2: Srgb, density: Float) -> Self {
+        SpatialChecker {
+            even: color1,
+            odd: color2,
+            density,
+        }
+    }
+}
+
+impl TextureTrait for SpatialChecker {
+    /// Evaluates the color at the given spatial position coordinate. Note that the `SpatialChecker` is spatial - surface coordinates are ignored.
+    #[must_use]
+    fn color(&self, _u: Float, _v: Float, position: Vec3) -> LinSrgb {
+        // TODO: convert ahead-of-time. NOTE: take into account serde-i-fication; not enough to do in `new` alone
+        let density = self.density * PI;
+        let sines = 1.0 // cosmetic 1 for readability of following lines :)
+            * (density * position.x).sin()
+            * (density * position.y).sin()
+            * (density * position.z).sin();
+        if sines < 0.0 {
+            self.odd.into_color_unclamped()
+        } else {
+            self.even.into_color_unclamped()
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/textures/surface_checker.rs.html b/src/clovers/textures/surface_checker.rs.html new file mode 100644 index 00000000..9e1dde2c --- /dev/null +++ b/src/clovers/textures/surface_checker.rs.html @@ -0,0 +1,133 @@ +surface_checker.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+
//! Checkered texture based on the surface coordinates of an object.
+
+use palette::convert::IntoColorUnclamped;
+use palette::{LinSrgb, Srgb};
+
+use super::TextureTrait;
+use crate::{Float, Vec3, PI};
+
+#[derive(Clone, Debug)]
+#[cfg_attr(feature = "serde-derive", derive(serde::Serialize, serde::Deserialize))]
+/// A standard checkered texture based on 2D surface UV coordinates.
+pub struct SurfaceChecker {
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_even"))]
+    pub(crate) even: Srgb,
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_odd"))]
+    pub(crate) odd: Srgb,
+    #[cfg_attr(feature = "serde-derive", serde(default = "default_density_surface"))]
+    /// Controls the density of the checkered pattern. Default value is 10, which corresponds to using 10 tiles over the width of the object. On spheres, this means 10 tiles around the sphere.
+    pub(crate) density: Float,
+}
+
+#[cfg(feature = "serde-derive")]
+fn default_even() -> Srgb {
+    // White minus middle gray 18%
+    LinSrgb::new(0.82, 0.82, 0.82).into_color_unclamped()
+}
+
+#[cfg(feature = "serde-derive")]
+fn default_odd() -> Srgb {
+    // Middle gray 18%
+    LinSrgb::new(0.18, 0.18, 0.18).into_color_unclamped()
+}
+
+#[cfg(feature = "serde-derive")]
+fn default_density_surface() -> Float {
+    10.0
+}
+
+impl SurfaceChecker {
+    /// Create a new `SurfaceChecker` object with the specified colors and density.
+    #[must_use]
+    pub fn new(color1: Srgb, color2: Srgb, density: Float) -> Self {
+        SurfaceChecker {
+            even: color1,
+            odd: color2,
+            density,
+        }
+    }
+}
+
+impl TextureTrait for SurfaceChecker {
+    /// Evaluates the color at the given surface position coordinates. Note that `SurfaceChecker` is surface-based, and thus ignores the spatial position coordinate.
+    #[must_use]
+    fn color(&self, u: Float, v: Float, _position: Vec3) -> LinSrgb {
+        // TODO: convert ahead-of-time. NOTE: take into account serde-i-fication; not enough to do in `new` alone
+        let density = self.density * PI;
+        let sines = 1.0 // cosmetic 1 for readability of following lines :)
+              * (density * u).sin()
+              * (density * v).sin();
+        if sines < 0.0 {
+            self.odd.into_color_unclamped()
+        } else {
+            self.even.into_color_unclamped()
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/clovers/wavelength.rs.html b/src/clovers/wavelength.rs.html new file mode 100644 index 00000000..21b26ae1 --- /dev/null +++ b/src/clovers/wavelength.rs.html @@ -0,0 +1,125 @@ +wavelength.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+
//! The fundamental building blocks of spectral rendering.
+
+use core::{array::from_fn, ops::Range};
+use palette::{white_point::E, Xyz};
+use rand::rngs::SmallRng;
+use rand_distr::uniform::SampleRange;
+
+use crate::Float;
+
+/// Wavelength in nanometers
+pub type Wavelength = usize;
+
+/// The lower bound for the wavelengths, inclusive
+pub const MIN_WAVELENGTH: Wavelength = 380;
+/// The upper bound for the wavelenghts, exclusive
+pub const MAX_WAVELENGTH: Wavelength = 780;
+/// The range of wavelenghts used, inclusive low, exclusive high
+pub const SPECTRUM: Range<Wavelength> = MIN_WAVELENGTH..MAX_WAVELENGTH;
+/// The length of the wavelength spectrum used
+pub const SPECTRUM_SIZE: usize = MAX_WAVELENGTH - MIN_WAVELENGTH;
+/// The probability of picking a specific wavelength
+#[allow(clippy::cast_precision_loss)]
+pub const WAVELENGTH_PROBABILITY: Float = 1.0 / (SPECTRUM_SIZE as Float);
+/// The count of wavelenghts used per ray in Hero Wavelength Sampling
+pub const WAVE_SAMPLE_COUNT: usize = 4;
+
+/// Return a random wavelength, sampled uniformly from the visible spectrum.
+pub fn random_wavelength(rng: &mut SmallRng) -> Wavelength {
+    SPECTRUM.sample_single(rng)
+}
+
+/// Given a hero wavelength, create additional equidistant wavelengths in the visible spectrum. Returns an array of wavelengths, with the original hero wavelength as the first one.
+#[must_use]
+pub fn rotate_wavelength(hero: Wavelength) -> [Wavelength; WAVE_SAMPLE_COUNT] {
+    from_fn(|j| {
+        (hero - MIN_WAVELENGTH + (j * SPECTRUM_SIZE / WAVE_SAMPLE_COUNT)) % SPECTRUM_SIZE
+            + MIN_WAVELENGTH
+    })
+}
+
+/// Helper function adapted from <https://en.wikipedia.org/wiki/CIE_1931_color_space#Analytical_approximation>
+fn gaussian(x: Float, alpha: Float, mu: Float, sigma1: Float, sigma2: Float) -> Float {
+    let t = (x - mu) / (if x < mu { sigma1 } else { sigma2 });
+    alpha * (-(t * t) / 2.0).exp()
+}
+
+/// Helper function adapted from <https://en.wikipedia.org/wiki/CIE_1931_color_space#Analytical_approximation>
+#[allow(clippy::cast_precision_loss)]
+#[must_use]
+pub fn wavelength_into_xyz(lambda: Wavelength) -> Xyz<E> {
+    // With the wavelength λ measured in nanometers, we then approximate the 1931 color matching functions:
+    let l: Float = lambda as Float;
+    let x = 0.0 // for readability of next lines
+        + gaussian(l, 1.056, 599.8, 37.9, 31.0)
+        + gaussian(l, 0.362, 442.0, 16.0, 26.7)
+        + gaussian(l, -0.065, 501.1, 20.4, 26.2);
+    let y = gaussian(l, 0.821, 568.8, 46.9, 40.5) + gaussian(l, 0.286, 530.9, 16.3, 31.1);
+    let z = gaussian(l, 1.217, 437.0, 11.8, 36.0) + gaussian(l, 0.681, 459.0, 26.0, 13.8);
+
+    // The functions above have been designed for the whitepoint E
+    Xyz::<E>::new(x, y, z)
+}
+
\ No newline at end of file diff --git a/src/clovers_cli/draw_cpu.rs.html b/src/clovers_cli/draw_cpu.rs.html new file mode 100644 index 00000000..4bdcb0fe --- /dev/null +++ b/src/clovers_cli/draw_cpu.rs.html @@ -0,0 +1,253 @@ +draw_cpu.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+
use crate::{colorize::colorize, normals::normal_map, ray::Ray, scenes, Float};
+use clovers::RenderOpts;
+use indicatif::{ProgressBar, ProgressDrawTarget, ProgressStyle};
+use palette::chromatic_adaptation::AdaptInto;
+use palette::convert::IntoColorUnclamped;
+use palette::white_point::E;
+use palette::{IntoColor, LinSrgb, Srgb, Xyz};
+use rand::rngs::SmallRng;
+use rand::{Rng, SeedableRng};
+use rayon::prelude::*;
+use scenes::Scene;
+
+/// The main drawing function, returns a `Vec<Srgb>` as a pixelbuffer.
+pub fn draw(opts: RenderOpts, scene: &Scene) -> Vec<Srgb<u8>> {
+    let width = opts.width as usize;
+    let height = opts.height as usize;
+    let bar = progress_bar(&opts);
+
+    let pixelbuffer: Vec<Srgb<u8>> = (0..height)
+        .into_par_iter()
+        .map(|row_index| {
+            let mut rng = SmallRng::from_entropy();
+            let mut row = Vec::with_capacity(width);
+            for index in 0..width {
+                let index = index + row_index * width;
+                if opts.normalmap {
+                    row.push(render_pixel_normalmap(scene, &opts, index, &mut rng));
+                } else {
+                    row.push(render_pixel(scene, &opts, index, &mut rng));
+                }
+            }
+            bar.inc(1);
+            row
+        })
+        .flatten()
+        .collect();
+
+    pixelbuffer
+}
+
+// Render a single pixel, including possible multisampling
+fn render_pixel(scene: &Scene, opts: &RenderOpts, index: usize, rng: &mut SmallRng) -> Srgb<u8> {
+    let (x, y, width, height) = index_to_params(opts, index);
+    let mut color: LinSrgb = LinSrgb::new(0.0, 0.0, 0.0);
+    for _sample in 0..opts.samples {
+        if let Some(s) = sample(scene, x, y, width, height, rng, opts.max_depth) {
+            color += s
+        }
+    }
+    color /= opts.samples as Float;
+    let color: Srgb = color.into_color();
+    let color: Srgb<u8> = color.into_format();
+    color
+}
+
+// Render a single pixel in normalmap mode
+fn render_pixel_normalmap(
+    scene: &Scene,
+    opts: &RenderOpts,
+    index: usize,
+    rng: &mut SmallRng,
+) -> Srgb<u8> {
+    let (x, y, width, height) = index_to_params(opts, index);
+    let color: LinSrgb = sample_normalmap(scene, x, y, width, height, rng);
+    let color: Srgb = color.into_color();
+    let color: Srgb<u8> = color.into_format();
+    color
+}
+
+// Get a single sample for a single pixel in the scene, normalmap mode.
+fn sample_normalmap(
+    scene: &Scene,
+    x: Float,
+    y: Float,
+    width: Float,
+    height: Float,
+    rng: &mut SmallRng,
+) -> LinSrgb {
+    let u = x / width;
+    let v = y / height;
+    let ray: Ray = scene.camera.get_ray(u, v, rng);
+    let color = normal_map(&ray, scene, rng);
+    color.into_color()
+}
+
+/// Get a single sample for a single pixel in the scene. Has slight jitter for antialiasing when multisampling.
+fn sample(
+    scene: &Scene,
+    x: Float,
+    y: Float,
+    width: Float,
+    height: Float,
+    rng: &mut SmallRng,
+    max_depth: u32,
+) -> Option<LinSrgb> {
+    let u = (x + rng.gen::<Float>()) / width;
+    let v = (y + rng.gen::<Float>()) / height;
+    let ray: Ray = scene.camera.get_ray(u, v, rng);
+    let color: Xyz<E> = colorize(&ray, scene, 0, max_depth, rng);
+    let color: Xyz = color.adapt_into();
+    let color: LinSrgb = color.into_color_unclamped();
+    if color.red.is_finite() && color.green.is_finite() && color.blue.is_finite() {
+        return Some(color);
+    }
+    None
+}
+
+fn index_to_params(opts: &RenderOpts, index: usize) -> (Float, Float, Float, Float) {
+    let x = (index % (opts.width as usize)) as Float;
+    let y = (index / (opts.width as usize)) as Float;
+    let width = opts.width as Float;
+    let height = opts.height as Float;
+    (x, y, width, height)
+}
+
+fn progress_bar(opts: &RenderOpts) -> ProgressBar {
+    let bar = ProgressBar::new(opts.height as u64);
+    if opts.quiet {
+        bar.set_draw_target(ProgressDrawTarget::hidden())
+    } else {
+        bar.set_style(ProgressStyle::default_bar().template(
+            "Elapsed:   {elapsed_precise}\nRows:      {bar} {pos}/{len}\nRemaining: {eta_precise}",
+        ).unwrap());
+    }
+    bar
+}
+
\ No newline at end of file diff --git a/src/clovers_cli/json_scene.rs.html b/src/clovers_cli/json_scene.rs.html new file mode 100644 index 00000000..f2bb993e --- /dev/null +++ b/src/clovers_cli/json_scene.rs.html @@ -0,0 +1,47 @@ +json_scene.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+
use clovers::scenes::{self, Scene, SceneFile};
+use std::error::Error;
+use std::fs::File;
+use std::io::Read;
+use std::path::Path;
+
+use tracing::info;
+
+pub(crate) fn initialize<'scene>(
+    path: &Path,
+    width: u32,
+    height: u32,
+) -> Result<Scene<'scene>, Box<dyn Error>> {
+    let mut file = File::open(path)?;
+    let mut contents: String = String::new();
+    file.read_to_string(&mut contents)?;
+    info!("Parsing the scene file");
+    let scene_file: SceneFile = serde_json::from_str(&contents)?;
+    info!("Initializing the scene");
+    let scene: Scene = scenes::initialize(scene_file, width, height);
+    info!("Count of nodes in the BVH tree: {}", scene.hitables.count());
+    Ok(scene)
+}
+
\ No newline at end of file diff --git a/src/clovers_cli/main.rs.html b/src/clovers_cli/main.rs.html new file mode 100644 index 00000000..2570e4a5 --- /dev/null +++ b/src/clovers_cli/main.rs.html @@ -0,0 +1,367 @@ +main.rs - source
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
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+
//! Command Line Interface for the raytracing renderer.
+//!
+//! CPU-based rendering is fully functional. GPU-based rendering is at early experimentation stage only.
+
+#![deny(clippy::all)]
+
+// External imports
+use clap::Parser;
+use humantime::format_duration;
+use image::{ImageBuffer, ImageOutputFormat, Rgb, RgbImage};
+use img_parts::png::{Png, PngChunk};
+use std::fs::File;
+use std::io::Cursor;
+use std::path::Path;
+use std::{error::Error, fs, time::Instant};
+use time::OffsetDateTime;
+use tracing::{debug, info, Level};
+use tracing_subscriber::fmt::time::UtcTime;
+
+// Internal imports
+use clovers::*;
+mod draw_cpu;
+mod json_scene;
+
+// Configure CLI parameters
+#[derive(Parser)]
+#[clap(version = "0.1.0", author = "Walther", name = "clovers")]
+struct Opts {
+    /// Input filename / location
+    #[clap(short, long)]
+    input: String,
+    /// Output filename / location. [default: renders/timestamp.png]
+    #[clap(short, long)]
+    output: Option<String>,
+    /// Width of the image in pixels
+    #[clap(short, long, default_value = "1024")]
+    width: u32,
+    /// Height of the image in pixels
+    #[clap(short, long, default_value = "1024")]
+    height: u32,
+    /// Number of samples to generate per each pixel
+    #[clap(short, long, default_value = "100")]
+    samples: u32,
+    /// Maximum evaluated bounce depth for each ray
+    #[clap(short = 'd', long, default_value = "100")]
+    max_depth: u32,
+    /// Suppress most of the text output
+    #[clap(short, long)]
+    quiet: bool,
+    /// Use the GPU draw process instead of CPU
+    #[clap(long)]
+    gpu: bool,
+    /// Enable some debug logging
+    #[clap(long)]
+    debug: bool,
+    /// Render a normal map only. Experimental feature.
+    #[clap(long)]
+    normalmap: bool,
+}
+
+fn main() -> Result<(), Box<dyn Error>> {
+    let Opts {
+        input,
+        output,
+        width,
+        height,
+        samples,
+        max_depth,
+        quiet,
+        gpu,
+        debug,
+        normalmap,
+    } = Opts::parse();
+
+    if debug {
+        tracing_subscriber::fmt()
+            .with_max_level(Level::DEBUG)
+            .with_timer(UtcTime::rfc_3339())
+            .init();
+        debug!("Debug logging enabled");
+    } else {
+        tracing_subscriber::fmt()
+            .with_max_level(Level::ERROR)
+            .with_timer(UtcTime::rfc_3339())
+            .init();
+    }
+
+    // Pretty printing output, unless in quiet mode
+    if !quiet {
+        println!("clovers 🍀 path tracing renderer");
+        println!();
+        println!("{width}x{height} resolution");
+        println!("{samples} samples per pixel");
+        println!("{max_depth} max bounce depth");
+        println!(); // Empty line before progress bar
+    }
+
+    let renderopts: RenderOpts = RenderOpts {
+        width,
+        height,
+        samples,
+        max_depth,
+        quiet,
+        normalmap,
+    };
+    let threads = std::thread::available_parallelism()?;
+
+    info!("Reading the scene file");
+    let path = Path::new(&input);
+    let scene = match path.extension() {
+        Some(ext) => match &ext.to_str() {
+            Some("json") => json_scene::initialize(path, width, height),
+            _ => panic!("Unknown file type"),
+        },
+        None => panic!("Unknown file type"),
+    }?;
+
+    info!("Calling draw()");
+    let start = Instant::now();
+    let pixelbuffer = match gpu {
+        // Note: live progress bar printed within draw_cpu::draw
+        false => draw_cpu::draw(renderopts, &scene),
+        true => unimplemented!("GPU accelerated rendering is currently unimplemented"),
+    };
+    info!("Drawing a pixelbuffer finished");
+
+    info!("Converting pixelbuffer to an image");
+    let mut img: RgbImage = ImageBuffer::new(width, height);
+    img.enumerate_pixels_mut().for_each(|(x, y, pixel)| {
+        let index = y * width + x;
+        *pixel = Rgb(pixelbuffer[index as usize].into());
+    });
+
+    // Graphics assume origin at bottom left corner of the screen
+    // Our buffer writes pixels from top left corner. Simple fix, just flip it!
+    image::imageops::flip_vertical_in_place(&mut img);
+    // TODO: fix the coordinate system
+
+    let duration = Instant::now() - start;
+    let formatted_duration = format_duration(duration);
+    info!("Finished render in {}", formatted_duration);
+
+    if !quiet {
+        println!("Finished render in {}", formatted_duration);
+    }
+
+    info!("Writing an image file");
+
+    let mut bytes: Vec<u8> = Vec::new();
+    img.write_to(&mut Cursor::new(&mut bytes), ImageOutputFormat::Png)?;
+    let mut png = Png::from_bytes(bytes.into())?;
+
+    let comment = if normalmap {
+        format!("Comment\0{input} rendered with the clovers raytracing engine at {width}x{height} in normalmap mode. finished render in {formatted_duration}, using {threads} threads")
+    } else {
+        format!("Comment\0{input} rendered with the clovers raytracing engine at {width}x{height}, {samples} samples per pixel, {max_depth} max ray bounce depth. finished render in {formatted_duration}, using {threads} threads")
+    };
+    let software = "Software\0https://github.com/walther/clovers".to_string();
+
+    for metadata in [comment, software] {
+        let bytes = metadata.as_bytes().to_owned();
+        let chunk = PngChunk::new([b't', b'E', b'X', b't'], bytes.into());
+        png.chunks_mut().push(chunk);
+    }
+
+    let target = match output {
+        Some(filename) => filename,
+        None => {
+            // Default to using a timestamp & `renders/` directory
+            let timestamp = OffsetDateTime::now_utc().unix_timestamp();
+            fs::create_dir_all("renders")?;
+            format!("renders/{}.png", timestamp)
+        }
+    };
+
+    let output = File::create(&target)?;
+    png.encoder().write_to(output)?;
+
+    info!("Image saved to {}", target);
+    println!("Image saved to: {}", target);
+
+    Ok(())
+}
+
\ No newline at end of file diff --git a/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static.files/COPYRIGHT-23e9bde6c69aea69.txt new file mode 100644 index 00000000..1447df79 --- /dev/null +++ b/static.files/COPYRIGHT-23e9bde6c69aea69.txt @@ -0,0 +1,50 @@ +# REUSE-IgnoreStart + +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.ttf.woff2, + SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, + SourceSerif4-It.ttf.woff2): + + Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name + 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United + States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerif4-LICENSE.md. + +This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt new file mode 100644 index 00000000..d7e9c149 --- /dev/null +++ b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt @@ -0,0 +1,98 @@ +// REUSE-IgnoreStart + +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 new file mode 100644 index 00000000..7a1e5fc5 Binary files /dev/null and b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 differ diff --git a/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 new file mode 100644 index 00000000..e766e06c Binary files /dev/null and b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 differ diff --git a/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt new file mode 100644 index 00000000..16fe87b0 --- /dev/null +++ b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static.files/LICENSE-MIT-65090b722b3f6c56.txt new file mode 100644 index 00000000..31aa7938 --- /dev/null +++ b/static.files/LICENSE-MIT-65090b722b3f6c56.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 new file mode 100644 index 00000000..1866ad4b Binary files /dev/null and b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 differ diff --git a/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt new file mode 100644 index 00000000..4b3edc29 --- /dev/null +++ b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt @@ -0,0 +1,103 @@ +// REUSE-IgnoreStart + +Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), + +with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, +NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, +Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, +NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, +Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 new file mode 100644 index 00000000..462c34ef Binary files /dev/null and b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 differ diff --git a/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt new file mode 100644 index 00000000..0d2941e1 --- /dev/null +++ b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt @@ -0,0 +1,97 @@ +// REUSE-IgnoreStart + +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 new file mode 100644 index 00000000..10b558e0 Binary files /dev/null and b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 differ diff --git a/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 new file mode 100644 index 00000000..5ec64eef Binary files /dev/null and b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 differ diff --git a/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 new file mode 100644 index 00000000..181a07f6 Binary files /dev/null and b/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 differ diff --git a/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 new file mode 100644 index 00000000..2ae08a7b Binary files /dev/null and b/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 differ diff --git a/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md new file mode 100644 index 00000000..175fa4f4 --- /dev/null +++ b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md @@ -0,0 +1,98 @@ + + +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. +Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + + diff --git a/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 new file mode 100644 index 00000000..0263fc30 Binary files /dev/null and b/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 differ diff --git a/static.files/clipboard-7571035ce49a181d.svg b/static.files/clipboard-7571035ce49a181d.svg new file mode 100644 index 00000000..8adbd996 --- /dev/null +++ b/static.files/clipboard-7571035ce49a181d.svg @@ -0,0 +1 @@ + diff --git a/static.files/favicon-16x16-8b506e7a72182f1c.png b/static.files/favicon-16x16-8b506e7a72182f1c.png new file mode 100644 index 00000000..ea4b45ca Binary files /dev/null and b/static.files/favicon-16x16-8b506e7a72182f1c.png differ diff --git a/static.files/favicon-2c020d218678b618.svg b/static.files/favicon-2c020d218678b618.svg new file mode 100644 index 00000000..8b34b511 --- /dev/null +++ b/static.files/favicon-2c020d218678b618.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/static.files/favicon-32x32-422f7d1d52889060.png b/static.files/favicon-32x32-422f7d1d52889060.png new file mode 100644 index 00000000..69b8613c Binary files /dev/null and b/static.files/favicon-32x32-422f7d1d52889060.png differ diff --git a/static.files/main-9dd44ab47b99a0fb.js b/static.files/main-9dd44ab47b99a0fb.js new file mode 100644 index 00000000..cfb9a38f --- /dev/null +++ b/static.files/main-9dd44ab47b99a0fb.js @@ -0,0 +1,12 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function elemIsInParent(elem,parent){while(elem&&elem!==document.body){if(elem===parent){return true}elem=elem.parentElement}return false}function blurHandler(event,parentElem,hideCallback){if(!elemIsInParent(document.activeElement,parentElem)&&!elemIsInParent(event.relatedTarget,parentElem)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.body,"crate")){mobileTitle.innerText=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}})}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.body,"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;if(link.href===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";if(window.rootPath!=="./"&&crate===window.currentCrate){link.className="current"}link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,e)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static.files/normalize-76eba96aa4d2e634.css b/static.files/normalize-76eba96aa4d2e634.css new file mode 100644 index 00000000..469959f1 --- /dev/null +++ b/static.files/normalize-76eba96aa4d2e634.css @@ -0,0 +1,2 @@ + /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static.files/noscript-5d8b3c7633ad77ba.css b/static.files/noscript-5d8b3c7633ad77ba.css new file mode 100644 index 00000000..8c63ef06 --- /dev/null +++ b/static.files/noscript-5d8b3c7633ad77ba.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);}@media (prefers-color-scheme:dark){:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);}} \ No newline at end of file diff --git a/static.files/rust-logo-151179464ae7ed46.svg b/static.files/rust-logo-151179464ae7ed46.svg new file mode 100644 index 00000000..62424d8f --- /dev/null +++ b/static.files/rust-logo-151179464ae7ed46.svg @@ -0,0 +1,61 @@ + + + diff --git a/static.files/rustdoc-9ee3a5e31a2afa3e.css b/static.files/rustdoc-9ee3a5e31a2afa3e.css new file mode 100644 index 00000000..8749d0eb --- /dev/null +++ b/static.files/rustdoc-9ee3a5e31a2afa3e.css @@ -0,0 +1,10 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.small-section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 200px;overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;}.rustdoc.src .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;z-index:1;}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.src .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:300px;}.src-sidebar-expanded .src .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.5rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.5rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;margin-top:calc((-16px + 0.57rem ) / 2 );}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.method .where,.fn .where,.where.fmt-newline{display:block;white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.small-section-header{display:block;position:relative;}.small-section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block a.current{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:2;margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{min-height:36px;display:flex;padding:3px;margin-bottom:5px;align-items:center;vertical-align:text-bottom;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji{font-size:1.25rem;margin-right:0.3rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#settings-menu>a,#help-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:var(--settings-button-border-focus);}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.src-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;margin-bottom:var(--nav-sub-mobile-padding);}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"]{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a,:root[data-theme="ayu"] #source-sidebar>.title{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img{filter:invert(100);} \ No newline at end of file diff --git a/static.files/scrape-examples-ef1e698c1d417c0c.js b/static.files/scrape-examples-ef1e698c1d417c0c.js new file mode 100644 index 00000000..ba830e37 --- /dev/null +++ b/static.files/scrape-examples-ef1e698c1d417c0c.js @@ -0,0 +1 @@ +"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static.files/search-8fbf244ebcf71464.js b/static.files/search-8fbf244ebcf71464.js new file mode 100644 index 00000000..168023b4 --- /dev/null +++ b/static.files/search-8fbf244ebcf71464.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias","generic",];const longItemTypes=["module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","primitive type","assoc type","constant","assoc const","union","foreign type","keyword","existential type","attribute macro","derive macro","trait alias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const TY_GENERIC=itemTypes.indexOf("generic");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;function buildTypeMapIndex(name){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){return typeNameIdMap.get(name)}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,id);return id}}function isWhitespace(c){return" \t\n\r".indexOf(c)!==-1}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return",>-]".indexOf(c)!==-1}function isStopCharacter(c){return isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","}function isPathSeparator(c){return c===":"||isWhitespace(c)}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(!isWhitespace(c)){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}return{name:"never",id:null,fullPath:["never"],pathWithoutLast:[],pathLast:"never",generics:[],typeFilter:"primitive",}}if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(path.includes("::::")){throw["Unexpected ","::::"]}else if(path.includes(" ::")){throw["Unexpected "," ::"]}else if(path.includes(":: ")){throw["Unexpected ",":: "]}const pathSegments=path.split(/::|\s+/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast:pathSegments[pathSegments.length-1],generics:generics,typeFilter,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",","," or ",endChar,...extra,", found ",c,]}throw["Expected ",",",...extra,", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;let start=parserState.pos;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}else if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(isWhitespace(c)){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}}userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of result_list){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(result_list)}function checkGenerics(fnType,queryElem,whereClause,mgensInout){return unifyFunctionTypes(fnType.generics,queryElem.generics,whereClause,mgensInout,mgens=>{if(mgensInout){for(const[fid,qid]of mgens.entries()){mgensInout.set(fid,qid)}}return true})}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb){let mgens=new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;let fl=fnTypesIn.length;let fnTypes=fnTypesIn.slice();const backtracking=[];let i=0;let j=0;const backtrack=()=>{while(backtracking.length!==0){const{fnTypesScratch,mgensScratch,queryElemsOffset,fnTypesOffset,unbox,}=backtracking.pop();mgens=new Map(mgensScratch);const fnType=fnTypesScratch[fnTypesOffset];const queryElem=queryElems[queryElemsOffset];if(unbox){if(fnType.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}mgens.set(fnType.id,0)}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;fnTypes=fnTypesScratch.toSpliced(fnTypesOffset,1,...generics);fl=fnTypes.length;i=queryElemsOffset-1}else{if(fnType.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}mgens.set(fnType.id,queryElem.id)}fnTypes=fnTypesScratch.slice();fl=fnTypes.length;const tmp=fnTypes[queryElemsOffset];fnTypes[queryElemsOffset]=fnTypes[fnTypesOffset];fnTypes[fnTypesOffset]=tmp;i=queryElemsOffset}return true}return false};for(i=0;i!==ql;++i){const queryElem=queryElems[i];const matchCandidates=[];let fnTypesScratch=null;let mgensScratch=null;for(j=i;j!==fl;++j){const fnType=fnTypes[j];if(unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){if(!fnTypesScratch){fnTypesScratch=fnTypes.slice()}unifyFunctionTypes(fnType.generics,queryElem.generics,whereClause,mgens,mgensScratch=>{matchCandidates.push({fnTypesScratch,mgensScratch,queryElemsOffset:i,fnTypesOffset:j,unbox:false,});return false})}if(unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){if(!fnTypesScratch){fnTypesScratch=fnTypes.slice()}if(!mgensScratch){mgensScratch=new Map(mgens)}backtracking.push({fnTypesScratch,mgensScratch,queryElemsOffset:i,fnTypesOffset:j,unbox:true,})}}if(matchCandidates.length===0){if(backtrack()){continue}else{return false}}const{fnTypesOffset:candidate,mgensScratch:mgensNew}=matchCandidates.pop();if(fnTypes[candidate].id<0&&queryElems[i].id<0){mgens.set(fnTypes[candidate].id,queryElems[i].id)}for(const[fid,qid]of mgensNew){mgens.set(fid,qid)}const tmp=fnTypes[candidate];fnTypes[candidate]=fnTypes[i];fnTypes[i]=tmp;for(const otherCandidate of matchCandidates){backtracking.push(otherCandidate)}while(i===(ql-1)&&solutionCb&&!solutionCb(mgens)){if(!backtrack()){return false}}}return true}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgens.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(fnType.id!==queryElem.id){return false}if(fnType.generics.length===0&&queryElem.generics.length!==0){return false}const queryElemPathLength=queryElem.pathWithoutLast.length;if(queryElemPathLength>0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i=0){if(!whereClause){return false}if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause)}else if(fnType.generics&&fnType.generics.length>0){return checkIfInList(fnType.generics,queryElem,whereClause)}return false}function checkIfInList(list,elem,whereClause){for(const entry of list){if(checkType(entry,elem,whereClause)){return true}}return false}function checkType(row,elem,whereClause){if(row.id===null){return row.generics.length>0?checkIfInList(row.generics,elem,whereClause):false}if(row.id<0&&elem.id>=0){const gid=(-row.id)-1;return checkIfInList(whereClause[gid],elem,whereClause)}if(row.id<0&&elem.id<0){return true}const matchesExact=row.id===elem.id;const matchesArrayOrSlice=elem.id===typeNameIdOfArrayOrSlice&&(row.id===typeNameIdOfSlice||row.id===typeNameIdOfArray);if((matchesExact||matchesArrayOrSlice)&&typePassesFilter(elem.typeFilter,row.ty)){if(elem.generics.length>0){return checkGenerics(row,elem,whereClause,new Map())}return true}return checkIfInList(row.generics,elem,whereClause)}function checkPath(contains,ty,maxEditDistance){if(contains.length===0){return 0}let ret_dist=maxEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return maxEditDistance+1}for(let i=0;ilength){break}let dist_total=0;let aborted=false;for(let x=0;xmaxEditDistance){aborted=true;break}dist_total+=dist}if(!aborted){ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}}return ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,deprecated:item.deprecated,implDisambiguator:item.implDisambiguator,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){const inBounds=dist<=maxEditDistance||index!==-1;if(dist===0||(!parsedQuery.literalSearch&&inBounds)){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let index=-1,path_dist=0;const fullId=row.id;const searchWord=searchWords[pos];const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause);if(in_args){addIntoResults(results_in_args,fullId,pos,-1,0,0,maxEditDistance)}const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause);if(returned){addIntoResults(results_returned,fullId,pos,-1,0,0,maxEditDistance)}if(!typePassesFilter(elem.typeFilter,row.ty)){return}const row_index=row.normalizedName.indexOf(elem.pathLast);const word_index=searchWord.indexOf(elem.pathLast);if(row_index===-1){index=word_index}else if(word_index===-1){index=row_index}else if(word_index1){path_dist=checkPath(elem.pathWithoutLast,row,maxEditDistance);if(path_dist>maxEditDistance){return}}if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(searchWord,elem.pathLast,maxEditDistance);if(index===-1&&dist+path_dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens)})){return}addIntoResults(results,row.id,pos,0,0,0,Number.MAX_VALUE)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem){if(typeNameIdMap.has(elem.pathLast)){elem.id=typeNameIdMap.get(elem.pathLast)}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,id]of typeNameIdMap){const dist=editDistance(name,elem.pathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}}for(const elem of parsedQuery.elems){convertNameToId(elem)}for(const elem of parsedQuery.returned){convertNameToId(elem)}if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||editDistance(name,key,maxEditDistance)<=maxEditDistance)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";length+=1;const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}function search(e,forced){if(e){e.preventDefault()}const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.map(type=>buildItemSearchType(type,lowercasePaths))}function buildItemSearchType(type,lowercasePaths){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;let pathIndex,generics;if(typeof type==="number"){pathIndex=type;generics=[]}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths)}if(pathIndex<0){return{id:pathIndex,ty:TY_GENERIC,path:null,generics,}}if(pathIndex===0){return{id:null,ty:null,path:null,generics,}}const item=lowercasePaths[pathIndex-1];return{id:buildTypeMapIndex(item.name),ty:item.ty,path:item.path,generics,}}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}lowercasePaths.push({ty:ty,name:name.toLowerCase(),path:path});paths[i]={ty:ty,name:name,path:path}}lastPath="";len=itemTypes.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:buildFunctionSearchType(itemFunctionSearchTypes[i],lowercasePaths),id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/static.files/settings-74424d7eec62a23e.js b/static.files/settings-74424d7eec62a23e.js new file mode 100644 index 00000000..3014f75c --- /dev/null +++ b/static.files/settings-74424d7eec62a23e.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/src-script-3280b574d94e47b4.js b/static.files/src-script-3280b574d94e47b4.js new file mode 100644 index 00000000..9ea88921 --- /dev/null +++ b/static.files/src-script-3280b574d94e47b4.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth"){addClass(document.documentElement,"src-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{removeClass(document.documentElement,"src-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(srcIndex).forEach(key=>{srcIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(srcIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSrcLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSrcLines(match)}});onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static.files/storage-fec3eaa3851e447d.js b/static.files/storage-fec3eaa3851e447d.js new file mode 100644 index 00000000..a687118f --- /dev/null +++ b/static.files/storage-fec3eaa3851e447d.js @@ -0,0 +1 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func,reversed){if(arr&&arr.length>0){if(reversed){for(let i=arr.length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0)}}) \ No newline at end of file diff --git a/static.files/wheel-7b819b6101059cd0.svg b/static.files/wheel-7b819b6101059cd0.svg new file mode 100644 index 00000000..83c07f63 --- /dev/null +++ b/static.files/wheel-7b819b6101059cd0.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/trait.impl/clap_builder/derive/trait.Args.js b/trait.impl/clap_builder/derive/trait.Args.js new file mode 100644 index 00000000..94f37a55 --- /dev/null +++ b/trait.impl/clap_builder/derive/trait.Args.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers_cli":[["impl Args for Opts"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/clap_builder/derive/trait.CommandFactory.js b/trait.impl/clap_builder/derive/trait.CommandFactory.js new file mode 100644 index 00000000..f1837475 --- /dev/null +++ b/trait.impl/clap_builder/derive/trait.CommandFactory.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers_cli":[["impl CommandFactory for Opts"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/clap_builder/derive/trait.FromArgMatches.js b/trait.impl/clap_builder/derive/trait.FromArgMatches.js new file mode 100644 index 00000000..8220c3c2 --- /dev/null +++ b/trait.impl/clap_builder/derive/trait.FromArgMatches.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers_cli":[["impl FromArgMatches for Opts"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/clap_builder/derive/trait.Parser.js b/trait.impl/clap_builder/derive/trait.Parser.js new file mode 100644 index 00000000..a8b8e565 --- /dev/null +++ b/trait.impl/clap_builder/derive/trait.Parser.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers_cli":[["impl Parser for Opts"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/clovers/materials/trait.MaterialTrait.js b/trait.impl/clovers/materials/trait.MaterialTrait.js new file mode 100644 index 00000000..da47e60f --- /dev/null +++ b/trait.impl/clovers/materials/trait.MaterialTrait.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/clone/trait.Clone.js b/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 00000000..a5ff650a --- /dev/null +++ b/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl Clone for QuadInit"],["impl<'scene> Clone for Triangle<'scene>"],["impl Clone for Metal"],["impl Clone for ZeroPDF"],["impl<'scene> Clone for GLTFMaterial<'scene>"],["impl Clone for AABB"],["impl<'scene> Clone for MixturePDF<'scene>"],["impl Clone for TranslateInit"],["impl Clone for SpherePDF"],["impl Clone for CosinePDF"],["impl Clone for SurfaceChecker"],["impl Clone for RotateInit"],["impl Clone for ConeLight"],["impl Clone for Camera"],["impl Clone for Dispersive"],["impl Clone for Ray"],["impl<'scene> Clone for Translate<'scene>"],["impl Clone for Dielectric"],["impl<'scene> Clone for GLTF<'scene>"],["impl<'scene> Clone for Hitable<'scene>"],["impl<'scene> Clone for MovingSphere<'scene>"],["impl Clone for TriangleInit"],["impl Clone for CameraInit"],["impl Clone for Texture"],["impl Clone for SphereInit"],["impl Clone for Object"],["impl<'scene> Clone for Quad<'scene>"],["impl Clone for SharedMaterial"],["impl Clone for BoxyInit"],["impl Clone for MaterialType"],["impl Clone for GLTFInit"],["impl Clone for STLInit"],["impl Clone for SpatialChecker"],["impl<'scene> Clone for HitablePDF<'scene>"],["impl Clone for Interval"],["impl Clone for Material"],["impl Clone for ObjectList"],["impl Clone for SceneFile"],["impl<'scene> Clone for PDF<'scene>"],["impl Clone for ONB"],["impl Clone for Lambertian"],["impl Clone for SolidColor"],["impl Clone for DiffuseLight"],["impl<'ray> Clone for ScatterRecord<'ray>"],["impl Clone for MaterialInit"],["impl Clone for MovingSphereInit"],["impl Clone for Isotropic"],["impl<'scene> Clone for BVHNode<'scene>"],["impl Clone for RenderOpts"],["impl<'scene> Clone for STL<'scene>"],["impl Clone for Empty"],["impl<'scene> Clone for Sphere<'scene>"],["impl<'scene> Clone for ConstantMedium<'scene>"],["impl<'scene> Clone for GLTFTriangle<'scene>"],["impl Clone for ConstantMediumInit"],["impl<'scene> Clone for Boxy<'scene>"],["impl<'scene> Clone for RotateY<'scene>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialEq.js b/trait.impl/core/cmp/trait.PartialEq.js new file mode 100644 index 00000000..6f3f4116 --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl PartialEq for AABB"],["impl PartialEq for Ray"],["impl PartialEq for Interval"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.From.js b/trait.impl/core/convert/trait.From.js new file mode 100644 index 00000000..c13783b6 --- /dev/null +++ b/trait.impl/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl From<DiffuseLight> for Material"],["impl<'scene> From<MixturePDF<'scene>> for PDF<'scene>"],["impl<'scene> From<Quad<'scene>> for Hitable<'scene>"],["impl<'scene> From<Translate<'scene>> for Hitable<'scene>"],["impl From<Isotropic> for Material"],["impl<'scene> From<Triangle<'scene>> for Hitable<'scene>"],["impl<'scene> From<ConstantMedium<'scene>> for Hitable<'scene>"],["impl From<SurfaceChecker> for Texture"],["impl<'scene> From<SpherePDF> for PDF<'scene>"],["impl<'scene> From<RotateY<'scene>> for Hitable<'scene>"],["impl<'scene> From<Empty> for Hitable<'scene>"],["impl<'scene> From<ZeroPDF> for PDF<'scene>"],["impl From<Dielectric> for Material"],["impl<'scene> From<GLTFTriangle<'scene>> for Hitable<'scene>"],["impl<'scene> From<Sphere<'scene>> for Hitable<'scene>"],["impl<'scene> From<MovingSphere<'scene>> for Hitable<'scene>"],["impl<'scene> From<GLTF<'scene>> for Hitable<'scene>"],["impl From<Lambertian> for Material"],["impl From<SolidColor> for Texture"],["impl From<SpatialChecker> for Texture"],["impl<'scene> From<GLTFInit> for Vec<Hitable<'scene>>"],["impl From<Dispersive> for Material"],["impl<'scene> From<Boxy<'scene>> for Hitable<'scene>"],["impl<'scene> From<STL<'scene>> for Hitable<'scene>"],["impl<'scene> From<BVHNode<'scene>> for Hitable<'scene>"],["impl<'scene> From<CosinePDF> for PDF<'scene>"],["impl From<Metal> for Material"],["impl From<ConeLight> for Material"],["impl<'scene> From<HitablePDF<'scene>> for PDF<'scene>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.TryInto.js b/trait.impl/core/convert/trait.TryInto.js new file mode 100644 index 00000000..fef80fd2 --- /dev/null +++ b/trait.impl/core/convert/trait.TryInto.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl<'scene> TryInto<Triangle<'scene>> for Hitable<'scene>"],["impl<'scene> TryInto<ZeroPDF> for PDF<'scene>"],["impl<'scene> TryInto<MixturePDF<'scene>> for PDF<'scene>"],["impl<'scene> TryInto<ConstantMedium<'scene>> for Hitable<'scene>"],["impl<'scene> TryInto<BVHNode<'scene>> for Hitable<'scene>"],["impl TryInto<Dispersive> for Material"],["impl<'scene> TryInto<SpherePDF> for PDF<'scene>"],["impl<'scene> TryInto<Empty> for Hitable<'scene>"],["impl TryInto<Isotropic> for Material"],["impl<'scene> TryInto<STL<'scene>> for Hitable<'scene>"],["impl<'scene> TryInto<RotateY<'scene>> for Hitable<'scene>"],["impl TryInto<SurfaceChecker> for Texture"],["impl<'scene> TryInto<Boxy<'scene>> for Hitable<'scene>"],["impl<'scene> TryInto<MovingSphere<'scene>> for Hitable<'scene>"],["impl TryInto<Dielectric> for Material"],["impl<'scene> TryInto<HitablePDF<'scene>> for PDF<'scene>"],["impl<'scene> TryInto<GLTFTriangle<'scene>> for Hitable<'scene>"],["impl<'scene> TryInto<GLTF<'scene>> for Hitable<'scene>"],["impl TryInto<SpatialChecker> for Texture"],["impl<'scene> TryInto<Translate<'scene>> for Hitable<'scene>"],["impl TryInto<SolidColor> for Texture"],["impl TryInto<Lambertian> for Material"],["impl TryInto<DiffuseLight> for Material"],["impl TryInto<ConeLight> for Material"],["impl<'scene> TryInto<Sphere<'scene>> for Hitable<'scene>"],["impl<'scene> TryInto<CosinePDF> for PDF<'scene>"],["impl TryInto<Metal> for Material"],["impl<'scene> TryInto<Quad<'scene>> for Hitable<'scene>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/default/trait.Default.js b/trait.impl/core/default/trait.Default.js new file mode 100644 index 00000000..290dfa4a --- /dev/null +++ b/trait.impl/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl Default for Lambertian"],["impl Default for Isotropic"],["impl Default for Material"],["impl Default for Dispersive"],["impl<'scene> Default for GLTFMaterial<'scene>"],["impl Default for Dielectric"],["impl Default for SharedMaterial"],["impl Default for SolidColor"],["impl Default for Texture"],["impl Default for ConeLight"],["impl Default for ZeroPDF"],["impl Default for DiffuseLight"],["impl Default for MaterialInit"],["impl Default for SpherePDF"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Debug.js b/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 00000000..9eebd2ab --- /dev/null +++ b/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl Debug for ObjectList"],["impl Debug for Texture"],["impl<'scene> Debug for GLTF<'scene>"],["impl<'scene> Debug for Boxy<'scene>"],["impl Debug for TranslateInit"],["impl<'scene> Debug for Scene<'scene>"],["impl<'scene> Debug for Translate<'scene>"],["impl<'scene> Debug for ConstantMedium<'scene>"],["impl Debug for ZeroPDF"],["impl Debug for SharedMaterial"],["impl<'scene> Debug for HitablePDF<'scene>"],["impl Debug for SceneFile"],["impl Debug for Camera"],["impl Debug for MovingSphereInit"],["impl<'scene> Debug for Sphere<'scene>"],["impl Debug for MaterialInit"],["impl<'scene> Debug for BVHNode<'scene>"],["impl Debug for Interval"],["impl Debug for Lambertian"],["impl Debug for Material"],["impl<'scene> Debug for GLTFMaterial<'scene>"],["impl<'ray> Debug for ScatterRecord<'ray>"],["impl Debug for ConstantMediumInit"],["impl Debug for SpatialChecker"],["impl Debug for GLTFInit"],["impl Debug for CosinePDF"],["impl<'scene> Debug for RotateY<'scene>"],["impl<'scene> Debug for PDF<'scene>"],["impl<'scene> Debug for GLTFTriangle<'scene>"],["impl<'scene> Debug for Hitable<'scene>"],["impl Debug for SurfaceChecker"],["impl<'scene> Debug for STL<'scene>"],["impl Debug for DiffuseLight"],["impl Debug for QuadInit"],["impl Debug for CameraInit"],["impl Debug for SphereInit"],["impl Debug for ONB"],["impl Debug for RotateInit"],["impl Debug for AABB"],["impl<'scene> Debug for Triangle<'scene>"],["impl Debug for Empty"],["impl<'a> Debug for HitRecord<'a>"],["impl Debug for STLInit"],["impl Debug for Dispersive"],["impl<'scene> Debug for Quad<'scene>"],["impl Debug for Isotropic"],["impl Debug for SolidColor"],["impl Debug for ConeLight"],["impl Debug for Object"],["impl Debug for RenderOpts"],["impl Debug for BoxyInit"],["impl Debug for Dielectric"],["impl Debug for TriangleInit"],["impl<'scene> Debug for MixturePDF<'scene>"],["impl<'scene> Debug for MovingSphere<'scene>"],["impl Debug for MaterialType"],["impl Debug for Ray"],["impl Debug for SpherePDF"],["impl Debug for spectrum_data_point_t"],["impl Debug for Metal"],["impl Debug for spectrum_grid_cell_t"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Copy.js b/trait.impl/core/marker/trait.Copy.js new file mode 100644 index 00000000..f96d610c --- /dev/null +++ b/trait.impl/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl Copy for Camera"],["impl Copy for Interval"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Freeze.js b/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 00000000..6a203cef --- /dev/null +++ b/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"clovers":[["impl Freeze for AABB",1,["clovers::aabb::AABB"]],["impl<'scene> Freeze for BVHNode<'scene>",1,["clovers::bvhnode::BVHNode"]],["impl Freeze for Camera",1,["clovers::camera::Camera"]],["impl Freeze for CameraInit",1,["clovers::camera::CameraInit"]],["impl<'a> Freeze for HitRecord<'a>",1,["clovers::hitable::HitRecord"]],["impl<'scene> Freeze for Hitable<'scene>",1,["clovers::hitable::Hitable"]],["impl Freeze for Empty",1,["clovers::hitable::Empty"]],["impl Freeze for Interval",1,["clovers::interval::Interval"]],["impl Freeze for ConeLight",1,["clovers::materials::cone_light::ConeLight"]],["impl Freeze for Dielectric",1,["clovers::materials::dielectric::Dielectric"]],["impl Freeze for DiffuseLight",1,["clovers::materials::diffuse_light::DiffuseLight"]],["impl Freeze for Dispersive",1,["clovers::materials::dispersive::Dispersive"]],["impl<'scene> Freeze for GLTFMaterial<'scene>",1,["clovers::materials::gltf::GLTFMaterial"]],["impl Freeze for Isotropic",1,["clovers::materials::isotropic::Isotropic"]],["impl Freeze for Lambertian",1,["clovers::materials::lambertian::Lambertian"]],["impl Freeze for Metal",1,["clovers::materials::metal::Metal"]],["impl Freeze for MaterialInit",1,["clovers::materials::MaterialInit"]],["impl Freeze for SharedMaterial",1,["clovers::materials::SharedMaterial"]],["impl Freeze for Material",1,["clovers::materials::Material"]],["impl Freeze for MaterialType",1,["clovers::materials::MaterialType"]],["impl<'ray> Freeze for ScatterRecord<'ray>",1,["clovers::materials::ScatterRecord"]],["impl Freeze for BoxyInit",1,["clovers::objects::boxy::BoxyInit"]],["impl<'scene> Freeze for Boxy<'scene>",1,["clovers::objects::boxy::Boxy"]],["impl Freeze for ConstantMediumInit",1,["clovers::objects::constant_medium::ConstantMediumInit"]],["impl<'scene> Freeze for ConstantMedium<'scene>",1,["clovers::objects::constant_medium::ConstantMedium"]],["impl Freeze for GLTFInit",1,["clovers::objects::gltf::GLTFInit"]],["impl<'scene> Freeze for GLTF<'scene>",1,["clovers::objects::gltf::GLTF"]],["impl<'scene> Freeze for GLTFTriangle<'scene>",1,["clovers::objects::gltf::GLTFTriangle"]],["impl Freeze for MovingSphereInit",1,["clovers::objects::moving_sphere::MovingSphereInit"]],["impl<'scene> Freeze for MovingSphere<'scene>",1,["clovers::objects::moving_sphere::MovingSphere"]],["impl Freeze for QuadInit",1,["clovers::objects::quad::QuadInit"]],["impl<'scene> Freeze for Quad<'scene>",1,["clovers::objects::quad::Quad"]],["impl Freeze for RotateInit",1,["clovers::objects::rotate::RotateInit"]],["impl<'scene> Freeze for RotateY<'scene>",1,["clovers::objects::rotate::RotateY"]],["impl Freeze for SphereInit",1,["clovers::objects::sphere::SphereInit"]],["impl<'scene> Freeze for Sphere<'scene>",1,["clovers::objects::sphere::Sphere"]],["impl<'scene> Freeze for STL<'scene>",1,["clovers::objects::stl::STL"]],["impl Freeze for STLInit",1,["clovers::objects::stl::STLInit"]],["impl Freeze for TranslateInit",1,["clovers::objects::translate::TranslateInit"]],["impl<'scene> Freeze for Translate<'scene>",1,["clovers::objects::translate::Translate"]],["impl Freeze for TriangleInit",1,["clovers::objects::triangle::TriangleInit"]],["impl<'scene> Freeze for Triangle<'scene>",1,["clovers::objects::triangle::Triangle"]],["impl Freeze for ObjectList",1,["clovers::objects::ObjectList"]],["impl Freeze for Object",1,["clovers::objects::Object"]],["impl Freeze for ONB",1,["clovers::onb::ONB"]],["impl<'scene> Freeze for PDF<'scene>",1,["clovers::pdf::PDF"]],["impl Freeze for CosinePDF",1,["clovers::pdf::CosinePDF"]],["impl<'scene> Freeze for HitablePDF<'scene>",1,["clovers::pdf::HitablePDF"]],["impl<'scene> Freeze for MixturePDF<'scene>",1,["clovers::pdf::MixturePDF"]],["impl Freeze for SpherePDF",1,["clovers::pdf::SpherePDF"]],["impl Freeze for ZeroPDF",1,["clovers::pdf::ZeroPDF"]],["impl Freeze for Ray",1,["clovers::ray::Ray"]],["impl<'scene> Freeze for Scene<'scene>",1,["clovers::scenes::Scene"]],["impl Freeze for SceneFile",1,["clovers::scenes::SceneFile"]],["impl Freeze for spectrum_grid_cell_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_grid_cell_t"]],["impl Freeze for spectrum_data_point_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_data_point_t"]],["impl Freeze for SolidColor",1,["clovers::textures::solid_color::SolidColor"]],["impl Freeze for SpatialChecker",1,["clovers::textures::spatial_checker::SpatialChecker"]],["impl Freeze for SurfaceChecker",1,["clovers::textures::surface_checker::SurfaceChecker"]],["impl Freeze for Texture",1,["clovers::textures::Texture"]],["impl Freeze for RenderOpts",1,["clovers::RenderOpts"]]], +"clovers_cli":[["impl Freeze for Opts",1,["clovers_cli::Opts"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Send.js b/trait.impl/core/marker/trait.Send.js new file mode 100644 index 00000000..66911546 --- /dev/null +++ b/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"clovers":[["impl Send for AABB",1,["clovers::aabb::AABB"]],["impl<'scene> Send for BVHNode<'scene>",1,["clovers::bvhnode::BVHNode"]],["impl Send for Camera",1,["clovers::camera::Camera"]],["impl Send for CameraInit",1,["clovers::camera::CameraInit"]],["impl<'a> !Send for HitRecord<'a>",1,["clovers::hitable::HitRecord"]],["impl<'scene> Send for Hitable<'scene>",1,["clovers::hitable::Hitable"]],["impl Send for Empty",1,["clovers::hitable::Empty"]],["impl Send for Interval",1,["clovers::interval::Interval"]],["impl Send for ConeLight",1,["clovers::materials::cone_light::ConeLight"]],["impl Send for Dielectric",1,["clovers::materials::dielectric::Dielectric"]],["impl Send for DiffuseLight",1,["clovers::materials::diffuse_light::DiffuseLight"]],["impl Send for Dispersive",1,["clovers::materials::dispersive::Dispersive"]],["impl<'scene> Send for GLTFMaterial<'scene>",1,["clovers::materials::gltf::GLTFMaterial"]],["impl Send for Isotropic",1,["clovers::materials::isotropic::Isotropic"]],["impl Send for Lambertian",1,["clovers::materials::lambertian::Lambertian"]],["impl Send for Metal",1,["clovers::materials::metal::Metal"]],["impl Send for MaterialInit",1,["clovers::materials::MaterialInit"]],["impl Send for SharedMaterial",1,["clovers::materials::SharedMaterial"]],["impl Send for Material",1,["clovers::materials::Material"]],["impl Send for MaterialType",1,["clovers::materials::MaterialType"]],["impl<'ray> Send for ScatterRecord<'ray>",1,["clovers::materials::ScatterRecord"]],["impl Send for BoxyInit",1,["clovers::objects::boxy::BoxyInit"]],["impl<'scene> Send for Boxy<'scene>",1,["clovers::objects::boxy::Boxy"]],["impl Send for ConstantMediumInit",1,["clovers::objects::constant_medium::ConstantMediumInit"]],["impl<'scene> Send for ConstantMedium<'scene>",1,["clovers::objects::constant_medium::ConstantMedium"]],["impl Send for GLTFInit",1,["clovers::objects::gltf::GLTFInit"]],["impl<'scene> Send for GLTF<'scene>",1,["clovers::objects::gltf::GLTF"]],["impl<'scene> Send for GLTFTriangle<'scene>",1,["clovers::objects::gltf::GLTFTriangle"]],["impl Send for MovingSphereInit",1,["clovers::objects::moving_sphere::MovingSphereInit"]],["impl<'scene> Send for MovingSphere<'scene>",1,["clovers::objects::moving_sphere::MovingSphere"]],["impl Send for QuadInit",1,["clovers::objects::quad::QuadInit"]],["impl<'scene> Send for Quad<'scene>",1,["clovers::objects::quad::Quad"]],["impl Send for RotateInit",1,["clovers::objects::rotate::RotateInit"]],["impl<'scene> Send for RotateY<'scene>",1,["clovers::objects::rotate::RotateY"]],["impl Send for SphereInit",1,["clovers::objects::sphere::SphereInit"]],["impl<'scene> Send for Sphere<'scene>",1,["clovers::objects::sphere::Sphere"]],["impl<'scene> Send for STL<'scene>",1,["clovers::objects::stl::STL"]],["impl Send for STLInit",1,["clovers::objects::stl::STLInit"]],["impl Send for TranslateInit",1,["clovers::objects::translate::TranslateInit"]],["impl<'scene> Send for Translate<'scene>",1,["clovers::objects::translate::Translate"]],["impl Send for TriangleInit",1,["clovers::objects::triangle::TriangleInit"]],["impl<'scene> Send for Triangle<'scene>",1,["clovers::objects::triangle::Triangle"]],["impl Send for ObjectList",1,["clovers::objects::ObjectList"]],["impl Send for Object",1,["clovers::objects::Object"]],["impl Send for ONB",1,["clovers::onb::ONB"]],["impl<'scene> Send for PDF<'scene>",1,["clovers::pdf::PDF"]],["impl Send for CosinePDF",1,["clovers::pdf::CosinePDF"]],["impl<'scene> Send for HitablePDF<'scene>",1,["clovers::pdf::HitablePDF"]],["impl<'scene> Send for MixturePDF<'scene>",1,["clovers::pdf::MixturePDF"]],["impl Send for SpherePDF",1,["clovers::pdf::SpherePDF"]],["impl Send for ZeroPDF",1,["clovers::pdf::ZeroPDF"]],["impl Send for Ray",1,["clovers::ray::Ray"]],["impl<'scene> Send for Scene<'scene>",1,["clovers::scenes::Scene"]],["impl Send for SceneFile",1,["clovers::scenes::SceneFile"]],["impl Send for spectrum_grid_cell_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_grid_cell_t"]],["impl Send for spectrum_data_point_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_data_point_t"]],["impl Send for SolidColor",1,["clovers::textures::solid_color::SolidColor"]],["impl Send for SpatialChecker",1,["clovers::textures::spatial_checker::SpatialChecker"]],["impl Send for SurfaceChecker",1,["clovers::textures::surface_checker::SurfaceChecker"]],["impl Send for Texture",1,["clovers::textures::Texture"]],["impl Send for RenderOpts",1,["clovers::RenderOpts"]]], +"clovers_cli":[["impl Send for Opts",1,["clovers_cli::Opts"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.StructuralPartialEq.js b/trait.impl/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 00000000..b07e83aa --- /dev/null +++ b/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl StructuralPartialEq for Ray"],["impl StructuralPartialEq for Interval"],["impl StructuralPartialEq for AABB"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Sync.js b/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 00000000..c62f47f5 --- /dev/null +++ b/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"clovers":[["impl Sync for AABB",1,["clovers::aabb::AABB"]],["impl<'scene> Sync for BVHNode<'scene>",1,["clovers::bvhnode::BVHNode"]],["impl Sync for Camera",1,["clovers::camera::Camera"]],["impl Sync for CameraInit",1,["clovers::camera::CameraInit"]],["impl<'a> !Sync for HitRecord<'a>",1,["clovers::hitable::HitRecord"]],["impl<'scene> Sync for Hitable<'scene>",1,["clovers::hitable::Hitable"]],["impl Sync for Empty",1,["clovers::hitable::Empty"]],["impl Sync for Interval",1,["clovers::interval::Interval"]],["impl Sync for ConeLight",1,["clovers::materials::cone_light::ConeLight"]],["impl Sync for Dielectric",1,["clovers::materials::dielectric::Dielectric"]],["impl Sync for DiffuseLight",1,["clovers::materials::diffuse_light::DiffuseLight"]],["impl Sync for Dispersive",1,["clovers::materials::dispersive::Dispersive"]],["impl<'scene> Sync for GLTFMaterial<'scene>",1,["clovers::materials::gltf::GLTFMaterial"]],["impl Sync for Isotropic",1,["clovers::materials::isotropic::Isotropic"]],["impl Sync for Lambertian",1,["clovers::materials::lambertian::Lambertian"]],["impl Sync for Metal",1,["clovers::materials::metal::Metal"]],["impl Sync for MaterialInit",1,["clovers::materials::MaterialInit"]],["impl Sync for SharedMaterial",1,["clovers::materials::SharedMaterial"]],["impl Sync for Material",1,["clovers::materials::Material"]],["impl Sync for MaterialType",1,["clovers::materials::MaterialType"]],["impl<'ray> Sync for ScatterRecord<'ray>",1,["clovers::materials::ScatterRecord"]],["impl Sync for BoxyInit",1,["clovers::objects::boxy::BoxyInit"]],["impl<'scene> Sync for Boxy<'scene>",1,["clovers::objects::boxy::Boxy"]],["impl Sync for ConstantMediumInit",1,["clovers::objects::constant_medium::ConstantMediumInit"]],["impl<'scene> Sync for ConstantMedium<'scene>",1,["clovers::objects::constant_medium::ConstantMedium"]],["impl Sync for GLTFInit",1,["clovers::objects::gltf::GLTFInit"]],["impl<'scene> Sync for GLTF<'scene>",1,["clovers::objects::gltf::GLTF"]],["impl<'scene> Sync for GLTFTriangle<'scene>",1,["clovers::objects::gltf::GLTFTriangle"]],["impl Sync for MovingSphereInit",1,["clovers::objects::moving_sphere::MovingSphereInit"]],["impl<'scene> Sync for MovingSphere<'scene>",1,["clovers::objects::moving_sphere::MovingSphere"]],["impl Sync for QuadInit",1,["clovers::objects::quad::QuadInit"]],["impl<'scene> Sync for Quad<'scene>",1,["clovers::objects::quad::Quad"]],["impl Sync for RotateInit",1,["clovers::objects::rotate::RotateInit"]],["impl<'scene> Sync for RotateY<'scene>",1,["clovers::objects::rotate::RotateY"]],["impl Sync for SphereInit",1,["clovers::objects::sphere::SphereInit"]],["impl<'scene> Sync for Sphere<'scene>",1,["clovers::objects::sphere::Sphere"]],["impl<'scene> Sync for STL<'scene>",1,["clovers::objects::stl::STL"]],["impl Sync for STLInit",1,["clovers::objects::stl::STLInit"]],["impl Sync for TranslateInit",1,["clovers::objects::translate::TranslateInit"]],["impl<'scene> Sync for Translate<'scene>",1,["clovers::objects::translate::Translate"]],["impl Sync for TriangleInit",1,["clovers::objects::triangle::TriangleInit"]],["impl<'scene> Sync for Triangle<'scene>",1,["clovers::objects::triangle::Triangle"]],["impl Sync for ObjectList",1,["clovers::objects::ObjectList"]],["impl Sync for Object",1,["clovers::objects::Object"]],["impl Sync for ONB",1,["clovers::onb::ONB"]],["impl<'scene> Sync for PDF<'scene>",1,["clovers::pdf::PDF"]],["impl Sync for CosinePDF",1,["clovers::pdf::CosinePDF"]],["impl<'scene> Sync for HitablePDF<'scene>",1,["clovers::pdf::HitablePDF"]],["impl<'scene> Sync for MixturePDF<'scene>",1,["clovers::pdf::MixturePDF"]],["impl Sync for SpherePDF",1,["clovers::pdf::SpherePDF"]],["impl Sync for ZeroPDF",1,["clovers::pdf::ZeroPDF"]],["impl Sync for Ray",1,["clovers::ray::Ray"]],["impl<'scene> Sync for Scene<'scene>",1,["clovers::scenes::Scene"]],["impl Sync for SceneFile",1,["clovers::scenes::SceneFile"]],["impl Sync for spectrum_grid_cell_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_grid_cell_t"]],["impl Sync for spectrum_data_point_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_data_point_t"]],["impl Sync for SolidColor",1,["clovers::textures::solid_color::SolidColor"]],["impl Sync for SpatialChecker",1,["clovers::textures::spatial_checker::SpatialChecker"]],["impl Sync for SurfaceChecker",1,["clovers::textures::surface_checker::SurfaceChecker"]],["impl Sync for Texture",1,["clovers::textures::Texture"]],["impl Sync for RenderOpts",1,["clovers::RenderOpts"]]], +"clovers_cli":[["impl Sync for Opts",1,["clovers_cli::Opts"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Unpin.js b/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 00000000..fa76ec6e --- /dev/null +++ b/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"clovers":[["impl Unpin for AABB",1,["clovers::aabb::AABB"]],["impl<'scene> Unpin for BVHNode<'scene>",1,["clovers::bvhnode::BVHNode"]],["impl Unpin for Camera",1,["clovers::camera::Camera"]],["impl Unpin for CameraInit",1,["clovers::camera::CameraInit"]],["impl<'a> Unpin for HitRecord<'a>",1,["clovers::hitable::HitRecord"]],["impl<'scene> Unpin for Hitable<'scene>",1,["clovers::hitable::Hitable"]],["impl Unpin for Empty",1,["clovers::hitable::Empty"]],["impl Unpin for Interval",1,["clovers::interval::Interval"]],["impl Unpin for ConeLight",1,["clovers::materials::cone_light::ConeLight"]],["impl Unpin for Dielectric",1,["clovers::materials::dielectric::Dielectric"]],["impl Unpin for DiffuseLight",1,["clovers::materials::diffuse_light::DiffuseLight"]],["impl Unpin for Dispersive",1,["clovers::materials::dispersive::Dispersive"]],["impl<'scene> Unpin for GLTFMaterial<'scene>",1,["clovers::materials::gltf::GLTFMaterial"]],["impl Unpin for Isotropic",1,["clovers::materials::isotropic::Isotropic"]],["impl Unpin for Lambertian",1,["clovers::materials::lambertian::Lambertian"]],["impl Unpin for Metal",1,["clovers::materials::metal::Metal"]],["impl Unpin for MaterialInit",1,["clovers::materials::MaterialInit"]],["impl Unpin for SharedMaterial",1,["clovers::materials::SharedMaterial"]],["impl Unpin for Material",1,["clovers::materials::Material"]],["impl Unpin for MaterialType",1,["clovers::materials::MaterialType"]],["impl<'ray> Unpin for ScatterRecord<'ray>",1,["clovers::materials::ScatterRecord"]],["impl Unpin for BoxyInit",1,["clovers::objects::boxy::BoxyInit"]],["impl<'scene> Unpin for Boxy<'scene>",1,["clovers::objects::boxy::Boxy"]],["impl Unpin for ConstantMediumInit",1,["clovers::objects::constant_medium::ConstantMediumInit"]],["impl<'scene> Unpin for ConstantMedium<'scene>",1,["clovers::objects::constant_medium::ConstantMedium"]],["impl Unpin for GLTFInit",1,["clovers::objects::gltf::GLTFInit"]],["impl<'scene> Unpin for GLTF<'scene>",1,["clovers::objects::gltf::GLTF"]],["impl<'scene> Unpin for GLTFTriangle<'scene>",1,["clovers::objects::gltf::GLTFTriangle"]],["impl Unpin for MovingSphereInit",1,["clovers::objects::moving_sphere::MovingSphereInit"]],["impl<'scene> Unpin for MovingSphere<'scene>",1,["clovers::objects::moving_sphere::MovingSphere"]],["impl Unpin for QuadInit",1,["clovers::objects::quad::QuadInit"]],["impl<'scene> Unpin for Quad<'scene>",1,["clovers::objects::quad::Quad"]],["impl Unpin for RotateInit",1,["clovers::objects::rotate::RotateInit"]],["impl<'scene> Unpin for RotateY<'scene>",1,["clovers::objects::rotate::RotateY"]],["impl Unpin for SphereInit",1,["clovers::objects::sphere::SphereInit"]],["impl<'scene> Unpin for Sphere<'scene>",1,["clovers::objects::sphere::Sphere"]],["impl<'scene> Unpin for STL<'scene>",1,["clovers::objects::stl::STL"]],["impl Unpin for STLInit",1,["clovers::objects::stl::STLInit"]],["impl Unpin for TranslateInit",1,["clovers::objects::translate::TranslateInit"]],["impl<'scene> Unpin for Translate<'scene>",1,["clovers::objects::translate::Translate"]],["impl Unpin for TriangleInit",1,["clovers::objects::triangle::TriangleInit"]],["impl<'scene> Unpin for Triangle<'scene>",1,["clovers::objects::triangle::Triangle"]],["impl Unpin for ObjectList",1,["clovers::objects::ObjectList"]],["impl Unpin for Object",1,["clovers::objects::Object"]],["impl Unpin for ONB",1,["clovers::onb::ONB"]],["impl<'scene> Unpin for PDF<'scene>",1,["clovers::pdf::PDF"]],["impl Unpin for CosinePDF",1,["clovers::pdf::CosinePDF"]],["impl<'scene> Unpin for HitablePDF<'scene>",1,["clovers::pdf::HitablePDF"]],["impl<'scene> Unpin for MixturePDF<'scene>",1,["clovers::pdf::MixturePDF"]],["impl Unpin for SpherePDF",1,["clovers::pdf::SpherePDF"]],["impl Unpin for ZeroPDF",1,["clovers::pdf::ZeroPDF"]],["impl Unpin for Ray",1,["clovers::ray::Ray"]],["impl<'scene> Unpin for Scene<'scene>",1,["clovers::scenes::Scene"]],["impl Unpin for SceneFile",1,["clovers::scenes::SceneFile"]],["impl Unpin for spectrum_grid_cell_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_grid_cell_t"]],["impl Unpin for spectrum_data_point_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_data_point_t"]],["impl Unpin for SolidColor",1,["clovers::textures::solid_color::SolidColor"]],["impl Unpin for SpatialChecker",1,["clovers::textures::spatial_checker::SpatialChecker"]],["impl Unpin for SurfaceChecker",1,["clovers::textures::surface_checker::SurfaceChecker"]],["impl Unpin for Texture",1,["clovers::textures::Texture"]],["impl Unpin for RenderOpts",1,["clovers::RenderOpts"]]], +"clovers_cli":[["impl Unpin for Opts",1,["clovers_cli::Opts"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/arith/trait.Add.js b/trait.impl/core/ops/arith/trait.Add.js new file mode 100644 index 00000000..b02788a0 --- /dev/null +++ b/trait.impl/core/ops/arith/trait.Add.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl Add<f32> for Interval"],["impl Add<Matrix<f32, Const<3>, Const<1>, ArrayStorage<f32, 3, 1>>> for AABB"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 00000000..12b5db64 --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"clovers":[["impl RefUnwindSafe for AABB",1,["clovers::aabb::AABB"]],["impl<'scene> RefUnwindSafe for BVHNode<'scene>",1,["clovers::bvhnode::BVHNode"]],["impl RefUnwindSafe for Camera",1,["clovers::camera::Camera"]],["impl RefUnwindSafe for CameraInit",1,["clovers::camera::CameraInit"]],["impl<'a> !RefUnwindSafe for HitRecord<'a>",1,["clovers::hitable::HitRecord"]],["impl<'scene> RefUnwindSafe for Hitable<'scene>",1,["clovers::hitable::Hitable"]],["impl RefUnwindSafe for Empty",1,["clovers::hitable::Empty"]],["impl RefUnwindSafe for Interval",1,["clovers::interval::Interval"]],["impl RefUnwindSafe for ConeLight",1,["clovers::materials::cone_light::ConeLight"]],["impl RefUnwindSafe for Dielectric",1,["clovers::materials::dielectric::Dielectric"]],["impl RefUnwindSafe for DiffuseLight",1,["clovers::materials::diffuse_light::DiffuseLight"]],["impl RefUnwindSafe for Dispersive",1,["clovers::materials::dispersive::Dispersive"]],["impl<'scene> RefUnwindSafe for GLTFMaterial<'scene>",1,["clovers::materials::gltf::GLTFMaterial"]],["impl RefUnwindSafe for Isotropic",1,["clovers::materials::isotropic::Isotropic"]],["impl RefUnwindSafe for Lambertian",1,["clovers::materials::lambertian::Lambertian"]],["impl RefUnwindSafe for Metal",1,["clovers::materials::metal::Metal"]],["impl RefUnwindSafe for MaterialInit",1,["clovers::materials::MaterialInit"]],["impl RefUnwindSafe for SharedMaterial",1,["clovers::materials::SharedMaterial"]],["impl RefUnwindSafe for Material",1,["clovers::materials::Material"]],["impl RefUnwindSafe for MaterialType",1,["clovers::materials::MaterialType"]],["impl<'ray> RefUnwindSafe for ScatterRecord<'ray>",1,["clovers::materials::ScatterRecord"]],["impl RefUnwindSafe for BoxyInit",1,["clovers::objects::boxy::BoxyInit"]],["impl<'scene> RefUnwindSafe for Boxy<'scene>",1,["clovers::objects::boxy::Boxy"]],["impl RefUnwindSafe for ConstantMediumInit",1,["clovers::objects::constant_medium::ConstantMediumInit"]],["impl<'scene> RefUnwindSafe for ConstantMedium<'scene>",1,["clovers::objects::constant_medium::ConstantMedium"]],["impl RefUnwindSafe for GLTFInit",1,["clovers::objects::gltf::GLTFInit"]],["impl<'scene> RefUnwindSafe for GLTF<'scene>",1,["clovers::objects::gltf::GLTF"]],["impl<'scene> RefUnwindSafe for GLTFTriangle<'scene>",1,["clovers::objects::gltf::GLTFTriangle"]],["impl RefUnwindSafe for MovingSphereInit",1,["clovers::objects::moving_sphere::MovingSphereInit"]],["impl<'scene> RefUnwindSafe for MovingSphere<'scene>",1,["clovers::objects::moving_sphere::MovingSphere"]],["impl RefUnwindSafe for QuadInit",1,["clovers::objects::quad::QuadInit"]],["impl<'scene> RefUnwindSafe for Quad<'scene>",1,["clovers::objects::quad::Quad"]],["impl RefUnwindSafe for RotateInit",1,["clovers::objects::rotate::RotateInit"]],["impl<'scene> RefUnwindSafe for RotateY<'scene>",1,["clovers::objects::rotate::RotateY"]],["impl RefUnwindSafe for SphereInit",1,["clovers::objects::sphere::SphereInit"]],["impl<'scene> RefUnwindSafe for Sphere<'scene>",1,["clovers::objects::sphere::Sphere"]],["impl<'scene> RefUnwindSafe for STL<'scene>",1,["clovers::objects::stl::STL"]],["impl RefUnwindSafe for STLInit",1,["clovers::objects::stl::STLInit"]],["impl RefUnwindSafe for TranslateInit",1,["clovers::objects::translate::TranslateInit"]],["impl<'scene> RefUnwindSafe for Translate<'scene>",1,["clovers::objects::translate::Translate"]],["impl RefUnwindSafe for TriangleInit",1,["clovers::objects::triangle::TriangleInit"]],["impl<'scene> RefUnwindSafe for Triangle<'scene>",1,["clovers::objects::triangle::Triangle"]],["impl RefUnwindSafe for ObjectList",1,["clovers::objects::ObjectList"]],["impl RefUnwindSafe for Object",1,["clovers::objects::Object"]],["impl RefUnwindSafe for ONB",1,["clovers::onb::ONB"]],["impl<'scene> RefUnwindSafe for PDF<'scene>",1,["clovers::pdf::PDF"]],["impl RefUnwindSafe for CosinePDF",1,["clovers::pdf::CosinePDF"]],["impl<'scene> RefUnwindSafe for HitablePDF<'scene>",1,["clovers::pdf::HitablePDF"]],["impl<'scene> RefUnwindSafe for MixturePDF<'scene>",1,["clovers::pdf::MixturePDF"]],["impl RefUnwindSafe for SpherePDF",1,["clovers::pdf::SpherePDF"]],["impl RefUnwindSafe for ZeroPDF",1,["clovers::pdf::ZeroPDF"]],["impl RefUnwindSafe for Ray",1,["clovers::ray::Ray"]],["impl<'scene> RefUnwindSafe for Scene<'scene>",1,["clovers::scenes::Scene"]],["impl RefUnwindSafe for SceneFile",1,["clovers::scenes::SceneFile"]],["impl RefUnwindSafe for spectrum_grid_cell_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_grid_cell_t"]],["impl RefUnwindSafe for spectrum_data_point_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_data_point_t"]],["impl RefUnwindSafe for SolidColor",1,["clovers::textures::solid_color::SolidColor"]],["impl RefUnwindSafe for SpatialChecker",1,["clovers::textures::spatial_checker::SpatialChecker"]],["impl RefUnwindSafe for SurfaceChecker",1,["clovers::textures::surface_checker::SurfaceChecker"]],["impl RefUnwindSafe for Texture",1,["clovers::textures::Texture"]],["impl RefUnwindSafe for RenderOpts",1,["clovers::RenderOpts"]]], +"clovers_cli":[["impl RefUnwindSafe for Opts",1,["clovers_cli::Opts"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 00000000..dc2882fb --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"clovers":[["impl UnwindSafe for AABB",1,["clovers::aabb::AABB"]],["impl<'scene> UnwindSafe for BVHNode<'scene>",1,["clovers::bvhnode::BVHNode"]],["impl UnwindSafe for Camera",1,["clovers::camera::Camera"]],["impl UnwindSafe for CameraInit",1,["clovers::camera::CameraInit"]],["impl<'a> !UnwindSafe for HitRecord<'a>",1,["clovers::hitable::HitRecord"]],["impl<'scene> UnwindSafe for Hitable<'scene>",1,["clovers::hitable::Hitable"]],["impl UnwindSafe for Empty",1,["clovers::hitable::Empty"]],["impl UnwindSafe for Interval",1,["clovers::interval::Interval"]],["impl UnwindSafe for ConeLight",1,["clovers::materials::cone_light::ConeLight"]],["impl UnwindSafe for Dielectric",1,["clovers::materials::dielectric::Dielectric"]],["impl UnwindSafe for DiffuseLight",1,["clovers::materials::diffuse_light::DiffuseLight"]],["impl UnwindSafe for Dispersive",1,["clovers::materials::dispersive::Dispersive"]],["impl<'scene> UnwindSafe for GLTFMaterial<'scene>",1,["clovers::materials::gltf::GLTFMaterial"]],["impl UnwindSafe for Isotropic",1,["clovers::materials::isotropic::Isotropic"]],["impl UnwindSafe for Lambertian",1,["clovers::materials::lambertian::Lambertian"]],["impl UnwindSafe for Metal",1,["clovers::materials::metal::Metal"]],["impl UnwindSafe for MaterialInit",1,["clovers::materials::MaterialInit"]],["impl UnwindSafe for SharedMaterial",1,["clovers::materials::SharedMaterial"]],["impl UnwindSafe for Material",1,["clovers::materials::Material"]],["impl UnwindSafe for MaterialType",1,["clovers::materials::MaterialType"]],["impl<'ray> UnwindSafe for ScatterRecord<'ray>",1,["clovers::materials::ScatterRecord"]],["impl UnwindSafe for BoxyInit",1,["clovers::objects::boxy::BoxyInit"]],["impl<'scene> UnwindSafe for Boxy<'scene>",1,["clovers::objects::boxy::Boxy"]],["impl UnwindSafe for ConstantMediumInit",1,["clovers::objects::constant_medium::ConstantMediumInit"]],["impl<'scene> UnwindSafe for ConstantMedium<'scene>",1,["clovers::objects::constant_medium::ConstantMedium"]],["impl UnwindSafe for GLTFInit",1,["clovers::objects::gltf::GLTFInit"]],["impl<'scene> UnwindSafe for GLTF<'scene>",1,["clovers::objects::gltf::GLTF"]],["impl<'scene> UnwindSafe for GLTFTriangle<'scene>",1,["clovers::objects::gltf::GLTFTriangle"]],["impl UnwindSafe for MovingSphereInit",1,["clovers::objects::moving_sphere::MovingSphereInit"]],["impl<'scene> UnwindSafe for MovingSphere<'scene>",1,["clovers::objects::moving_sphere::MovingSphere"]],["impl UnwindSafe for QuadInit",1,["clovers::objects::quad::QuadInit"]],["impl<'scene> UnwindSafe for Quad<'scene>",1,["clovers::objects::quad::Quad"]],["impl UnwindSafe for RotateInit",1,["clovers::objects::rotate::RotateInit"]],["impl<'scene> UnwindSafe for RotateY<'scene>",1,["clovers::objects::rotate::RotateY"]],["impl UnwindSafe for SphereInit",1,["clovers::objects::sphere::SphereInit"]],["impl<'scene> UnwindSafe for Sphere<'scene>",1,["clovers::objects::sphere::Sphere"]],["impl<'scene> UnwindSafe for STL<'scene>",1,["clovers::objects::stl::STL"]],["impl UnwindSafe for STLInit",1,["clovers::objects::stl::STLInit"]],["impl UnwindSafe for TranslateInit",1,["clovers::objects::translate::TranslateInit"]],["impl<'scene> UnwindSafe for Translate<'scene>",1,["clovers::objects::translate::Translate"]],["impl UnwindSafe for TriangleInit",1,["clovers::objects::triangle::TriangleInit"]],["impl<'scene> UnwindSafe for Triangle<'scene>",1,["clovers::objects::triangle::Triangle"]],["impl UnwindSafe for ObjectList",1,["clovers::objects::ObjectList"]],["impl UnwindSafe for Object",1,["clovers::objects::Object"]],["impl UnwindSafe for ONB",1,["clovers::onb::ONB"]],["impl<'scene> UnwindSafe for PDF<'scene>",1,["clovers::pdf::PDF"]],["impl UnwindSafe for CosinePDF",1,["clovers::pdf::CosinePDF"]],["impl<'scene> UnwindSafe for HitablePDF<'scene>",1,["clovers::pdf::HitablePDF"]],["impl<'scene> UnwindSafe for MixturePDF<'scene>",1,["clovers::pdf::MixturePDF"]],["impl UnwindSafe for SpherePDF",1,["clovers::pdf::SpherePDF"]],["impl UnwindSafe for ZeroPDF",1,["clovers::pdf::ZeroPDF"]],["impl UnwindSafe for Ray",1,["clovers::ray::Ray"]],["impl<'scene> UnwindSafe for Scene<'scene>",1,["clovers::scenes::Scene"]],["impl UnwindSafe for SceneFile",1,["clovers::scenes::SceneFile"]],["impl UnwindSafe for spectrum_grid_cell_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_grid_cell_t"]],["impl UnwindSafe for spectrum_data_point_t",1,["clovers::spectrum::spectra_xyz_5nm_380_780_097::spectrum_data_point_t"]],["impl UnwindSafe for SolidColor",1,["clovers::textures::solid_color::SolidColor"]],["impl UnwindSafe for SpatialChecker",1,["clovers::textures::spatial_checker::SpatialChecker"]],["impl UnwindSafe for SurfaceChecker",1,["clovers::textures::surface_checker::SurfaceChecker"]],["impl UnwindSafe for Texture",1,["clovers::textures::Texture"]],["impl UnwindSafe for RenderOpts",1,["clovers::RenderOpts"]]], +"clovers_cli":[["impl UnwindSafe for Opts",1,["clovers_cli::Opts"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/serde/de/trait.Deserialize.js b/trait.impl/serde/de/trait.Deserialize.js new file mode 100644 index 00000000..1c09ce4c --- /dev/null +++ b/trait.impl/serde/de/trait.Deserialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl<'de> Deserialize<'de> for Isotropic"],["impl<'de> Deserialize<'de> for SphereInit"],["impl<'de> Deserialize<'de> for QuadInit"],["impl<'de> Deserialize<'de> for STLInit"],["impl<'de> Deserialize<'de> for SpatialChecker"],["impl<'de> Deserialize<'de> for ConeLight"],["impl<'de> Deserialize<'de> for Lambertian"],["impl<'de> Deserialize<'de> for Object"],["impl<'de> Deserialize<'de> for Texture"],["impl<'de> Deserialize<'de> for SurfaceChecker"],["impl<'de> Deserialize<'de> for MovingSphereInit"],["impl<'de> Deserialize<'de> for Camera"],["impl<'de> Deserialize<'de> for Dielectric"],["impl<'de> Deserialize<'de> for AABB"],["impl<'de> Deserialize<'de> for BoxyInit"],["impl<'de> Deserialize<'de> for ConstantMediumInit"],["impl<'de> Deserialize<'de> for CameraInit"],["impl<'de> Deserialize<'de> for TriangleInit"],["impl<'de> Deserialize<'de> for RenderOpts"],["impl<'de> Deserialize<'de> for Dispersive"],["impl<'de> Deserialize<'de> for Metal"],["impl<'de> Deserialize<'de> for GLTFInit"],["impl<'de> Deserialize<'de> for DiffuseLight"],["impl<'de> Deserialize<'de> for SolidColor"],["impl<'de> Deserialize<'de> for TranslateInit"],["impl<'de> Deserialize<'de> for Material"],["impl<'de> Deserialize<'de> for RotateInit"],["impl<'de> Deserialize<'de> for SharedMaterial"],["impl<'de> Deserialize<'de> for SceneFile"],["impl<'de> Deserialize<'de> for MaterialInit"],["impl<'de> Deserialize<'de> for Interval"],["impl<'de> Deserialize<'de> for ObjectList"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/serde/ser/trait.Serialize.js b/trait.impl/serde/ser/trait.Serialize.js new file mode 100644 index 00000000..54aa7763 --- /dev/null +++ b/trait.impl/serde/ser/trait.Serialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"clovers":[["impl Serialize for Camera"],["impl Serialize for BoxyInit"],["impl Serialize for Isotropic"],["impl Serialize for GLTFInit"],["impl Serialize for CameraInit"],["impl Serialize for Dispersive"],["impl Serialize for MovingSphereInit"],["impl Serialize for Dielectric"],["impl Serialize for ObjectList"],["impl Serialize for MaterialInit"],["impl Serialize for STLInit"],["impl Serialize for SceneFile"],["impl Serialize for SharedMaterial"],["impl Serialize for ConstantMediumInit"],["impl Serialize for SphereInit"],["impl Serialize for TriangleInit"],["impl Serialize for Object"],["impl Serialize for Metal"],["impl Serialize for TranslateInit"],["impl Serialize for QuadInit"],["impl Serialize for RenderOpts"],["impl Serialize for RotateInit"],["impl Serialize for Interval"],["impl Serialize for AABB"],["impl Serialize for Texture"],["impl Serialize for SurfaceChecker"],["impl Serialize for DiffuseLight"],["impl Serialize for Material"],["impl Serialize for Lambertian"],["impl Serialize for SpatialChecker"],["impl Serialize for SolidColor"],["impl Serialize for ConeLight"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/type.impl/nalgebra/base/alias/type.Vector2.js b/type.impl/nalgebra/base/alias/type.Vector2.js new file mode 100644 index 00000000..eaf2da59 --- /dev/null +++ b/type.impl/nalgebra/base/alias/type.Vector2.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"clovers":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/nalgebra/base/alias/type.Vector3.js b/type.impl/nalgebra/base/alias/type.Vector3.js new file mode 100644 index 00000000..eaf2da59 --- /dev/null +++ b/type.impl/nalgebra/base/alias/type.Vector3.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"clovers":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/nalgebra/base/alias/type.Vector4.js b/type.impl/nalgebra/base/alias/type.Vector4.js new file mode 100644 index 00000000..eaf2da59 --- /dev/null +++ b/type.impl/nalgebra/base/alias/type.Vector4.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"clovers":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/std/primitive.f32.js b/type.impl/std/primitive.f32.js new file mode 100644 index 00000000..eaf2da59 --- /dev/null +++ b/type.impl/std/primitive.f32.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"clovers":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/std/primitive.usize.js b/type.impl/std/primitive.usize.js new file mode 100644 index 00000000..eaf2da59 --- /dev/null +++ b/type.impl/std/primitive.usize.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"clovers":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file