C# Class Nez.DeferredLighting.DirLight

directional light with a shortended name to avoid clashes with the XNA DirectionalLight. This light type has only a direction and is never culled. It is a global light and the only light that produces specular highlights.
Inheritance: DeferredLight
Show file Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
direction Vector3
specularIntensity float
specularPower float

Public Methods

Method Description
DirLight ( ) : Microsoft.Xna.Framework
DirLight ( Color color ) : Microsoft.Xna.Framework
DirLight ( Color color, Vector3 lightDirection ) : Microsoft.Xna.Framework
debugRender ( Graphics graphics ) : void

we dont want to render our bounds so we just render a direction

setDirection ( Vector3 direction ) : DirLight
setSpecularIntensity ( float specularIntensity ) : DirLight
setSpecularPower ( float specularPower ) : DirLight

Method Details

DirLight() public method

public DirLight ( ) : Microsoft.Xna.Framework
return Microsoft.Xna.Framework

DirLight() public method

public DirLight ( Color color ) : Microsoft.Xna.Framework
color Color
return Microsoft.Xna.Framework

DirLight() public method

public DirLight ( Color color, Vector3 lightDirection ) : Microsoft.Xna.Framework
color Color
lightDirection Vector3
return Microsoft.Xna.Framework

debugRender() public method

we dont want to render our bounds so we just render a direction
public debugRender ( Graphics graphics ) : void
graphics Graphics Graphics.
return void

setDirection() public method

public setDirection ( Vector3 direction ) : DirLight
direction Vector3
return DirLight

setSpecularIntensity() public method

public setSpecularIntensity ( float specularIntensity ) : DirLight
specularIntensity float
return DirLight

setSpecularPower() public method

public setSpecularPower ( float specularPower ) : DirLight
specularPower float
return DirLight

Property Details

direction public property

direction of the light
public Vector3 direction
return Vector3

specularIntensity public property

specular intensity. 0 - 1 range
public float specularIntensity
return float

specularPower public property

specular power. this is the exponent passed to pow() of the projection from 0,0,-1 to the light-to-normal
public float specularPower
return float