Struct LayerAttributes
pub struct LayerAttributes { pub layer_name: Option<Text>, pub layer_position: Vec2<i32>, pub screen_window_center: Vec2<f32>, pub screen_window_width: f32, pub white_luminance: Option<f32>, pub adopted_neutral: Option<Vec2<f32>>, pub rendering_transform_name: Option<Text>, pub look_modification_transform_name: Option<Text>, pub horizontal_density: Option<f32>, pub owner: Option<Text>, pub comments: Option<Text>, pub capture_date: Option<Text>, pub utc_offset: Option<f32>, pub longitude: Option<f32>, pub latitude: Option<f32>, pub altitude: Option<f32>, pub focus: Option<f32>, pub exposure: Option<f32>, pub aperture: Option<f32>, pub iso_speed: Option<f32>, pub environment_map: Option<EnvironmentMap>, pub film_key_code: Option<KeyCode>, pub wrap_mode_name: Option<Text>, pub frames_per_second: Option<Rational>, pub multi_view_names: Option<Vec<Text>>, pub world_to_camera: Option<Matrix4x4>, pub world_to_normalized_device: Option<Matrix4x4>, pub deep_image_state: Option<Rational>, pub original_data_window: Option<IntegerBounds>, pub preview: Option<Preview>, pub view_name: Option<Text>, pub software_name: Option<Text>, pub near_clip_plane: Option<f32>, pub far_clip_plane: Option<f32>, pub horizontal_field_of_view: Option<f32>, pub vertical_field_of_view: Option<f32>, pub other: HashMap<Text, AttributeValue> }
Does not include the attributes required for reading the file contents.
Excludes standard fields that must be the same for all headers.
For more attributes, see struct ImageAttributes.
Fields
layer_name: Option<Text>The name of this layer. Required if this file contains deep data or multiple layers.
layer_position: Vec2<i32>The top left corner of the rectangle that positions this layer within the global infinite 2D space of the whole file. This represents the position of the
DataWindow.screen_window_center: Vec2<f32>Part of the perspective projection. Default should be
(0, 0).screen_window_width: f32Part of the perspective projection. Default should be
1.white_luminance: Option<f32>The white luminance of the colors. Defines the luminance in candelas per square meter, Nits, of the rgb value
(1, 1, 1).adopted_neutral: Option<Vec2<f32>>The adopted neutral of the colors. Specifies the CIE (x,y) frequency coordinates that should be considered neutral during color rendering. Pixels in the image whose CIE (x,y) frequency coordinates match the adopted neutral value should be mapped to neutral values on the given display.
rendering_transform_name: Option<Text>Name of the color transform function that is applied for rendering the image.
look_modification_transform_name: Option<Text>Name of the color transform function that computes the look modification of the image.
horizontal_density: Option<f32>The horizontal density, in pixels per inch. The image's vertical output density can be computed using
horizontal_density * pixel_aspect_ratio.owner: Option<Text>Name of the owner.
comments: Option<Text>Additional textual information.
capture_date: Option<Text>The date of image creation, in
YYYY:MM:DD hh:mm:ssformat.utc_offset: Option<f32>Time offset from UTC.
longitude: Option<f32>Geographical image location.
latitude: Option<f32>Geographical image location.
altitude: Option<f32>Geographical image location.
focus: Option<f32>Camera focus in meters.
exposure: Option<f32>Exposure time in seconds.
aperture: Option<f32>Camera aperture measured in f-stops. Equals the focal length of the lens divided by the diameter of the iris opening.
iso_speed: Option<f32>Iso-speed of the camera sensor.
environment_map: Option<EnvironmentMap>If this is an environment map, specifies how to interpret it.
film_key_code: Option<KeyCode>Identifies film manufacturer, film type, film roll and frame position within the roll.
wrap_mode_name: Option<Text>Specifies how texture map images are extrapolated. Values can be
black,clamp,periodic, ormirror.frames_per_second: Option<Rational>Frames per second if this is a frame in a sequence.
multi_view_names: Option<Vec<Text>>Specifies the view names for multi-view, for example stereo, image files.
world_to_camera: Option<Matrix4x4>The matrix that transforms 3D points from the world to the camera coordinate space. Left-handed coordinate system, y up, z forward.
world_to_normalized_device: Option<Matrix4x4>The matrix that transforms 3D points from the world to the "Normalized Device Coordinate" space. Left-handed coordinate system, y up, z forward.
deep_image_state: Option<Rational>Specifies whether the pixels in a deep image are sorted and non-overlapping.
original_data_window: Option<IntegerBounds>If the image was cropped, contains the original data window.
preview: Option<Preview>An 8-bit rgba image representing the rendered image.
view_name: Option<Text>Name of the view, which is typically either
"right"or"left"for a stereoscopic image.software_name: Option<Text>The name of the software that produced this image.
near_clip_plane: Option<f32>The near clip plane of the virtual camera projection.
far_clip_plane: Option<f32>The far clip plane of the virtual camera projection.
horizontal_field_of_view: Option<f32>The field of view angle, along the horizontal axis, in degrees.
vertical_field_of_view: Option<f32>The field of view angle, along the horizontal axis, in degrees.
other: HashMap<Text, AttributeValue>Contains custom attributes. Does not contain the attributes already present in the
HeaderorLayerAttributesstruct. Does not contain attributes that are standardized to be the same for all layers: no chromaticities and no time codes.
Implementations
impl LayerAttributes
fn named(layer_name: impl Into<Text>) -> SelfCreate default layer attributes with a data position of zero.
fn with_position(self, data_position: Vec2<i32>) -> SelfSet the data position of this layer.
fn with_camera_frustum(self, world_to_camera: Matrix4x4, world_to_normalized_device: Matrix4x4, field_of_view: impl Into<Vec2<f32>>, depth_clip_range: Range<f32>) -> SelfSet all common camera projection attributes at once.
Trait Implementations
impl Clone for LayerAttributes
fn clone(&self) -> Self
impl Debug for LayerAttributes
fn fmt(&self, formatter: &mut Formatter<'_>) -> Result
impl Default for LayerAttributes
fn default() -> Self
impl PartialEq for LayerAttributes
fn eq(&self, other: &Self) -> bool
impl StructuralPartialEq for LayerAttributes
Auto Trait Implementations
impl Freeze for LayerAttributes
impl RefUnwindSafe for LayerAttributes
impl Send for LayerAttributes
impl Sync for LayerAttributes
impl Unpin for LayerAttributes
impl UnsafeUnpin for LayerAttributes
impl UnwindSafe for LayerAttributes
Blanket Implementations
impl<R, P> ReadPrimitive<R> for LayerAttributes
where
R: Read + ReadEndian<P>,
P: Default,
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for LayerAttributes
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for LayerAttributes
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for LayerAttributes
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for LayerAttributes
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for LayerAttributes
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for LayerAttributes
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for LayerAttributes
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for LayerAttributes
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> Read<Exclusive, BecauseExclusive> for LayerAttributes
where
T: ?Sized,
impl<T> ToOwned for LayerAttributes
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for LayerAttributes
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for LayerAttributes
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for LayerAttributes
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>