Made osg::Quat support either float or double internal representation, defaulting to double.

Generalised the osgDB::Field so that its getFloat() method can be used with either doubles or
floats governed by the type passed in - this helps support either float/double
Quat and Matrix classes seemlessly.
This commit is contained in:
Robert Osfield
2003-09-29 13:35:02 +00:00
parent 7d69f8e193
commit e693f148cb
10 changed files with 173 additions and 165 deletions

View File

@@ -31,7 +31,7 @@ bool BlinkSequence_readLocalData(osg::Object &obj, osgDB::Input &fr)
if (fr.matchSequence("phaseShift %f"))
{
double ps;
fr[1].getDouble(ps);
fr[1].getFloat(ps);
fr += 2;
seq.setPhaseShift(ps);
iteratorAdvanced = true;
@@ -40,7 +40,7 @@ bool BlinkSequence_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
double length;
float r, g, b, a;
fr[1].getDouble(length);
fr[1].getFloat(length);
fr[2].getFloat(r);
fr[3].getFloat(g);
fr[4].getFloat(b);
@@ -103,7 +103,7 @@ bool BlinkSequence_SequenceGroup_readLocalData(osg::Object &obj, osgDB::Input &f
if (fr.matchSequence("baseTime %f"))
{
fr[1].getDouble(sg._baseTime);
fr[1].getFloat(sg._baseTime);
fr += 2;
iteratorAdvanced = true;
}