Class: Hate::Graphics::Light
- Inherits:
-
Object
- Object
- Hate::Graphics::Light
- Defined in:
- lib/hate/graphics/light.rb
Instance Attribute Summary collapse
-
#ambient ⇒ Object
Returns the value of attribute ambient.
-
#diffuse ⇒ Object
Returns the value of attribute diffuse.
-
#position ⇒ Object
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize(a = [0.5, 0.5, 0.5, 1.0], d = [1.0, 1.0, 1.0, 1.0], p = [0.0, 10.0, 0.0, 1.0]) ⇒ Light
constructor
A new instance of Light.
- #run ⇒ Object
Constructor Details
#initialize(a = [0.5, 0.5, 0.5, 1.0], d = [1.0, 1.0, 1.0, 1.0], p = [0.0, 10.0, 0.0, 1.0]) ⇒ Light
Returns a new instance of Light.
7 8 9 10 11 |
# File 'lib/hate/graphics/light.rb', line 7 def initialize(a=[0.5, 0.5, 0.5, 1.0], d=[1.0, 1.0, 1.0, 1.0], p=[0.0, 10.0, 0.0, 1.0]) @ambient = MemoryPointer.new(:float, 4).put_array_of_float(0, a) @diffuse = MemoryPointer.new(:float, 4).put_array_of_float(0, d) @position = MemoryPointer.new(:float, 4).put_array_of_float(0, p) end |
Instance Attribute Details
#ambient ⇒ Object
Returns the value of attribute ambient.
5 6 7 |
# File 'lib/hate/graphics/light.rb', line 5 def ambient @ambient end |
#diffuse ⇒ Object
Returns the value of attribute diffuse.
5 6 7 |
# File 'lib/hate/graphics/light.rb', line 5 def diffuse @diffuse end |
#position ⇒ Object
Returns the value of attribute position.
5 6 7 |
# File 'lib/hate/graphics/light.rb', line 5 def position @position end |
Instance Method Details
#run ⇒ Object
13 14 15 |
# File 'lib/hate/graphics/light.rb', line 13 def run end |