- for (int pipe=0 ; pipe<2 ; pipe++)
- {
- rubrique = pipe ? xml.findChild ("ListPipes")
- : xml.findChild ("ListCylinders");
-
- nbrelts = rubrique == NULL ? 0 : rubrique->getNbrChildren ();
-
- for (int nro=0 ; nro < nbrelts ; nro++)
- {
- XmlTree* node = rubrique->getChild (nro);
- const string& cbase = node->findValue ("c_base" );
- const string& cdir = node->findValue ("c_dir" );
- const string& cradius = node->findValue ("c_radius");
- const string& cheight = node->findValue ("c_height");
-
- Vertex* base = t_vertex [cbase];
- Vector* dir = t_vector [cdir];
- double radius = atof (cradius.c_str());
- double height = atof (cheight.c_str());
-
- if (pipe)
- {
- const string& cradius1 = node->findValue ("c_int_radius");
- double radius1 = atof (cradius1.c_str());
- addPipe (base, dir, radius1, radius, height);
- }
- else
- {
- addCylinder (base, dir, radius, height);
- }
- }
- }
-