Class: PBRT::Builder::LightSource

Inherits:
Object
  • Object
show all
Defined in:
lib/pbrt/builder/light_source.rb

Instance Method Summary collapse

Constructor Details

#initialize(builder) ⇒ LightSource

Returns a new instance of LightSource.



4
5
6
# File 'lib/pbrt/builder/light_source.rb', line 4

def initialize(builder)
  @builder = builder
end

Instance Method Details

#distant(params = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/pbrt/builder/light_source.rb', line 8

def distant(params = {})
  write Statement.variadic("LightSource", "distant", ParameterList.from(
    params,

    scale: :spectrum,
    L: :spectrum,
    from: :point3,
    to: :point3,
  ))
end

#goniometric(params = {}) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/pbrt/builder/light_source.rb', line 19

def goniometric(params = {})
  write Statement.variadic("LightSource", "goniometric", ParameterList.from(
    params,

    scale: :spectrum,
    I: :spectrum,
    mapname: :string,
  ))
end

#infinite(params = {}) ⇒ Object



29
30
31
32
33
34
35
36
37
38
# File 'lib/pbrt/builder/light_source.rb', line 29

def infinite(params = {})
  write Statement.variadic("LightSource", "infinite", ParameterList.from(
    params,

    scale: :spectrum,
    L: :spectrum,
    samples: :integer,
    mapname: :string,
  ))
end

#point(params = {}) ⇒ Object



40
41
42
43
44
45
46
47
48
# File 'lib/pbrt/builder/light_source.rb', line 40

def point(params = {})
  write Statement.variadic("LightSource", "point", ParameterList.from(
    params,

    scale: :spectrum,
    I: :spectrum,
    from: :point3,
  ))
end

#projection(params = {}) ⇒ Object



50
51
52
53
54
55
56
57
58
59
# File 'lib/pbrt/builder/light_source.rb', line 50

def projection(params = {})
  write Statement.variadic("LightSource", "projection", ParameterList.from(
    params,

    scale: :spectrum,
    I: :spectrum,
    fov: :float,
    mapname: :string,
  ))
end

#spot(params = {}) ⇒ Object



61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/pbrt/builder/light_source.rb', line 61

def spot(params = {})
  write Statement.variadic("LightSource", "spot", ParameterList.from(
    params,

    scale: :spectrum,
    I: :spectrum,
    from: :point3,
    to: :point3,
    coneangle: :float,
    conedeltaangle: :float,
  ))
end