Ignore:
Timestamp:
Feb 5, 2008, 3:17:36 PM (17 years ago)
Author:
garnier
Message:

correction du ticket #119

Location:
trunk/geant4/visualization/management
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/management/include/G4ViewParameters.hh

    r593 r712  
    210210  void SetLightsMoveWithCamera (G4bool moves);
    211211  void SetPan                  (G4double right, G4double up);
     212  /** Increment currentTarget point by following X,Y values
     213   */
    212214  void IncrementPan            (G4double right, G4double up);
     215  /** Increment currentTarget point by following X,Y,Z values
     216   */
     217  void IncrementPan            (G4double right, G4double up, G4double distance);
    213218  void SetDefaultVisAttributes (const G4VisAttributes&);
    214219  void SetDefaultTextVisAttributes (const G4VisAttributes&);
  • trunk/geant4/visualization/management/src/G4ViewParameters.cc

    r593 r712  
    233233
    234234void G4ViewParameters::IncrementPan (G4double right, G4double up) {
     235  IncrementPan (right,up, 0);
     236}
     237
     238void G4ViewParameters::IncrementPan (G4double right, G4double up, G4double distance) {
    235239  G4Vector3D unitRight = (fUpVector.cross (fViewpointDirection)).unit();
    236240  G4Vector3D unitUp    = (fViewpointDirection.cross (unitRight)).unit();
    237   fCurrentTargetPoint += right * unitRight + up * unitUp;
     241  fCurrentTargetPoint += right * unitRight + up * unitUp + distance * fViewpointDirection;
    238242}
    239243
Note: See TracChangeset for help on using the changeset viewer.