Files
geant4/source/geometry/solids/BREPS/include/G4ControlPoints.icc
T
2016-06-09 17:01:34 +02:00

81 lines
2.7 KiB
Plaintext

//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id$
//
// --------------------------------------------------------------------
// 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));
}