Class: Cosmos::GlLight

Inherits:
Object show all
Defined in:
lib/cosmos/gui/opengl/gl_light.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGlLight

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

#ambientObject

Returns the value of attribute ambient.



14
15
16
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 14

def ambient
  @ambient
end

#c_attnObject

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

#cutoffObject

Returns the value of attribute cutoff.



20
21
22
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 20

def cutoff
  @cutoff
end

#diffuseObject

Returns the value of attribute diffuse.



15
16
17
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 15

def diffuse
  @diffuse
end

#directionObject

Returns the value of attribute direction.



18
19
20
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 18

def direction
  @direction
end

#exponentObject

Returns the value of attribute exponent.



19
20
21
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 19

def exponent
  @exponent
end

#l_attnObject

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

#positionObject

Returns the value of attribute position.



17
18
19
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 17

def position
  @position
end

#q_attnObject

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

#specularObject

Returns the value of attribute specular.



16
17
18
# File 'lib/cosmos/gui/opengl/gl_light.rb', line 16

def specular
  @specular
end