396{
397 double hlw =
colhandle->highLightWeight();
398
399
401 std::map<SoMaterial*,double> materials;
402
405
407 for (
unsigned i = 0;
i <
ts->tracks.size(); ++
i) {
409 if (mat)
411 else
412 std::cout<< "PRDHandleBase ERROR: Did not find track material!"<<std::endl;
413 }
414 }
415
417 for (
unsigned i = 0;
i <
ts->segments.size(); ++
i) {
419 if (mat)
421 else
422 std::cout<< "PRDHandleBase ERROR: Did not find segment material (2)!"<<std::endl;
423 }
424 }
425 if (hlw>0.0&&
colhandle->highLightOutliers()) {
426
427 if (
colhandle->colourByTracks()&&!
ts->tracks_outliers.empty()) {
428 if (hlw>999.0) {
429 materials[
colhandle->highLightMaterial()] =
ts->tracks_outliers.size();
430 } else {
431 for (
unsigned i = 0;
i <
ts->tracks_outliers.size(); ++
i) {
433 if (mat)
434 materials[
mat]=1.0/(hlw+1.0);
435 else
436 std::cout<< "PRDHandleBase ERROR: Did not find track material (3)!"<<std::endl;
437 }
438 materials[
colhandle->highLightMaterial()] =
ts->tracks_outliers.size()*hlw/(hlw+1.0);
439 }
440 }
441 } else {
442
444 for (
unsigned i = 0;
i <
ts->tracks_outliers.size(); ++
i) {
446 if (mat)
448 else
449 std::cout<< "PRDHandleBase ERROR: Did not find track material (4)!"<<std::endl;
450 }
451 }
453 unsigned ntrackssegments= (
colhandle->colourByTracks()?
ts->tracks.size()+
ts->tracks_outliers.size():0)
454 +(
colhandle->colourBySegments()?
ts->segments.size():0);
455 if (ntrackssegments)
456 materials[
colhandle->highLightMaterial()] = hlw*ntrackssegments;
457 }
458 }
459 if (!materials.empty())
461 }
462 }
463
464
465
467 if (hlw>999.0)
470 } else {
472 }
473}
virtual const Trk::PrepRawData * getPRD() const =0
PRDSysCommonData * common() const
virtual bool highLight() const
PRDTrackSegmentHelper * trackAndSegmentHelper() const
VP1SoMaterialMixer * materialMixer() const
SoMaterial * trackMaterial(const Trk::Track *) const
const TracksAndSegments * tracksAndSegments(const Trk::PrepRawData *)
SoMaterial * segmentMaterial(const Trk::Segment *) const
SoMaterial * getMixedMaterial(const std::set< SoMaterial * > &)