Updates for improvements to osgdem, such as adding support for skirt

and border into osg::HeightField, handling of computation of neigherbouring
tiles in osgdem's DestinationGraph.
This commit is contained in:
Robert Osfield
2004-01-18 21:59:20 +00:00
parent c06c73993e
commit b9f032bbb5
6 changed files with 327 additions and 21 deletions

View File

@@ -358,6 +358,24 @@ bool HeightField_readLocalData(Object& obj, Input& fr)
iteratorAdvanced = true;
}
if (fr.matchSequence("SkirtHeight %f"))
{
float height;
fr[1].getFloat(height);
heightfield.setSkirtHeight(height);
fr+=2;
iteratorAdvanced = true;
}
if (fr.matchSequence("BorderWidth %i"))
{
unsigned int width;
fr[1].getUInt(width);
heightfield.setBorderWidth(width);
fr+=2;
iteratorAdvanced = true;
}
if (fr.matchSequence("Rotation %f %f %f %f"))
{
osg::Quat rotation;
@@ -426,6 +444,8 @@ bool HeightField_writeLocalData(const Object& obj, Output& fw)
fw.indent()<<"Origin "<<heightfield.getOrigin().x()<<" "<<heightfield.getOrigin().y()<<" "<<heightfield.getOrigin().z()<<std::endl;
fw.indent()<<"XInterval "<<heightfield.getXInterval()<<std::endl;
fw.indent()<<"YInterval "<<heightfield.getYInterval()<<std::endl;
fw.indent()<<"SkirtHeight "<<heightfield.getSkirtHeight()<<std::endl;
fw.indent()<<"BorderWidth "<<heightfield.getBorderWidth()<<std::endl;
fw.indent()<<"Rotation "<<heightfield.getRotation()<<std::endl;
fw.precision(prec);