Added a Matrix::value_type typedef'd trait into osg::Matrix, defaulting its
value to float, and converted the internal code across to use value_type. This allows Matrix to be converted to use double's simply by change the definition of value_type. Added Matrix::glLoadlMatrix and Matrix::glMultMatrix() to help encapsulate the changes between float and double matrix usage. Updated code that uses Matrix so it doesn't assume float or double matrices.
This commit is contained in:
@@ -13,10 +13,12 @@ bool readMatrix(osg::Matrix& matrix, osgDB::Input& fr)
|
||||
|
||||
int row=0;
|
||||
int col=0;
|
||||
double v;
|
||||
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
|
||||
{
|
||||
if (fr[0].getFloat(matrix(row,col)))
|
||||
if (fr[0].getDouble(v))
|
||||
{
|
||||
matrix(row,col)=v;
|
||||
++col;
|
||||
if (col>=4)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user