pub struct Light { /* private fields */ }Expand description
Implementations§
Source§impl Light
impl Light
Sourcepub fn as_raw_mut(&mut self) -> &mut C3D_Light
pub fn as_raw_mut(&mut self) -> &mut C3D_Light
Returns a mutable reference to the raw Citro3D representation.
§Notes
This does not take Pin<&mut Self> and rather borrows the value directly.
If you need the raw from a pinned light you must use unsafe and ensure you uphold the pinning
restrictions of the original Light.
Sourcepub fn set_position(self: Pin<&mut Self>, p: FVec3)
pub fn set_position(self: Pin<&mut Self>, p: FVec3)
Sets the position, in 3D space, of the light source.
Sourcepub fn set_enabled(self: Pin<&mut Self>, enabled: bool)
pub fn set_enabled(self: Pin<&mut Self>, enabled: bool)
Enables/disables the light source.
Sourcepub fn set_shadow(self: Pin<&mut Self>, shadow: bool)
pub fn set_shadow(self: Pin<&mut Self>, shadow: bool)
Enables/disables the light source’s shadow emission.
Sourcepub fn set_distance_attenutation(
self: Pin<&mut Self>,
lut: Option<DistanceAttenuation>,
)
pub fn set_distance_attenutation( self: Pin<&mut Self>, lut: Option<DistanceAttenuation>, )
Sets the distance attenuation behaviour of the light.
Sourcepub fn set_spotlight(self: Pin<&mut Self>, lut: Option<Spotlight>)
pub fn set_spotlight(self: Pin<&mut Self>, lut: Option<Spotlight>)
Sets the spotlight behaviour of the light.
Sourcepub fn set_spotlight_direction(self: Pin<&mut Self>, direction: FVec3)
pub fn set_spotlight_direction(self: Pin<&mut Self>, direction: FVec3)
Sets the spotlight direction of the light (relatively to the light’s source position).