(self)
| 232 | self.dial = np.linalg.norm(self.box[1]-self.box[0]) |
| 233 | |
| 234 | def count_mvp(self): |
| 235 | #print('mvp') |
| 236 | ymax = (1.0 if self.pers else self.l) * np.tan(self.fovy * np.pi / 360.0) |
| 237 | xmax = ymax * self.ratio |
| 238 | proj = (perspective if self.pers else orthogonal)(xmax, ymax, 1.0, 100000) |
| 239 | lookat = look_at(self.eye, self.center, (0.0,0.0,1.0)) |
| 240 | self.mvp = (lookat, proj) |
| 241 | |
| 242 | def set_viewport(self, x, y, width, height): |
| 243 | self.ctx.viewport = (x, y, width, height) |