Sha256: 2aa13dbac9df4584bf37b262d7458f81bd524147868438722966574bcb533f84

Contents?: true

Size: 509 Bytes

Versions: 18

Compression:

Stored size: 509 Bytes

Contents

module Mittsu
  class AmbientLight
    TYPE = :ambient

    class Cache < Struct.new(:length, :count, :value)
      def initialize
        super(0, 0, [0.0, 0.0, 0.0])
      end

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

    def setup_specific(_)
      @cache.value[0] += color.r
      @cache.value[1] += color.g
      @cache.value[2] += color.b
    end

    def self.null_remaining_lights(_); end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
mittsu-opengl-0.5.1 lib/mittsu/opengl_implementation/lights/ambient_light.rb
mittsu-0.4.1 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-opengl-0.5.0 lib/mittsu/opengl_implementation/lights/ambient_light.rb
mittsu-0.4.0 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.3.3 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.3.2 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.3.1 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.3.0 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.2.4 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.2.3 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.2.2 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.2.1 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.2.0 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.1.7 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.1.6 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.1.5 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.1.4 lib/mittsu/renderers/opengl/lights/ambient_light.rb
mittsu-0.1.3 lib/mittsu/renderers/opengl/lights/ambient_light.rb