def draw_all(self): """ Draw all actors """ self.camera.draw() for k, scene in self.scenes.items(): # use transformation matrix of the scene to setup the modelview vsml.pushMatrix( vsml.MatrixTypes.MODELVIEW ) # in fact, push the camera modelview vsml.multMatrix( vsml.MatrixTypes.MODELVIEW, scene.transform.get_transform_numpy() ) glMatrixMode(GL_MODELVIEW) glLoadMatrixf(vsml.get_modelview()) scene.draw_actors() # take back the old camera modelview vsml.popMatrix( vsml.MatrixTypes.MODELVIEW )
def pick_all(self, x, y): """ Calls the pick function on all Regions """ self.camera.draw() for k, region in self.regions.items(): # use transformation matrix of the region to setup the modelview vsml.pushMatrix(vsml.MatrixTypes.MODELVIEW) vsml.multMatrix(vsml.MatrixTypes.MODELVIEW, region.transform.get_transform_numpy()) glMatrixMode(GL_MODELVIEW) glLoadMatrixf(vsml.get_modelview()) region.pick_actors(x, y) # take back the old camera modelview vsml.popMatrix(vsml.MatrixTypes.MODELVIEW)
def pick_all(self, x, y): """ Calls the pick function on all Scenes """ self.camera.draw() for k, scene in self.scenes.items(): # use transformation matrix of the scene to setup the modelview vsml.pushMatrix( vsml.MatrixTypes.MODELVIEW ) vsml.multMatrix( vsml.MatrixTypes.MODELVIEW, scene.transform.get_transform_numpy() ) glMatrixMode(GL_MODELVIEW) glLoadMatrixf(vsml.get_modelview()) scene.pick_actors( x, y ) # take back the old camera modelview vsml.popMatrix( vsml.MatrixTypes.MODELVIEW )
def draw_all(self): """ Draw all actors """ self.camera.draw() for k, region in self.regions.items(): # use transformation matrix of the region to setup the modelview vsml.pushMatrix(vsml.MatrixTypes.MODELVIEW ) # in fact, push the camera modelview vsml.multMatrix(vsml.MatrixTypes.MODELVIEW, region.transform.get_transform_numpy()) glMatrixMode(GL_MODELVIEW) glLoadMatrixf(vsml.get_modelview()) region.draw_actors() # take back the old camera modelview vsml.popMatrix(vsml.MatrixTypes.MODELVIEW)