Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Object::exportWaypoint (long indent, ::ofstream &output, long objectIndex, World* world){
- //Output a simple header..."
- output << "\n" << indentation (indent) << "Waypoint: " << objectIndex << ";";
- //Output the transformation...
- output << "\n" << indentation (indent + 1) << "Transformation: //m11 m12 m13 m14 m21 m22 ... m44";
- {
- Transformation &t = transformation.normal ();
- output << "\n" << indentation (indent + 2)
- << t.m11 << ", " << t.m12 << ", " << t.m13 << ", " << t.m14 << ", "
- << t.m21 << ", " << t.m22 << ", " << t.m23 << ", " << t.m24 << ", "
- << t.m31 << ", " << t.m32 << ", " << t.m33 << ", " << t.m34 << ", "
- << t.m41 << ", " << t.m42 << ", " << t.m43 << ", " << t.m44 << "; //Standard...";
- }
- {
- Transformation &t = transformation.inverse;
- output << "\n" << indentation (indent + 2)
- << t.m11 << ", " << t.m12 << ", " << t.m13 << ", " << t.m14 << ", "
- << t.m21 << ", " << t.m22 << ", " << t.m23 << ", " << t.m24 << ", "
- << t.m31 << ", " << t.m32 << ", " << t.m33 << ", " << t.m34 << ", "
- << t.m41 << ", " << t.m42 << ", " << t.m43 << ", " << t.m44 << "; //Inverse...";
- }
- //Output the properties...
- output << "\n" << indentation (indent + 1) << "Properties: " << properties.size () << ";";
- loopDictionary (name, value, properties, char)
- if((stricmp (name,"type") != 0) || (stricmp (name,"texture") != 0)){
- output << "\n" << indentation (indent + 2) << "\"" << name << "\" => \"" << value << "\"";
- }
- endloop
- }
- void Object::export (long indent, ::ofstream &output, long objectIndex, World* world) {
- bool dontPrint = false;
- //Output a simple header..."
- output << "\n" << indentation (indent) << "Object: " << objectIndex << ";";
- loopDictionary (name, value, properties, char)
- if(strcmp (name,"type") == 0)
- output << "\n" << indentation (indent + 1) << "\"" << name << "\" => \"" << value << "\"";
- if(strcmp (name,"static geometry") == 0)
- dontPrint = true;
- endloop
- //Output the transformation...
- output << "\n" << indentation (indent + 1) << "Transformation: //m11 m12 m13 m14 m21 m22 ... m44";
- {
- Transformation &t = transformation.normal ();
- output << "\n" << indentation (indent + 2)
- << t.m11 << ", " << t.m12 << ", " << t.m13 << ", " << t.m14 << ", "
- << t.m21 << ", " << t.m22 << ", " << t.m23 << ", " << t.m24 << ", "
- << t.m31 << ", " << t.m32 << ", " << t.m33 << ", " << t.m34 << ", "
- << t.m41 << ", " << t.m42 << ", " << t.m43 << ", " << t.m44 << "; //Standard...";
- }
- {
- Transformation &t = transformation.inverse;
- output << "\n" << indentation (indent + 2)
- << t.m11 << ", " << t.m12 << ", " << t.m13 << ", " << t.m14 << ", "
- << t.m21 << ", " << t.m22 << ", " << t.m23 << ", " << t.m24 << ", "
- << t.m31 << ", " << t.m32 << ", " << t.m33 << ", " << t.m34 << ", "
- << t.m41 << ", " << t.m42 << ", " << t.m43 << ", " << t.m44 << "; //Inverse...";
- }
- //Output the properties...
- if(!dontPrint){
- output << "\n" << indentation (indent + 1) << "Properties: " << properties.size () << ";";
- loopDictionary (name, value, properties, char)
- if((stricmp (name,"type") != 0) || (stricmp (name,"texture") != 0))
- {
- if((stricmp (name,"texture") == 0))
- output << "\n" << indentation (indent + 2) << "\"" << name << "\" == \"" << value << "\"";
- else
- output << "\n" << indentation (indent + 2) << "\"" << name << "\" => \"" << value << "\"";
- }
- endloop
- }
- //Output the faces...
- output << "\n" << indentation (indent + 1) << "Faces: " << faces.size () << ";";
- loopVector (faceIndex, faces)
- faces [faceIndex]->export (indent + 1, output, faceIndex, world);
- endloop
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement