Class: PBRT::Builder::Shape

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

Instance Method Summary collapse

Constructor Details

#initialize(builder) ⇒ Shape

Returns a new instance of Shape.



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

def initialize(builder)
  @builder = builder
end

Instance Method Details

#cone(params = {}) ⇒ Object



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

def cone(params = {})
  write Statement.variadic("Shape", "cone", ParameterList.from(
    params,

    allow_material_overrides: true,
    radius: :float,
    height: :float,
    phimax: :float,
  ))
end

#curve(params = {}) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/pbrt/builder/shape.rb', line 19

def curve(params = {})
  write Statement.variadic("Shape", "curve", ParameterList.from(
    params,

    allow_material_overrides: true,
    P: :point3,
    basis: :string,
    degree: :integer,
    type: :string,
    N: :normal3,
    width: :float,
    width0: :float,
    width1: :float,
    splitdepth: :integer,
  ))
end

#cylinder(params = {}) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/pbrt/builder/shape.rb', line 36

def cylinder(params = {})
  write Statement.variadic("Shape", "cylinder", ParameterList.from(
    params,

    allow_material_overrides: true,
    radius: :float,
    zmin: :float,
    zmax: :float,
    phimax: :float,
  ))
end

#disk(params = {}) ⇒ Object



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

def disk(params = {})
  write Statement.variadic("Shape", "disk", ParameterList.from(
    params,

    allow_material_overrides: true,
    height: :float,
    radius: :float,
    innerradius: :float,
    phimax: :float,
  ))
end

#heightfield(params = {}) ⇒ Object



111
112
113
114
115
116
117
118
119
120
# File 'lib/pbrt/builder/shape.rb', line 111

def heightfield(params = {})
  write Statement.variadic("Shape", "heightfield", ParameterList.from(
    params,

    allow_material_overrides: true,
    nu: :integer,
    nv: :integer,
    Pz: :float,
  ))
end

#hyperboloid(params = {}) ⇒ Object



60
61
62
63
64
65
66
67
68
69
# File 'lib/pbrt/builder/shape.rb', line 60

def hyperboloid(params = {})
  write Statement.variadic("Shape", "hyperboloid", ParameterList.from(
    params,

    allow_material_overrides: true,
    p1: :point3,
    p2: :point3,
    phimax: :float,
  ))
end

#loopsubdiv(params = {}) ⇒ Object



122
123
124
125
126
127
128
129
130
131
# File 'lib/pbrt/builder/shape.rb', line 122

def loopsubdiv(params = {})
  write Statement.variadic("Shape", "loopsubdiv", ParameterList.from(
    params,

    allow_material_overrides: true,
    levels: :integer,
    indices: :integer,
    P: :point3,
  ))
end

#nurbs(params = {}) ⇒ Object



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/pbrt/builder/shape.rb', line 133

def nurbs(params = {})
  write Statement.variadic("Shape", "nurbs", ParameterList.from(
    params,

    allow_material_overrides: true,
    nu: :integer,
    nv: :integer,
    uorder: :integer,
    vorder: :integer,
    uknots: :float,
    vknots: :float,
    u0: :float,
    v0: :float,
    u1: :float,
    v1: :float,
    P: :point3,
    Pw: :float,
  ))
end

#paraboloid(params = {}) ⇒ Object



71
72
73
74
75
76
77
78
79
80
81
# File 'lib/pbrt/builder/shape.rb', line 71

def paraboloid(params = {})
  write Statement.variadic("Shape", "paraboloid", ParameterList.from(
    params,

    allow_material_overrides: true,
    radius: :float,
    zmin: :float,
    zmax: :float,
    phimax: :float,
  ))
end

#plymesh(params = {}) ⇒ Object



153
154
155
156
157
158
159
160
161
162
# File 'lib/pbrt/builder/shape.rb', line 153

def plymesh(params = {})
  write Statement.variadic("Shape", "plymesh", ParameterList.from(
    params,

    allow_material_overrides: true,
    filename: :string,
    alpha: :float_texture,
    shadowalpha: :float_texture,
  ))
end

#sphere(params = {}) ⇒ Object



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/pbrt/builder/shape.rb', line 83

def sphere(params = {})
  write Statement.variadic("Shape", "sphere", ParameterList.from(
    params,

    allow_material_overrides: true,
    radius: :float,
    zmin: :float,
    zmax: :float,
    phimax: :float,
  ))
end

#trianglemesh(params = {}) ⇒ Object



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/pbrt/builder/shape.rb', line 95

def trianglemesh(params = {})
  write Statement.variadic("Shape", "trianglemesh", ParameterList.from(
    params,

    allow_material_overrides: true,
    indices: :integer,
    P: :point3,
    N: :normal3,
    S: :vector3,
    uv: :float,
    alpha: :float_texture,
    shadowalpha: :float_texture,
    st: :float,
  ))
end