Esempio n. 1
0
 def __init__(self, light_vector):
     super().__init__()
     # Get the only ione suzanne color mesh
     objects = load("suzanne.obj")
     assert len(objects)
     self.color_mesh = objects[0]
     # Add the light
     self.color_mesh.addUniform3fv({"light": light_vector})
     print(self.color_mesh)
     self.add(self.color_mesh)
Esempio n. 2
0
def main():
    """ create a window, add scene objects, then run rendering loop """
    viewer = ViewerPyramid()

    # place instances of our basic objects
    # viewer.add(PyramideMultiColors())
            # one time initialization
    viewer.add(PyramidColored())
    viewer.add(load("suzanne.obj")[0])

    # start rendering loop
    viewer.run()
Esempio n. 3
0
 def __init__(self):
     super().__init__()
     self.add(*load('cylinder.obj'))  # just load the cylinder from file