| 2848 | |
| 2849 | |
| 2850 | void Widget::resetModelviewMatrix() |
| 2851 | // ---------------------------------------------------------------------------- |
| 2852 | // Reset the model-view matrix, used by reset_transform and setup |
| 2853 | // ---------------------------------------------------------------------------- |
| 2854 | { |
| 2855 | GL.LoadIdentity(); |
| 2856 | |
| 2857 | // Position the camera |
| 2858 | Vector3 toTarget = Vector3(cameraTarget - cameraPosition).Normalize(); |
| 2859 | toTarget *= cameraToScreen; |
| 2860 | Point3 target = cameraPosition + toTarget; |
| 2861 | GL.LookAt(cameraPosition, target, cameraUpVector); |
| 2862 | } |
| 2863 | |
| 2864 | |
| 2865 | void Widget::setupGL() |
no test coverage detected