| 813 | |
| 814 | |
| 815 | static void writeOBJGround(std::ostream& out) { |
| 816 | const float ws = BZDBCache::worldSize / 2.0f; |
| 817 | const float ts = BZDBCache::worldSize / 100.0f; |
| 818 | out << "o bzground" << std::endl; |
| 819 | out << "v " << -ws << " " << -ws << " 0" << std::endl; |
| 820 | out << "v " << +ws << " " << -ws << " 0" << std::endl; |
| 821 | out << "v " << +ws << " " << +ws << " 0" << std::endl; |
| 822 | out << "v " << -ws << " " << +ws << " 0" << std::endl; |
| 823 | out << "vt " << -ts << " " << -ts << std::endl; |
| 824 | out << "vt " << +ts << " " << -ts << std::endl; |
| 825 | out << "vt " << +ts << " " << +ts << std::endl; |
| 826 | out << "vt " << -ts << " " << +ts << std::endl; |
| 827 | out << "vn 0 0 1" << std::endl; |
| 828 | out << "usemtl ground" << std::endl; |
| 829 | out << "f -4/-4/-1 -3/-3/-1 -2/-2/-1 -1/-1/-1" << std::endl; |
| 830 | out << std::endl; |
| 831 | return; |
| 832 | } |
| 833 | |
| 834 | |
| 835 | static void writeBZDBvar(const std::string& name, void* userData) { |