Class: Cosmos::GlLight
Instance Attribute Summary collapse
-
#ambient ⇒ Object
Returns the value of attribute ambient.
-
#c_attn ⇒ Object
Returns the value of attribute c_attn.
-
#cutoff ⇒ Object
Returns the value of attribute cutoff.
-
#diffuse ⇒ Object
Returns the value of attribute diffuse.
-
#direction ⇒ Object
Returns the value of attribute direction.
-
#exponent ⇒ Object
Returns the value of attribute exponent.
-
#l_attn ⇒ Object
Returns the value of attribute l_attn.
-
#position ⇒ Object
Returns the value of attribute position.
-
#q_attn ⇒ Object
Returns the value of attribute q_attn.
-
#specular ⇒ Object
Returns the value of attribute specular.
Instance Method Summary collapse
-
#initialize ⇒ GlLight
constructor
A new instance of GlLight.
Constructor Details
#initialize ⇒ GlLight
Returns a new instance of GlLight.
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 25 def initialize @ambient =[0.0, 0.0, 0.0, 1.0] @diffuse = [1.0, 1.0, 1.0, 1.0] @specular = [0.0, 0.0, 0.0, 1.0] @position = [-2.0, 2.0, 5.0, 0.0] @direction = [0.0, 0.0, -1.0] @exponent = 0.0 @cutoff = 180.0 @c_attn = 1.0 @l_attn = 0.0 @q_attn = 0.0 end |
Instance Attribute Details
#ambient ⇒ Object
Returns the value of attribute ambient.
14 15 16 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 14 def ambient @ambient end |
#c_attn ⇒ Object
Returns the value of attribute c_attn.
21 22 23 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 21 def c_attn @c_attn end |
#cutoff ⇒ Object
Returns the value of attribute cutoff.
20 21 22 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 20 def cutoff @cutoff end |
#diffuse ⇒ Object
Returns the value of attribute diffuse.
15 16 17 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 15 def diffuse @diffuse end |
#direction ⇒ Object
Returns the value of attribute direction.
18 19 20 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 18 def direction @direction end |
#exponent ⇒ Object
Returns the value of attribute exponent.
19 20 21 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 19 def exponent @exponent end |
#l_attn ⇒ Object
Returns the value of attribute l_attn.
22 23 24 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 22 def l_attn @l_attn end |
#position ⇒ Object
Returns the value of attribute position.
17 18 19 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 17 def position @position end |
#q_attn ⇒ Object
Returns the value of attribute q_attn.
23 24 25 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 23 def q_attn @q_attn end |
#specular ⇒ Object
Returns the value of attribute specular.
16 17 18 |
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 16 def specular @specular end |