Struct three_d::renderer::light::SpotLight [−][src]
pub struct SpotLight { /* fields omitted */ }Expand description
A light which shines from the given position and in the given direction. The light will cast shadows if you generate a shadow map.
Implementations
pub fn new(
context: &Context,
intensity: f32,
color: Color,
position: &Vec3,
direction: &Vec3,
cutoff: f32,
attenuation_constant: f32,
attenuation_linear: f32,
attenuation_exponential: f32
) -> ThreeDResult<SpotLight>
pub fn generate_shadow_map<G: Geometry>(
&mut self,
frustrum_depth: f32,
texture_size: u32,
geometries: &[G]
) -> ThreeDResult<()>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for SpotLight
impl !UnwindSafe for SpotLight
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more