class PBRT::Builder::Shape

Public Class Methods

new(builder) click to toggle source
# File lib/pbrt/builder/shape.rb, line 4
def initialize(builder)
  @builder = builder
end

Public Instance Methods

cone(params = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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

Private Instance Methods

write(statement) click to toggle source
# File lib/pbrt/builder/shape.rb, line 166
def write(statement)
  @builder.write(statement)
end