Ignore:
Timestamp:
Apr 12, 2010, 5:20:43 PM (14 years ago)
Author:
garnier
Message:

bugged version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/modeling/src/G4TrajectoryDrawerUtils.cc

    r1171 r1242  
    3333#include "G4Polyline.hh"
    3434#include "G4Polymarker.hh"
     35#include "G4Text.hh"
    3536#include "G4VTrajectory.hh"
    3637#include "G4VTrajectoryPoint.hh"
     
    5657        for (size_t iAux=0; iAux<auxiliaries->size(); ++iAux) {
    5758          const G4ThreeVector pos((*auxiliaries)[iAux]);
    58           trajectoryLine.push_back(pos);
    59           auxiliaryPoints.push_back(pos);
    60         }
     59#ifdef G4VIS_BUILD_OPTIMISE_1
     60          if (trajectoryLine.size() >0) {
     61            if (pos != trajectoryLine[trajectoryLine.size()-1]) {
     62              trajectoryLine.push_back(pos);
     63              auxiliaryPoints.push_back(pos);
     64            }
     65         } else {
     66#endif
     67            trajectoryLine.push_back(pos);
     68            auxiliaryPoints.push_back(pos);
     69#ifdef G4VIS_BUILD_OPTIMISE_1
     70          }
     71#endif
     72        }
    6173      }
    6274      const G4ThreeVector pos(aTrajectoryPoint->GetPosition());
    63       trajectoryLine.push_back(pos);
    64       stepPoints.push_back(pos);
    65     }   
     75#ifdef G4VIS_BUILD_OPTIMISE_1
     76      if (trajectoryLine.size() >0) {
     77        if (pos != trajectoryLine[trajectoryLine.size()-1]) {
     78          trajectoryLine.push_back(pos);
     79          stepPoints.push_back(pos);
     80        }
     81      } else {
     82#endif
     83        trajectoryLine.push_back(pos);
     84        stepPoints.push_back(pos);
     85#ifdef G4VIS_BUILD_OPTIMISE_1
     86      }
     87#endif
     88    }
    6689  }
    6790
     
    274297
    275298      pVVisManager->Draw(stepPoints);
     299#ifdef G4VIS_BUILD_OPTIMISE_2
     300      G4Text text = G4Text("");
     301      pVVisManager->Draw(text);
     302#endif
    276303    }
    277304  }
Note: See TracChangeset for help on using the changeset viewer.