+bool ShaderGeometry_readLocalData(Object& obj, Input& fr)
+{
+ bool iteratorAdvanced = false;
+
+ ShaderGeometry& geom = static_cast<ShaderGeometry&>(obj);
+
+ if ((fr[0].matchWord("geometry"))) {
+ ++fr;
+ iteratorAdvanced = true;
+ osg::Geometry* drawable = dynamic_cast<osg::Geometry*>(fr.readDrawable());
+ if (drawable) {
+ geom._geometry = drawable;
+ }
+ }
+ int capacity = 0;
+ if (fr.matchSequence("posScale %i {")) {
+ int entry = fr[1].getNoNestedBrackets();
+ int capacity;
+ fr[1].getInt(capacity);
+ Vec4Array* posScale = new Vec4Array;
+ posScale->reserve(capacity);
+ fr += 3;
+ while (!fr.eof() && fr[0].getNoNestedBrackets() > entry) {
+ Vec4 v;
+ if (fr[0].getFloat(v.x()) && fr[1].getFloat(v.y())
+ && fr[2].getFloat(v.z()) && fr[3].getFloat(v.w())) {
+ fr += 4;
+ posScale->push_back(v);
+ }
+ else ++fr;
+ }
+ ++fr;
+ geom._posScaleArray = posScale;
+ }
+ if (fr.matchSequence("variety %i {")) {
+ int entry = fr[1].getNoNestedBrackets();
+ int capacity;
+ fr[1].getInt(capacity);
+ FloatArray* variety = new FloatArray;
+ variety->reserve(capacity);
+ fr += 3;
+ while (!fr.eof() && fr[0].getNoNestedBrackets() > entry) {
+ float val;
+ if (fr[0].getFloat(val)) {
+ ++fr;
+ variety->push_back(val);
+ }
+ else ++fr;
+ }
+ ++fr;
+ geom._vertexAttribArray = variety;
+ }
+
+ return iteratorAdvanced;