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:
@@ -46,10 +46,10 @@ bool ClipPlane_readLocalData(Object& obj, Input& fr)
|
||||
if (fr.matchSequence("plane %f %f %f %f"))
|
||||
{
|
||||
double plane[4];
|
||||
fr[1].getDouble(plane[0]);
|
||||
fr[2].getDouble(plane[1]);
|
||||
fr[3].getDouble(plane[2]);
|
||||
fr[4].getDouble(plane[3]);
|
||||
fr[1].getFloat(plane[0]);
|
||||
fr[2].getFloat(plane[1]);
|
||||
fr[3].getFloat(plane[2]);
|
||||
fr[4].getFloat(plane[3]);
|
||||
clipplane.setClipPlane(plane);
|
||||
|
||||
fr+=5;
|
||||
|
||||
Reference in New Issue
Block a user