Struct amethyst_renderer::PointLight [−][src]
#[repr(C)]pub struct PointLight { pub center: [f32; 3], pub color: Rgba, pub intensity: f32, pub radius: f32, pub smoothness: f32, }
A point light source.
Lighting calculations are based off of the Frostbite engine's lighting, which is explained in detail here in this presentation. Below is equation 26, which we used for the lighting evaluation.
The Point
properties below map like so:
- I =
intensity
- lightRadius =
radius
- n =
smoothness
Fields
center: [f32; 3]
Location of the light source in three dimensional space.
color: Rgba
Color of the light in RGBA8 format.
intensity: f32
Brightness of the light source, in lumens.
radius: f32
Maximum radius of the point light's affected area.
smoothness: f32
Smoothness of the light-to-dark transition from the center to the radius.
Trait Implementations
impl Clone for PointLight
[src]
impl Clone for PointLight
fn clone(&self) -> PointLight
[src]
fn clone(&self) -> PointLight
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Pod for PointLight
[src]
impl Pod for PointLight
impl Structure<ConstFormat> for PointLight
[src]
impl Structure<ConstFormat> for PointLight
fn query(field_name: &str) -> Option<Element<ConstFormat>>
[src]
fn query(field_name: &str) -> Option<Element<ConstFormat>>
Get the layout of an element by name.
impl Debug for PointLight
[src]
impl Debug for PointLight
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for PointLight
[src]
impl PartialEq for PointLight
fn eq(&self, other: &PointLight) -> bool
[src]
fn eq(&self, other: &PointLight) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &PointLight) -> bool
[src]
fn ne(&self, other: &PointLight) -> bool
This method tests for !=
.
impl Default for PointLight
[src]
impl Default for PointLight
impl From<PointLight> for Light
[src]
impl From<PointLight> for Light
fn from(pt: PointLight) -> Self
[src]
fn from(pt: PointLight) -> Self
Performs the conversion.
Auto Trait Implementations
impl Send for PointLight
impl Send for PointLight
impl Sync for PointLight
impl Sync for PointLight