Class: Mittsu::AmbientLight::Cache

Inherits:
Struct
  • Object
show all
Defined in:
lib/mittsu/renderers/opengl/lights/ambient_light.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCache

Returns a new instance of Cache.



6
7
8
# File 'lib/mittsu/renderers/opengl/lights/ambient_light.rb', line 6

def initialize
  super(0, 0, [0.0, 0.0, 0.0])
end

Instance Attribute Details

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



5
6
7
# File 'lib/mittsu/renderers/opengl/lights/ambient_light.rb', line 5

def count
  @count
end

#lengthObject

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



5
6
7
# File 'lib/mittsu/renderers/opengl/lights/ambient_light.rb', line 5

def length
  @length
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



5
6
7
# File 'lib/mittsu/renderers/opengl/lights/ambient_light.rb', line 5

def value
  @value
end

Instance Method Details

#resetObject



10
11
12
13
14
15
# File 'lib/mittsu/renderers/opengl/lights/ambient_light.rb', line 10

def reset
  self.length = 0
  self.value[0] = 0.0
  self.value[1] = 0.0
  self.value[2] = 0.0
end