src/primitives.cpp

changeset 967
eb586d3e1a6a
parent 966
a834e43a57da
child 968
4b93b7963456
equal deleted inserted replaced
966:a834e43a57da 967:eb586d3e1a6a
314 if (cat and cat->isValidToInclude()) 314 if (cat and cat->isValidToInclude())
315 g_PrimitiveCategories << cat; 315 g_PrimitiveCategories << cat;
316 316
317 cat = new PrimitiveCategory (line); 317 cat = new PrimitiveCategory (line);
318 } 318 }
319 elif (cat != null) 319 else if (cat != null)
320 { 320 {
321 QString cmd = line.left (colon); 321 QString cmd = line.left (colon);
322 RegexType type = EFilenameRegex; 322 RegexType type = EFilenameRegex;
323 323
324 if (cmd == "f") 324 if (cmd == "f")
325 type = EFilenameRegex; 325 type = EFilenameRegex;
326 elif (cmd == "t") 326 else if (cmd == "t")
327 type = ETitleRegex; 327 type = ETitleRegex;
328 else 328 else
329 { 329 {
330 print (tr ("Warning: unknown command \"%1\" on line \"%2\""), cmd, line); 330 print (tr ("Warning: unknown command \"%1\" on line \"%2\""), cmd, line);
331 continue; 331 continue;
522 522
523 if (type == Cylinder) 523 if (type == Cylinder)
524 { 524 {
525 v1 = Vertex (v0[X], 1.0f, v0[Z]); 525 v1 = Vertex (v0[X], 1.0f, v0[Z]);
526 } 526 }
527 elif (type == Cone) 527 else if (type == Cone)
528 { 528 {
529 v1 = Vertex (v0[X] * (num + 1), 0.0f, v0[Z] * (num + 1)); 529 v1 = Vertex (v0[X] * (num + 1), 0.0f, v0[Z] * (num + 1));
530 v0.setX (v0.x() * num); 530 v0.setX (v0.x() * num);
531 v0.setY (1.0); 531 v0.setY (1.0);
532 v0.setZ (v0.z() * num); 532 v0.setZ (v0.z() * num);

mercurial