| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | #include "ReaderWriterVRML2.h" |
|---|
| 19 | |
|---|
| 20 | #include <iostream> |
|---|
| 21 | #include <fstream> |
|---|
| 22 | |
|---|
| 23 | #include <boost/algorithm/string/predicate.hpp> |
|---|
| 24 | #include <boost/utility.hpp> |
|---|
| 25 | |
|---|
| 26 | #if defined(_MSC_VER) |
|---|
| 27 | # pragma warning(disable: 4250) |
|---|
| 28 | # pragma warning(disable: 4290) |
|---|
| 29 | # pragma warning(disable: 4800) |
|---|
| 30 | #endif |
|---|
| 31 | |
|---|
| 32 | #include <openvrml/browser.h> |
|---|
| 33 | #include <openvrml/node.h> |
|---|
| 34 | |
|---|
| 35 | #include <osg/TexEnv> |
|---|
| 36 | #include <osg/CullFace> |
|---|
| 37 | |
|---|
| 38 | #include <osg/Geode> |
|---|
| 39 | #include <osg/Geometry> |
|---|
| 40 | #include <osg/Material> |
|---|
| 41 | #include <osg/Image> |
|---|
| 42 | #include <osg/Texture2D> |
|---|
| 43 | #include <osg/Group> |
|---|
| 44 | #include <osg/MatrixTransform> |
|---|
| 45 | #include <osg/Light> |
|---|
| 46 | #include <osg/LightSource> |
|---|
| 47 | #include <osg/Depth> |
|---|
| 48 | |
|---|
| 49 | #include <osg/Notify> |
|---|
| 50 | #include <osgDB/Registry> |
|---|
| 51 | #include <osgDB/ReadFile> |
|---|
| 52 | #include <osgDB/FileNameUtils> |
|---|
| 53 | #include <osgDB/FileUtils> |
|---|
| 54 | |
|---|
| 55 | #include <assert.h> |
|---|
| 56 | #include <map> |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | class resource_fetcher: public openvrml::resource_fetcher |
|---|
| 62 | { |
|---|
| 63 | private: |
|---|
| 64 | virtual std::auto_ptr<openvrml::resource_istream> do_get_resource(const std::string & uri) |
|---|
| 65 | { |
|---|
| 66 | using std::auto_ptr; |
|---|
| 67 | using std::invalid_argument; |
|---|
| 68 | using std::string; |
|---|
| 69 | using openvrml::resource_istream; |
|---|
| 70 | |
|---|
| 71 | class file_resource_istream: public resource_istream |
|---|
| 72 | { |
|---|
| 73 | std::string url_; |
|---|
| 74 | std::filebuf buf_; |
|---|
| 75 | |
|---|
| 76 | public: |
|---|
| 77 | explicit file_resource_istream(const std::string & path) : |
|---|
| 78 | resource_istream(&this->buf_) |
|---|
| 79 | { |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | |
|---|
| 86 | if (!this->buf_.open(path.c_str(), ios_base::in | ios_base::binary)) |
|---|
| 87 | { |
|---|
| 88 | this->setstate(ios_base::badbit); |
|---|
| 89 | } |
|---|
| 90 | } |
|---|
| 91 | |
|---|
| 92 | void url(const std::string & str) throw (std::bad_alloc) |
|---|
| 93 | { |
|---|
| 94 | this->url_ = str; |
|---|
| 95 | } |
|---|
| 96 | |
|---|
| 97 | private: |
|---|
| 98 | virtual const std::string do_url() const throw () |
|---|
| 99 | { |
|---|
| 100 | return this->url_; |
|---|
| 101 | } |
|---|
| 102 | |
|---|
| 103 | virtual const std::string do_type() const throw () |
|---|
| 104 | { |
|---|
| 105 | |
|---|
| 106 | |
|---|
| 107 | |
|---|
| 108 | |
|---|
| 109 | |
|---|
| 110 | using std::find; |
|---|
| 111 | using std::string; |
|---|
| 112 | using boost::algorithm::iequals; |
|---|
| 113 | using boost::next; |
|---|
| 114 | string media_type = "application/octet-stream"; |
|---|
| 115 | |
|---|
| 116 | const string::const_reverse_iterator dot_pos = find(this->url_.rbegin(), this->url_.rend(), '.'); |
|---|
| 117 | if (dot_pos == this->url_.rend() || next(dot_pos.base()) == this->url_.end()) |
|---|
| 118 | { |
|---|
| 119 | return media_type; |
|---|
| 120 | } |
|---|
| 121 | |
|---|
| 122 | const string::const_iterator hash_pos = find(next(dot_pos.base()), this->url_.end(), '#'); |
|---|
| 123 | const string ext(dot_pos.base(), hash_pos); |
|---|
| 124 | |
|---|
| 125 | if (iequals(ext, "wrl") || iequals(ext, "vrml")) |
|---|
| 126 | { |
|---|
| 127 | media_type = "model/vrml"; |
|---|
| 128 | } |
|---|
| 129 | else if (iequals(ext, "png")) |
|---|
| 130 | { |
|---|
| 131 | media_type = "image/png"; |
|---|
| 132 | } |
|---|
| 133 | else if (iequals(ext, "jpg") || iequals(ext, "jpeg")) |
|---|
| 134 | { |
|---|
| 135 | media_type = "image/jpeg"; |
|---|
| 136 | } |
|---|
| 137 | return media_type; |
|---|
| 138 | } |
|---|
| 139 | |
|---|
| 140 | virtual bool do_data_available() const throw () |
|---|
| 141 | { |
|---|
| 142 | return !!(*this); |
|---|
| 143 | } |
|---|
| 144 | }; |
|---|
| 145 | |
|---|
| 146 | const string scheme = uri.substr(0, uri.find_first_of(':')); |
|---|
| 147 | if (scheme != "file") |
|---|
| 148 | { |
|---|
| 149 | throw invalid_argument('\"' + scheme + "\" URI scheme not " |
|---|
| 150 | "supported"); |
|---|
| 151 | } |
|---|
| 152 | |
|---|
| 153 | |
|---|
| 154 | |
|---|
| 155 | |
|---|
| 156 | |
|---|
| 157 | string path = uri.substr(uri.find_first_of('/', 7)); |
|---|
| 158 | |
|---|
| 159 | auto_ptr<resource_istream> in(new file_resource_istream(path)); |
|---|
| 160 | static_cast<file_resource_istream *> (in.get())->url(uri); |
|---|
| 161 | |
|---|
| 162 | return in; |
|---|
| 163 | } |
|---|
| 164 | }; |
|---|
| 165 | |
|---|
| 166 | |
|---|
| 167 | |
|---|
| 168 | |
|---|
| 169 | |
|---|
| 170 | REGISTER_OSGPLUGIN(vrml, ReaderWriterVRML2) |
|---|
| 171 | |
|---|
| 172 | osgDB::ReaderWriter::ReadResult ReaderWriterVRML2::readNode(const std::string& fname, const osgDB::Options* opt) const |
|---|
| 173 | { |
|---|
| 174 | std::string fileName = osgDB::findDataFile(fname, opt); |
|---|
| 175 | if (fileName.empty()) |
|---|
| 176 | return ReadResult::FILE_NOT_FOUND; |
|---|
| 177 | |
|---|
| 178 | |
|---|
| 179 | |
|---|
| 180 | std::string unixFileName = osgDB::convertFileNameToUnixStyle(fileName); |
|---|
| 181 | |
|---|
| 182 | #ifdef WIN32 |
|---|
| 183 | if(unixFileName[1] == ':') |
|---|
| 184 | fileName = "file:///" + unixFileName; |
|---|
| 185 | #else |
|---|
| 186 | if (unixFileName[0] == '/') |
|---|
| 187 | fileName = "file://" + unixFileName; |
|---|
| 188 | #endif |
|---|
| 189 | else |
|---|
| 190 | |
|---|
| 191 | fileName = unixFileName; |
|---|
| 192 | |
|---|
| 193 | std::fstream null; |
|---|
| 194 | resource_fetcher fetcher; |
|---|
| 195 | openvrml::browser *b = new openvrml::browser(fetcher, null, null); |
|---|
| 196 | |
|---|
| 197 | std::ifstream vrml_stream(fileName.c_str()); |
|---|
| 198 | |
|---|
| 199 | try |
|---|
| 200 | { |
|---|
| 201 | const std::vector< boost::intrusive_ptr< openvrml::node > > & mfn = b->create_vrml_from_stream(vrml_stream); |
|---|
| 202 | |
|---|
| 203 | if(mfn.empty()) |
|---|
| 204 | return ReadResult::FILE_NOT_HANDLED; |
|---|
| 205 | else |
|---|
| 206 | { |
|---|
| 207 | osg::ref_ptr<osg::MatrixTransform> osg_root = new osg::MatrixTransform(osg::Matrix( 1, 0, 0, 0, |
|---|
| 208 | 0, 0, 1, 0, |
|---|
| 209 | 0, -1, 0, 0, |
|---|
| 210 | 0, 0, 0, 1)); |
|---|
| 211 | |
|---|
| 212 | osgDB::getDataFilePathList().push_front(osgDB::getFilePath(unixFileName)); |
|---|
| 213 | for (unsigned i = 0; i < mfn.size(); i++) |
|---|
| 214 | { |
|---|
| 215 | openvrml::node *vrml_node = mfn[i].get(); |
|---|
| 216 | osg_root->addChild(convertFromVRML(vrml_node).get()); |
|---|
| 217 | } |
|---|
| 218 | osgDB::getDataFilePathList().pop_front(); |
|---|
| 219 | return osg_root.get(); |
|---|
| 220 | } |
|---|
| 221 | } |
|---|
| 222 | |
|---|
| 223 | catch (openvrml::invalid_vrml) { return ReadResult::FILE_NOT_HANDLED; } |
|---|
| 224 | catch (std::invalid_argument) { return ReadResult::FILE_NOT_HANDLED; } |
|---|
| 225 | } |
|---|
| 226 | |
|---|
| 227 | osg::ref_ptr<osg::Node> ReaderWriterVRML2::convertFromVRML(openvrml::node *obj) const |
|---|
| 228 | { |
|---|
| 229 | |
|---|
| 230 | |
|---|
| 231 | if (obj->type().id() == "Group") |
|---|
| 232 | |
|---|
| 233 | { |
|---|
| 234 | openvrml::grouping_node *vrml_group; |
|---|
| 235 | vrml_group = dynamic_cast<openvrml::grouping_node *>(obj); |
|---|
| 236 | |
|---|
| 237 | osg::ref_ptr<osg::Group> osg_group = new osg::Group; |
|---|
| 238 | |
|---|
| 239 | try |
|---|
| 240 | { |
|---|
| 241 | std::auto_ptr<openvrml::field_value> fv = obj->field("children"); |
|---|
| 242 | |
|---|
| 243 | if ( fv->type() == openvrml::field_value::mfnode_id ) |
|---|
| 244 | { |
|---|
| 245 | const openvrml::mfnode* mfn = dynamic_cast<const openvrml::mfnode *>(fv.get()); |
|---|
| 246 | openvrml::mfnode::value_type node_ptr_vector = mfn->value(); |
|---|
| 247 | openvrml::mfnode::value_type::iterator it_npv; |
|---|
| 248 | |
|---|
| 249 | for (it_npv = node_ptr_vector.begin(); it_npv != node_ptr_vector.end(); it_npv++) |
|---|
| 250 | { |
|---|
| 251 | openvrml::node *node = (*(it_npv)).get(); |
|---|
| 252 | osg_group->addChild(convertFromVRML(node)); |
|---|
| 253 | } |
|---|
| 254 | } |
|---|
| 255 | } |
|---|
| 256 | catch (openvrml::unsupported_interface&) |
|---|
| 257 | { |
|---|
| 258 | |
|---|
| 259 | } |
|---|
| 260 | |
|---|
| 261 | return osg_group.get(); |
|---|
| 262 | |
|---|
| 263 | } |
|---|
| 264 | |
|---|
| 265 | else if (obj->type().id() == "Transform") |
|---|
| 266 | |
|---|
| 267 | { |
|---|
| 268 | openvrml::transform_node *vrml_transform; |
|---|
| 269 | vrml_transform = dynamic_cast<openvrml::transform_node *>(obj); |
|---|
| 270 | |
|---|
| 271 | openvrml::mat4f vrml_m = vrml_transform->transform(); |
|---|
| 272 | osg::ref_ptr<osg::MatrixTransform> osg_m = new osg::MatrixTransform(osg::Matrix(vrml_m[0][0], vrml_m[0][1], vrml_m[0][2], vrml_m[0][3], vrml_m[1][0], vrml_m[1][1], vrml_m[1][2], vrml_m[1][3], vrml_m[2][0], vrml_m[2][1], vrml_m[2][2], vrml_m[2][3], vrml_m[3][0], vrml_m[3][1], vrml_m[3][2], vrml_m[3][3])); |
|---|
| 273 | |
|---|
| 274 | try |
|---|
| 275 | { |
|---|
| 276 | std::auto_ptr<openvrml::field_value> fv = obj->field("children"); |
|---|
| 277 | |
|---|
| 278 | if ( fv->type() == openvrml::field_value::mfnode_id ) |
|---|
| 279 | { |
|---|
| 280 | const openvrml::mfnode* mfn = dynamic_cast<const openvrml::mfnode *>(fv.get()); |
|---|
| 281 | openvrml::mfnode::value_type node_ptr_vector = mfn->value(); |
|---|
| 282 | openvrml::mfnode::value_type::iterator it_npv; |
|---|
| 283 | |
|---|
| 284 | for (it_npv = node_ptr_vector.begin(); it_npv != node_ptr_vector.end(); it_npv++) |
|---|
| 285 | { |
|---|
| 286 | openvrml::node *node = (*(it_npv)).get(); |
|---|
| 287 | osg_m->addChild(convertFromVRML(node).get()); |
|---|
| 288 | } |
|---|
| 289 | } |
|---|
| 290 | } |
|---|
| 291 | catch (openvrml::unsupported_interface&) |
|---|
| 292 | { |
|---|
| 293 | |
|---|
| 294 | } |
|---|
| 295 | |
|---|
| 296 | return osg_m.get(); |
|---|
| 297 | |
|---|
| 298 | } |
|---|
| 299 | |
|---|
| 300 | else if ((obj->type()).id() == "Shape") |
|---|
| 301 | |
|---|
| 302 | { |
|---|
| 303 | osg::ref_ptr<osg::Geometry> osg_geom; |
|---|
| 304 | |
|---|
| 305 | |
|---|
| 306 | { |
|---|
| 307 | std::auto_ptr<openvrml::field_value> fv = obj->field("geometry"); |
|---|
| 308 | |
|---|
| 309 | if (fv->type() == openvrml::field_value::sfnode_id) |
|---|
| 310 | { |
|---|
| 311 | const openvrml::sfnode * sfn = dynamic_cast<const openvrml::sfnode *>(fv.get()); |
|---|
| 312 | openvrml::sfnode::value_type node_ptr = sfn->value(); |
|---|
| 313 | |
|---|
| 314 | |
|---|
| 315 | if (node_ptr->type().id()=="IndexedFaceSet") |
|---|
| 316 | osg_geom = convertVRML97IndexedFaceSet(node_ptr.get()); |
|---|
| 317 | |
|---|
| 318 | else if (node_ptr->type().id() == "Box") |
|---|
| 319 | osg_geom = convertVRML97Box(node_ptr.get()); |
|---|
| 320 | |
|---|
| 321 | else if (node_ptr->type().id() == "Sphere") |
|---|
| 322 | osg_geom = convertVRML97Sphere(node_ptr.get()); |
|---|
| 323 | |
|---|
| 324 | else if (node_ptr->type().id() == "Cone") |
|---|
| 325 | osg_geom = convertVRML97Cone(node_ptr.get()); |
|---|
| 326 | |
|---|
| 327 | else if (node_ptr->type().id() == "Cylinder") |
|---|
| 328 | osg_geom = convertVRML97Cylinder(node_ptr.get()); |
|---|
| 329 | |
|---|
| 330 | else |
|---|
| 331 | { |
|---|
| 332 | |
|---|
| 333 | } |
|---|
| 334 | } |
|---|
| 335 | } |
|---|
| 336 | |
|---|
| 337 | osg::ref_ptr<osg::Geode> osg_geode = new osg::Geode(); |
|---|
| 338 | osg_geode->addDrawable(osg_geom.get()); |
|---|
| 339 | osg::StateSet *osg_stateset = osg_geode->getOrCreateStateSet(); |
|---|
| 340 | |
|---|
| 341 | osg::ref_ptr<osg::Material> osg_mat = new osg::Material(); |
|---|
| 342 | osg_stateset->setAttributeAndModes(osg_mat.get()); |
|---|
| 343 | osg_mat->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE); |
|---|
| 344 | |
|---|
| 345 | |
|---|
| 346 | { |
|---|
| 347 | std::auto_ptr<openvrml::field_value> fv = obj->field("appearance"); |
|---|
| 348 | |
|---|
| 349 | if (fv->type() == openvrml::field_value::sfnode_id) |
|---|
| 350 | { |
|---|
| 351 | const openvrml::sfnode *sfn = dynamic_cast<const openvrml::sfnode *>(fv.get()); |
|---|
| 352 | openvrml::appearance_node *vrml_app = dynamic_cast<openvrml::appearance_node *>(sfn->value().get()); |
|---|
| 353 | |
|---|
| 354 | const boost::intrusive_ptr<openvrml::node> vrml_material_node = vrml_app->material(); |
|---|
| 355 | const boost::intrusive_ptr<openvrml::node> vrml_texture_node = vrml_app->texture(); |
|---|
| 356 | const openvrml::material_node *vrml_material = dynamic_cast<const openvrml::material_node *>(vrml_material_node.get()); |
|---|
| 357 | |
|---|
| 358 | if (vrml_material != NULL) |
|---|
| 359 | { |
|---|
| 360 | osg_mat->setAmbient(osg::Material::FRONT_AND_BACK, |
|---|
| 361 | osg::Vec4(vrml_material->ambient_intensity(), |
|---|
| 362 | vrml_material->ambient_intensity(), |
|---|
| 363 | vrml_material->ambient_intensity(), |
|---|
| 364 | 1.0)); |
|---|
| 365 | osg_mat->setDiffuse(osg::Material::FRONT_AND_BACK, |
|---|
| 366 | osg::Vec4(vrml_material->diffuse_color().r(), |
|---|
| 367 | vrml_material->diffuse_color().g(), |
|---|
| 368 | vrml_material->diffuse_color().b(), |
|---|
| 369 | 1.0)); |
|---|
| 370 | osg_mat->setEmission(osg::Material::FRONT_AND_BACK, |
|---|
| 371 | osg::Vec4(vrml_material->emissive_color().r(), |
|---|
| 372 | vrml_material->emissive_color().g(), |
|---|
| 373 | vrml_material->emissive_color().b(), |
|---|
| 374 | 1.0)); |
|---|
| 375 | osg_mat->setSpecular(osg::Material::FRONT_AND_BACK, |
|---|
| 376 | osg::Vec4(vrml_material->specular_color().r(), |
|---|
| 377 | vrml_material->specular_color().g(), |
|---|
| 378 | vrml_material->specular_color().b(), |
|---|
| 379 | 1.0)); |
|---|
| 380 | |
|---|
| 381 | osg_mat->setShininess(osg::Material::FRONT_AND_BACK, vrml_material->shininess() ); |
|---|
| 382 | |
|---|
| 383 | if (vrml_material->transparency() > 0.0f) |
|---|
| 384 | { |
|---|
| 385 | osg_mat->setTransparency(osg::Material::FRONT_AND_BACK, vrml_material->transparency()); |
|---|
| 386 | osg_stateset->setMode(GL_BLEND, osg::StateAttribute::ON); |
|---|
| 387 | osg_stateset->setAttribute(new osg::Depth(osg::Depth::LESS, 0.0, 1.0, false)); |
|---|
| 388 | osg_stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN); |
|---|
| 389 | } |
|---|
| 390 | else |
|---|
| 391 | { |
|---|
| 392 | osg_stateset->setMode(GL_BLEND, osg::StateAttribute::OFF); |
|---|
| 393 | osg_stateset->setRenderingHint(osg::StateSet::OPAQUE_BIN); |
|---|
| 394 | } |
|---|
| 395 | |
|---|
| 396 | osg_stateset->setAttributeAndModes(osg_mat.get()); |
|---|
| 397 | |
|---|
| 398 | } |
|---|
| 399 | |
|---|
| 400 | |
|---|
| 401 | if (vrml_texture_node != 0) |
|---|
| 402 | { |
|---|
| 403 | std::auto_ptr<openvrml::field_value> texture_url_fv = vrml_texture_node->field("url"); |
|---|
| 404 | const openvrml::mfstring *mfs = dynamic_cast<const openvrml::mfstring *>(texture_url_fv.get()); |
|---|
| 405 | const std::string &url = mfs->value()[0]; |
|---|
| 406 | |
|---|
| 407 | osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile(url); |
|---|
| 408 | |
|---|
| 409 | if (image != 0) |
|---|
| 410 | { |
|---|
| 411 | osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D; |
|---|
| 412 | texture->setImage(image.get()); |
|---|
| 413 | |
|---|
| 414 | |
|---|
| 415 | texture->setWrap(osg::Texture::WRAP_S, osg::Texture::REPEAT); |
|---|
| 416 | texture->setWrap(osg::Texture::WRAP_R, osg::Texture::REPEAT); |
|---|
| 417 | texture->setWrap(osg::Texture::WRAP_T, osg::Texture::REPEAT); |
|---|
| 418 | |
|---|
| 419 | |
|---|
| 420 | try |
|---|
| 421 | { |
|---|
| 422 | std::auto_ptr<openvrml::field_value> wrap_fv = vrml_texture_node->field("repeatS"); |
|---|
| 423 | const openvrml::sfbool *sfb = dynamic_cast<const openvrml::sfbool *>(wrap_fv.get()); |
|---|
| 424 | |
|---|
| 425 | if (!sfb->value()) |
|---|
| 426 | texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP); |
|---|
| 427 | |
|---|
| 428 | } |
|---|
| 429 | catch (...) |
|---|
| 430 | { |
|---|
| 431 | |
|---|
| 432 | } |
|---|
| 433 | |
|---|
| 434 | try |
|---|
| 435 | { |
|---|
| 436 | std::auto_ptr<openvrml::field_value> wrap_fv = vrml_texture_node->field("repeatT"); |
|---|
| 437 | const openvrml::sfbool *sfb = dynamic_cast<const openvrml::sfbool *>(wrap_fv.get()); |
|---|
| 438 | |
|---|
| 439 | if (!sfb->value()) |
|---|
| 440 | texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP); |
|---|
| 441 | } |
|---|
| 442 | catch (...) |
|---|
| 443 | { |
|---|
| 444 | |
|---|
| 445 | } |
|---|
| 446 | |
|---|
| 447 | osg_stateset->setTextureAttributeAndModes(0, texture.get()); |
|---|
| 448 | |
|---|
| 449 | |
|---|
| 450 | } |
|---|
| 451 | else |
|---|
| 452 | { |
|---|
| 453 | std::cerr << "texture file " << url << " not found !" << std::endl << std::flush; |
|---|
| 454 | } |
|---|
| 455 | } |
|---|
| 456 | } |
|---|
| 457 | } |
|---|
| 458 | |
|---|
| 459 | return osg_geode.get(); |
|---|
| 460 | } |
|---|
| 461 | else |
|---|
| 462 | { |
|---|
| 463 | return 0; |
|---|
| 464 | } |
|---|
| 465 | #if 0 |
|---|
| 466 | |
|---|
| 467 | |
|---|
| 468 | |
|---|
| 469 | |
|---|
| 470 | |
|---|
| 471 | |
|---|
| 472 | |
|---|
| 473 | |
|---|
| 474 | |
|---|
| 475 | |
|---|
| 476 | |
|---|
| 477 | |
|---|
| 478 | |
|---|
| 479 | |
|---|
| 480 | |
|---|
| 481 | |
|---|
| 482 | |
|---|
| 483 | |
|---|
| 484 | |
|---|
| 485 | |
|---|
| 486 | |
|---|
| 487 | |
|---|
| 488 | |
|---|
| 489 | |
|---|
| 490 | |
|---|
| 491 | |
|---|
| 492 | |
|---|
| 493 | |
|---|
| 494 | |
|---|
| 495 | |
|---|
| 496 | |
|---|
| 497 | |
|---|
| 498 | |
|---|
| 499 | |
|---|
| 500 | |
|---|
| 501 | |
|---|
| 502 | |
|---|
| 503 | |
|---|
| 504 | |
|---|
| 505 | |
|---|
| 506 | |
|---|
| 507 | |
|---|
| 508 | |
|---|
| 509 | |
|---|
| 510 | |
|---|
| 511 | |
|---|
| 512 | |
|---|
| 513 | |
|---|
| 514 | |
|---|
| 515 | |
|---|
| 516 | |
|---|
| 517 | |
|---|
| 518 | |
|---|
| 519 | |
|---|
| 520 | |
|---|
| 521 | |
|---|
| 522 | |
|---|
| 523 | |
|---|
| 524 | |
|---|
| 525 | |
|---|
| 526 | |
|---|
| 527 | |
|---|
| 528 | |
|---|
| 529 | |
|---|
| 530 | |
|---|
| 531 | |
|---|
| 532 | |
|---|
| 533 | |
|---|
| 534 | |
|---|
| 535 | |
|---|
| 536 | |
|---|
| 537 | |
|---|
| 538 | |
|---|
| 539 | |
|---|
| 540 | |
|---|
| 541 | |
|---|
| 542 | |
|---|
| 543 | |
|---|
| 544 | |
|---|
| 545 | |
|---|
| 546 | |
|---|
| 547 | |
|---|
| 548 | |
|---|
| 549 | |
|---|
| 550 | |
|---|
| 551 | |
|---|
| 552 | |
|---|
| 553 | |
|---|
| 554 | |
|---|
| 555 | |
|---|
| 556 | |
|---|
| 557 | |
|---|
| 558 | |
|---|
| 559 | |
|---|
| 560 | |
|---|
| 561 | |
|---|
| 562 | |
|---|
| 563 | |
|---|
| 564 | |
|---|
| 565 | |
|---|
| 566 | |
|---|
| 567 | |
|---|
| 568 | |
|---|
| 569 | |
|---|
| 570 | |
|---|
| 571 | |
|---|
| 572 | |
|---|
| 573 | |
|---|
| 574 | |
|---|
| 575 | |
|---|
| 576 | |
|---|
| 577 | |
|---|
| 578 | |
|---|
| 579 | |
|---|
| 580 | |
|---|
| 581 | |
|---|
| 582 | |
|---|
| 583 | |
|---|
| 584 | |
|---|
| 585 | |
|---|
| 586 | |
|---|
| 587 | |
|---|
| 588 | |
|---|
| 589 | #endif |
|---|
| 590 | |
|---|
| 591 | return 0; |
|---|
| 592 | } |
|---|