def init(self): Scene.init(self) self.triangles = triangles = openOff( "./meshes/icosa.off").get_triangles() self.mesh = TriangleMeshNode( triangles=triangles, scene=self, #scaling=[0.5, 0.5, 0.5], scaling=[1.0, 1.0, 1.0], position=[0.0, 0.0, 0.0], draw_origin=False) self.pointer = PointerNode(scene=self, draw_origin=False) self.points = ColoredPointCloudNode(scene=self, color=(1.0, 1.0, 1.0, 1.0), position=[0.0, 0.0, 10.0], draw_origin=False) self.helpers = ColoredPointCloudNode(scene=self, color=(1.0, 1.0, 1.0, 1.0), position=[0.0, 0.0, 0.0], draw_origin=False) self.children.append(self.mesh) self.children.append(self.pointer) self.children.append(self.points) self.children.append(self.helpers)
def init(self): WindowedScene.init(self) glutSetWindow(self.window) self.tex = Texture(image = self.application._current_texture) # get triangle mesh self._log.debug(u"Loading mesh...") triangles = openOff("./data/cow.off").get_triangles() mesh = TriangleMeshNode(triangles = triangles, scene = self, #scaling=[0.5, 0.5, 0.5], position = [0.0, 0.0, 0.0], texture = self.tex, draw_origin = False) self.cursor = CursorNode(scene = self, draw_origin= False) self.children.append(mesh) mesh.children.append(self.cursor)