+ if ((it = rootObj.find("u_scale")) != rootObj.end())
+ {
+ (*it).second->get(width);
+ }
+
+ if ((it = rootObj.find("blend")) != rootObj.end())
+ {
+ (*it).second->get(blending);
+ }
+
+ if ((it = rootObj.find("fog")) != rootObj.end())
+ {
+ (*it).second->get(fog);
+ }
+
+
+ Vector4 vertices[2][width+1];
+
+ Matrix4 transposedTransform = transform;
+ transposedTransform.transpose();
+
+ Scalar xf;
+ Scalar increment = 1.0 / Scalar(width);
+
+ for (int h = 0; h <= 1; ++h)
+ {
+ xf = 0.0;
+ for (int w = 0; w <= width; ++w, xf += increment)
+ {
+ vertices[h][w] = Vector4(xf, Scalar(h), 0.0, 1.0) *
+ transposedTransform;
+ }
+ }
+
+ for (int w = 0; w < width; ++w)
+ {
+ Vector3 quadVertices[4];
+
+ demoteVector(quadVertices[0], vertices[0][w]);
+ demoteVector(quadVertices[1], vertices[0][w+1]);
+ demoteVector(quadVertices[2], vertices[1][w+1]);
+ demoteVector(quadVertices[3], vertices[1][w]);
+
+ Quad* quad = new Quad(quadVertices, texture, index);
+ quad->setBlending(blending);
+ quad->setFog(fog);
+
+ boost::shared_ptr<Quad> quadPtr(quad);
+
+ //objects.push_back(quad_Ptr);
+ octree->insert(quadPtr);
+ }
+ }
+
+
+ void loadFromFile()