Class: Cosmos::GlMaterial
- Defined in:
- lib/cosmos/gui/opengl/gl_material.rb
Instance Attribute Summary collapse
-
#ambient ⇒ Object
Returns the value of attribute ambient.
-
#diffuse ⇒ Object
Returns the value of attribute diffuse.
-
#emission ⇒ Object
Returns the value of attribute emission.
-
#shininess ⇒ Object
Returns the value of attribute shininess.
-
#specular ⇒ Object
Returns the value of attribute specular.
Instance Method Summary collapse
-
#initialize ⇒ GlMaterial
constructor
A new instance of GlMaterial.
Constructor Details
#initialize ⇒ GlMaterial
Returns a new instance of GlMaterial.
20 21 22 23 24 25 26 |
# File 'lib/cosmos/gui/opengl/gl_material.rb', line 20 def initialize @ambient = [0.2, 0.2, 0.2, 1.0] @diffuse = [0.8, 0.8, 0.8, 1.0] @specular = [1.0, 1.0, 1.0, 1.0] @emission = [0.0, 0.0, 0.0, 1.0] @shininess = 30.0; end |
Instance Attribute Details
#ambient ⇒ Object
Returns the value of attribute ambient.
14 15 16 |
# File 'lib/cosmos/gui/opengl/gl_material.rb', line 14 def ambient @ambient end |
#diffuse ⇒ Object
Returns the value of attribute diffuse.
15 16 17 |
# File 'lib/cosmos/gui/opengl/gl_material.rb', line 15 def diffuse @diffuse end |
#emission ⇒ Object
Returns the value of attribute emission.
17 18 19 |
# File 'lib/cosmos/gui/opengl/gl_material.rb', line 17 def emission @emission end |
#shininess ⇒ Object
Returns the value of attribute shininess.
18 19 20 |
# File 'lib/cosmos/gui/opengl/gl_material.rb', line 18 def shininess @shininess end |
#specular ⇒ Object
Returns the value of attribute specular.
16 17 18 |
# File 'lib/cosmos/gui/opengl/gl_material.rb', line 16 def specular @specular end |