Class: PBRT::Builder::Texture

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

Instance Method Summary collapse

Constructor Details

#initialize(builder, name, type) ⇒ Texture

Returns a new instance of Texture.



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

def initialize(builder, name, type)
  @builder = builder
  @directive = %(Texture "#{name}" "#{type}")
end

Instance Method Details

#bilerp(params = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/pbrt/builder/texture.rb', line 9

def bilerp(params = {})
  write Statement.variadic(@directive, "bilerp", ParameterList.from(
    params,

    mapping: :string,
    uscale: :float,
    vscale: :float,
    udelta: :float,
    vdelta: :float,
    v1: :vector3,
    v2: :vector3,
    v00: :texture,
    v01: :texture,
    v10: :texture,
    v11: :texture,
  ))
end

#checkerboard(params = {}) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/pbrt/builder/texture.rb', line 27

def checkerboard(params = {})
  write Statement.variadic(@directive, "checkerboard", ParameterList.from(
    params,

    mapping: :string,
    uscale: :float,
    vscale: :float,
    udelta: :float,
    vdelta: :float,
    v1: :vector3,
    v2: :vector3,
    dimension: :integer,
    tex1: :texture,
    tex2: :texture,
    aamode: :string,
  ))
end

#constant(params = {}) ⇒ Object



45
46
47
48
49
50
51
52
# File 'lib/pbrt/builder/texture.rb', line 45

def constant(params = {})
  write Statement.variadic(@directive, "constant", ParameterList.from(
    params,

    value: :texture,
    foo: :texture,
  ))
end

#dots(params = {}) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/pbrt/builder/texture.rb', line 54

def dots(params = {})
  write Statement.variadic(@directive, "dots", ParameterList.from(
    params,

    mapping: :string,
    uscale: :float,
    vscale: :float,
    udelta: :float,
    vdelta: :float,
    v1: :vector3,
    v2: :vector3,
    inside: :texture,
    outside: :texture,
  ))
end

#fbm(params = {}) ⇒ Object



70
71
72
73
74
75
76
77
# File 'lib/pbrt/builder/texture.rb', line 70

def fbm(params = {})
  write Statement.variadic(@directive, "fbm", ParameterList.from(
    params,

    octaves: :integer,
    roughness: :float,
  ))
end

#imagemap(params = {}) ⇒ Object



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/pbrt/builder/texture.rb', line 79

def imagemap(params = {})
  write Statement.variadic(@directive, "imagemap", ParameterList.from(
    params,

    mapping: :string,
    uscale: :float,
    vscale: :float,
    udelta: :float,
    vdelta: :float,
    v1: :vector3,
    v2: :vector3,
    filename: :string,
    wrap: :string,
    maxanisotropy: :float,
    trilinear: :bool,
    scale: :float,
    gamma: :bool,
  ))
end

#marble(params = {}) ⇒ Object



99
100
101
102
103
104
105
106
107
108
# File 'lib/pbrt/builder/texture.rb', line 99

def marble(params = {})
  write Statement.variadic(@directive, "marble", ParameterList.from(
    params,

    octaves: :integer,
    roughness: :float,
    scale: :float,
    variation: :float,
  ))
end

#mix(params = {}) ⇒ Object



110
111
112
113
114
115
116
117
118
# File 'lib/pbrt/builder/texture.rb', line 110

def mix(params = {})
  write Statement.variadic(@directive, "mix", ParameterList.from(
    params,

    tex1: :texture,
    tex2: :texture,
    amount: :float_texture,
  ))
end

#scale(params = {}) ⇒ Object



120
121
122
123
124
125
126
127
# File 'lib/pbrt/builder/texture.rb', line 120

def scale(params = {})
  write Statement.variadic(@directive, "scale", ParameterList.from(
    params,

    tex1: :texture,
    tex2: :texture,
  ))
end

#uv(params = {}) ⇒ Object



129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/pbrt/builder/texture.rb', line 129

def uv(params = {})
  write Statement.variadic(@directive, "uv", ParameterList.from(
    params,

    mapping: :string,
    uscale: :float,
    vscale: :float,
    udelta: :float,
    vdelta: :float,
    v1: :vector3,
    v2: :vector3,
  ))
end

#windy(params = {}) ⇒ Object



143
144
145
146
147
148
149
# File 'lib/pbrt/builder/texture.rb', line 143

def windy(params = {})
  write Statement.variadic(@directive, "windy", ParameterList.from(
    params,

    mapping: :string,
  ))
end

#wrinkled(params = {}) ⇒ Object



151
152
153
154
155
156
157
158
# File 'lib/pbrt/builder/texture.rb', line 151

def wrinkled(params = {})
  write Statement.variadic(@directive, "wrinkled", ParameterList.from(
    params,

    octaves: :integer,
    roughness: :float,
  ))
end