--- a/demos/render_nff.py Mon Apr 21 08:47:36 2008 +0200
+++ b/demos/render_nff.py Mon Apr 21 09:05:09 2008 +0200
@@ -47,12 +47,12 @@
# set camera as specified
cam = Camera(eye=eye, lookat=lookat, up=up)
cam.setAngle(angle/180*pi)
- rt.setcamera(cam)
+ rt.setCamera(cam)
elif ln[0] == 'b': # Background color
- rt.setbgcolour((float(ln[1]), float(ln[2]), float(ln[3])))
+ rt.setBgColour((float(ln[1]), float(ln[2]), float(ln[3])))
elif ln[0] == 'l': # Light
pos = (float(ln[1]), float(ln[2]), float(ln[3]))
- rt.addlight(Light(position=pos))
+ rt.addLight(Light(position=pos))
elif ln[0] == 'f': # Fill color and shading parameters
colour = (float(ln[1]), float(ln[2]), float(ln[3]))
mat = Material(colour=colour)
@@ -61,7 +61,7 @@
elif ln[0] == 's': # Sphere
center = (float(ln[1]), float(ln[2]), float(ln[3]))
radius = float(ln[4])
- rt.addshape(Sphere(centre=center, radius=radius, material=mat))
+ rt.addShape(Sphere(centre=center, radius=radius, material=mat))
elif ln[0] == 'p': # Polygon
vertex_count = int(ln[1])
vertices = []
@@ -69,9 +69,9 @@
ln = f.readline().split()
vertex = (float(ln[0]), float(ln[1]), float(ln[2]))
vertices.append(NormalVertex(vertex))
- rt.addshape(Triangle(vertices[0], vertices[1], vertices[2], mat))
+ rt.addShape(Triangle(vertices[0], vertices[1], vertices[2], mat))
for i in range(vertex_count)[3:]:
- rt.addshape(Triangle(vertices[0], vertices[i-1], vertices[i], mat))
+ rt.addShape(Triangle(vertices[0], vertices[i-1], vertices[i], mat))
elif ln[0] == 'pp': # Polygonal patch
mat.setSmooth(True)
vertex_count = int(ln[1])
@@ -81,9 +81,9 @@
vertex = (float(ln[0]), float(ln[1]), float(ln[2]))
normal = (float(ln[3]), float(ln[4]), float(ln[5]))
vertices.append(NormalVertex(vertex, normal))
- rt.addshape(Triangle(vertices[0], vertices[1], vertices[2], mat))
+ rt.addShape(Triangle(vertices[0], vertices[1], vertices[2], mat))
for i in range(vertex_count)[3:]:
- rt.addshape(Triangle(vertices[0], vertices[i-1], vertices[i], mat))
+ rt.addShape(Triangle(vertices[0], vertices[i-1], vertices[i], mat))
elif ln[0] == '#': # Comment
pass
else: