Struct gltf_json::extensions::material::Volume
source · pub struct Volume {
pub thickness_factor: ThicknessFactor,
pub thickness_texture: Option<Info>,
pub attenuation_distance: AttenuationDistance,
pub attenuation_color: AttenuationColor,
pub extras: Extras,
}
Fields§
§thickness_factor: ThicknessFactor
The thickness of the volume beneath the surface. The value is
given in the coordinate space of the mesh. If the value is 0
the material is thin-walled. Otherwise the material is a
volume boundary. The doubleSided
property has no effect on
volume boundaries. Range is [0, +inf).
thickness_texture: Option<Info>
A texture that defines the thickness, stored in the G channel.
This will be multiplied by thickness_factor
. Range is [0, 1].
attenuation_distance: AttenuationDistance
Density of the medium given as the average distance that light travels in the medium before interacting with a particle. The value is given in world space. Range is (0, +inf).
attenuation_color: AttenuationColor
The color that white light turns into due to absorption when reaching the attenuation distance.
extras: Extras
Optional application specific data.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Volume
impl<'de> Deserialize<'de> for Volume
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Volume
impl Send for Volume
impl Sync for Volume
impl Unpin for Volume
impl UnwindSafe for Volume
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more