package Ġc ga . exercise . components . light Ċ Ċ import Ġc ga . exercise . components . shader . Shader Program Ċ import Ġorg . j om l . Matrix 4 f Ċ import Ġorg . j om l . Vector 2 f Ċ import Ġorg . j om l . Vector 3 f Ċ import Ġorg . j om l .* Ċ Ċ open Ġclass ĠSpot light ( light Pos : ĠVector 3 f , Ġlight Col : ĠVector 3 f , Ġatt Param : ĠVector 3 f Ġ= ĠVector 3 f ( 0 . 5 f , 0 . 0 5 f , 0 . 0 1 f ), Ġvar Ġangle : ĠVector 2 f Ġ= ĠVector 2 f ( Math . to Radians ( 1 5 . 0 f ), Math . to Radians ( 3 0 . 0 f )) ): ĠI Spot Light , ĠPoint light ( light Pos , light Col , att Param ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġbind ( shader Program : ĠShader Program , Ġname : ĠString , Ġview Matrix : ĠMatrix 4 f ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . bind ( shader Program , name ) ĊĠĠĠĠĠĠĠ Ġshader Program . set Uniform ( name Ġ+ Ġ" Light Angle ", Ġangle ) ĊĠĠĠĠĠĠĠ Ġshader Program . set Uniform ( name Ġ+ Ġ" Light Dir ", Ġget World Z Axis (). neg ate (). mul ( Matrix 3 f ( view Matrix ))) Ġ// L ich tric ht ungs ve ktor Ġ( 3 rd Ġnormalized Ġcolumn Ġof Ġworld Ġmodel Ġmatrix ) ĊĠĠĠ Ġ} Ċ }