
Conversion of Math types
Posted Monday, 27 December, 2010 - 21:52 by Laar| Project: | The Open Toolkit library |
| Version: | 1.0-2010-10-06 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | open |
Jump to:
Description
The Vector and matrix classes cannot convert from double to float variants or visa versa (nor from the half to float or double). This conversion is essential as the GL... calls don't use the double types.


Comments
#1
I find it to be a fairly rare need in practice, but I could also use this functionality, on occasion.
#2
There's a case where I usually need conversion between flat to double and back:
if at some point I need to do an inverse projection (for example, to project the mouse coordinates into 3D space) I usually need to do all the operations in double precission, because simple precission produces a lot of error in the resulting 3D point. So it is common to take the camera, projection, viewport matrices, convert to double and do the operation with the double clones.