Class: Rubytracer::AmbientLight

Inherits:
Object
  • Object
show all
Defined in:
lib/rubytracer/lights/ambient.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ AmbientLight

Returns a new instance of AmbientLight.



5
6
7
# File 'lib/rubytracer/lights/ambient.rb', line 5

def initialize value
  @value = value
end

Instance Method Details

#diffuse(normal, point, scene) ⇒ Object



13
14
15
# File 'lib/rubytracer/lights/ambient.rb', line 13

def diffuse(normal, point, scene)
  return @value
end

#specular(normal, view_vector, point, scene) ⇒ Object



9
10
11
# File 'lib/rubytracer/lights/ambient.rb', line 9

def specular(normal, view_vector, point, scene)
  return Colour.new(0,0,0)
end