| 166 case VboSubclass::BfcBackColors: |
166 case VboSubclass::BfcBackColors: |
| 167 // Use the constant red color for BFC back colors |
167 // Use the constant red color for BFC back colors |
| 168 return {208, 64, 64}; |
168 return {208, 64, 64}; |
| 169 |
169 |
| 170 case VboSubclass::PickColors: |
170 case VboSubclass::PickColors: |
| 171 // For the picking scene, determine the color from the owner's ID. |
171 // For the picking scene, use unique picking colors provided by the model. |
| 172 return indexColorForID(polygonOwner->id()); |
172 return m_renderer->model()->pickingColorForObject(polygonOwnerIndex); |
| 173 |
173 |
| 174 case VboSubclass::RandomColors: |
174 case VboSubclass::RandomColors: |
| 175 // For the random color scene, the owner object has rolled up a random color. Use that. |
175 // For the random color scene, the owner object has rolled up a random color. Use that. |
| 176 color = polygonOwner->randomColor(); |
176 color = polygonOwner->randomColor(); |
| 177 break; |
177 break; |
| 364 case LDObjectType::Quadrilateral: |
364 case LDObjectType::Quadrilateral: |
| 365 case LDObjectType::EdgeLine: |
365 case LDObjectType::EdgeLine: |
| 366 case LDObjectType::ConditionalEdge: |
366 case LDObjectType::ConditionalEdge: |
| 367 { |
367 { |
| 368 LDPolygon* poly = object->getPolygon(); |
368 LDPolygon* poly = object->getPolygon(); |
| 369 poly->id = object->id(); |
|
| 370 compilePolygon (*poly, index, info); |
369 compilePolygon (*poly, index, info); |
| 371 delete poly; |
370 delete poly; |
| 372 break; |
371 break; |
| 373 } |
372 } |
| 374 |
373 |
| 377 { |
376 { |
| 378 LDSubfileReference* subfileReference = static_cast<LDSubfileReference*>(object); |
377 LDSubfileReference* subfileReference = static_cast<LDSubfileReference*>(object); |
| 379 auto data = subfileReference->inlinePolygons(m_documents); |
378 auto data = subfileReference->inlinePolygons(m_documents); |
| 380 |
379 |
| 381 for (LDPolygon& poly : data) |
380 for (LDPolygon& poly : data) |
| 382 { |
|
| 383 poly.id = object->id(); |
|
| 384 compilePolygon (poly, index, info); |
381 compilePolygon (poly, index, info); |
| 385 } |
|
| 386 break; |
382 break; |
| 387 } |
383 } |
| 388 |
384 |
| 389 case LDObjectType::BezierCurve: |
385 case LDObjectType::BezierCurve: |
| 390 { |
386 { |
| 391 LDBezierCurve* curve = static_cast<LDBezierCurve*>(object); |
387 LDBezierCurve* curve = static_cast<LDBezierCurve*>(object); |
| 392 for (LDPolygon& polygon : curve->rasterizePolygons(grid()->bezierCurveSegments())) |
388 for (LDPolygon& polygon : curve->rasterizePolygons(grid()->bezierCurveSegments())) |
| 393 { |
|
| 394 polygon.id = object->id(); |
|
| 395 compilePolygon (polygon, index, info); |
389 compilePolygon (polygon, index, info); |
| 396 } |
|
| 397 } |
390 } |
| 398 break; |
391 break; |
| 399 |
392 |
| 400 default: |
393 default: |
| 401 break; |
394 break; |