Return the view transformation matrix. Parameters ---------- u : 3-element numpy array Unit vector pointing towards the right of the screen. v : 3-element numpy array Unit vector pointing towards the top of the screen. w : 3-element numpy array Unit
(u, v, w, E)
| 86 | |
| 87 | |
| 88 | def _view_transformation_uvw(u, v, w, E): |
| 89 | """ |
| 90 | Return the view transformation matrix. |
| 91 | |
| 92 | Parameters |
| 93 | ---------- |
| 94 | u : 3-element numpy array |
| 95 | Unit vector pointing towards the right of the screen. |
| 96 | v : 3-element numpy array |
| 97 | Unit vector pointing towards the top of the screen. |
| 98 | w : 3-element numpy array |
| 99 | Unit vector pointing out of the screen. |
| 100 | E : 3-element numpy array |
| 101 | The coordinates of the eye/camera. |
| 102 | """ |
| 103 | Mr = np.eye(4) |
| 104 | Mt = np.eye(4) |
| 105 | Mr[:3, :3] = [u, v, w] |
| 106 | Mt[:3, -1] = -E |
| 107 | M = np.dot(Mr, Mt) |
| 108 | return M |
| 109 | |
| 110 | |
| 111 | def _persp_transformation(zfront, zback, focal_length): |
nothing calls this directly
no test coverage detected
searching dependent graphs…