// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * This code implementation is the intellectual property of the * // * GEANT4 collaboration. * // * By copying, distributing or modifying the Program (or any work * // * based on the Program) you indicate your acceptance of this * // * statement, and all its terms. * // ******************************************************************** // // // $Id: G4ControlPoints.icc,v 1.2 2001/07/11 09:59:33 gunter Exp $ // GEANT4 tag $Name: geant4-05-02 $ // // -------------------------------------------------------------------- // GEANT 4 inline definitions file // // G4ControlPoints.icc // // Implementation of inline methods of G4ControlPoints // -------------------------------------------------------------------- inline G4int G4ControlPoints::GetRows() const { return nr; } inline G4int G4ControlPoints::GetCols() const { return nc; } inline void G4ControlPoints::put(G4int i, G4int j, const G4Point3D &tmp) { *data[i*nc+j]=tmp; // tmp is converted to a PointRat // by the member affectation function // of the G4PointRat class } inline void G4ControlPoints::put(G4int i, G4int j, const G4PointRat& tmp) { *data[i*nc+j]=tmp; } inline G4Point3D G4ControlPoints::Get3D(G4int i, G4int j) const { return (data[i*nc+j])->pt(); } inline G4PointRat& G4ControlPoints::GetRat(G4int i, G4int j) const { return *data[i*nc+j]; } inline G4double G4ControlPoints::Calc(G4double k1, G4double par, G4double old_val, G4double k2, G4double new_val) { return (((k1 - par) * old_val +(par - k2) * new_val) / (k1-k2)); }