Sha256: e3c18dddfc1b91b28ee6df40c00f04d8e42dd0776125def4e3bbd2933d2331a7

Contents?: true

Size: 574 Bytes

Versions: 20

Compression:

Stored size: 574 Bytes

Contents

require 'mittsu/lights/light'

module Mittsu
  class AreaLight < Light
    attr_accessor :normal, :right, :intensity, :width, :height, :constant_attenuation, :linear_attenuation, :quadratic_attenuation

    def initialize(color = nil, intensity = 1.0)
      super(color)
      @type = 'AreaLight'

      @normal = Vector3.new(0.0, -1.0, 0.0)
      @right = Vector3.new(1.0, 0.0, 0.0)

      @intensity = intensity

      @width = 1.0
      @height = 1.0

      @constant_attenuation = 1.5
      @linear_attenuation = 0.5
      @quadratic_attenuation = 0.1
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mittsu-0.5.0 lib/mittsu/lights/area_light.rb
mittsu-0.4.1 lib/mittsu/lights/area_light.rb
mittsu-0.4.0 lib/mittsu/lights/area_light.rb
mittsu-0.3.3 lib/mittsu/lights/area_light.rb
mittsu-0.3.2 lib/mittsu/lights/area_light.rb
mittsu-0.3.1 lib/mittsu/lights/area_light.rb
mittsu-0.3.0 lib/mittsu/lights/area_light.rb
mittsu-0.2.4 lib/mittsu/lights/area_light.rb
mittsu-0.2.3 lib/mittsu/lights/area_light.rb
mittsu-0.2.2 lib/mittsu/lights/area_light.rb
mittsu-0.2.1 lib/mittsu/lights/area_light.rb
mittsu-0.2.0 lib/mittsu/lights/area_light.rb
mittsu-0.1.7 lib/mittsu/lights/area_light.rb
mittsu-0.1.6 lib/mittsu/lights/area_light.rb
mittsu-0.1.5 lib/mittsu/lights/area_light.rb
mittsu-0.1.4 lib/mittsu/lights/area_light.rb
mittsu-0.1.3 lib/mittsu/lights/area_light.rb
mittsu-0.1.2 lib/mittsu/lights/area_light.rb
mittsu-0.1.1 lib/mittsu/lights/area_light.rb
mittsu-0.1.0 lib/mittsu/lights/area_light.rb