Example #1
0
 def init(self):
     WindowedScene.init(self)
     window_width = glutGet(GLUT_WINDOW_WIDTH)
     window_height = glutGet(GLUT_WINDOW_HEIGHT)
     
     self.tex = Texture(image = self.application._current_texture)
     texture_width, texture_height = self.application._current_texture.size
     quad = QuadNode(vertices   = [(texture_width,  0.0,  0.0),
                                   (texture_width,  texture_height,  0.0),
                                   (0.0,  texture_height,  0.0), 
                                   (0.0, 0.0, 0.0),  
                                    ], 
                     scene       = self, 
                     #scaling=[0.5, 0.5, 0.5],
                     position    = [0.0, 0.0, 0.0],
                     texture     = self.tex, 
                     draw_origin = False)
     self.children.append(quad)
Example #2
0
 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)
Example #3
0
    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)
Example #4
0
    def init(self):
        WindowedScene.init(self)
        window_width = glutGet(GLUT_WINDOW_WIDTH)
        window_height = glutGet(GLUT_WINDOW_HEIGHT)

        self.tex = Texture(image=self.application._current_texture)
        texture_width, texture_height = self.application._current_texture.size
        quad = QuadNode(
            vertices=[
                (texture_width, 0.0, 0.0),
                (texture_width, texture_height, 0.0),
                (0.0, texture_height, 0.0),
                (0.0, 0.0, 0.0),
            ],
            scene=self,
            # scaling=[0.5, 0.5, 0.5],
            position=[0.0, 0.0, 0.0],
            texture=self.tex,
            draw_origin=False,
        )
        self.children.append(quad)