|
||||
File indexing completed on 2025-01-18 09:55:25
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : F.Gaede 0011 // 0012 //========================================================================== 0013 #ifndef DDREC_VECTOR2D_H 0014 #define DDREC_VECTOR2D_H 1 0015 0016 namespace dd4hep { 0017 namespace rec { 0018 0019 /** Simple 2D vector helper class; moved out of ISurface definition. 0020 * 0021 */ 0022 0023 class Vector2D 0024 { 0025 public: 0026 Vector2D() : _u(0.), _v(0.) {} 0027 Vector2D(double u_val, double v_val) : _u(u_val), _v(v_val) {} 0028 0029 double operator[](unsigned i) const 0030 { 0031 return i == 0 ? _u : _v ; 0032 } 0033 0034 double u() const { return _u ; } 0035 0036 double v() const { return _v ; } 0037 0038 double& u() { return _u; } 0039 double& v() { return _v; } 0040 0041 private: 0042 double _u, _v ; 0043 0044 }; 0045 } } // namespace 0046 0047 0048 0049 0050 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |