DD4hep  01.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Vector2D.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : F.Gaede
11 //
12 //==========================================================================
13 #ifndef DDREC_VECTOR2D_H
14 #define DDREC_VECTOR2D_H 1
15 
16 namespace dd4hep {
17  namespace rec {
18 
23  class Vector2D
24  {
25  public:
26  Vector2D() : _u(0.), _v(0.) {}
27  Vector2D(double u_val, double v_val) : _u(u_val), _v(v_val) {}
28 
29  double operator[](unsigned i) const
30  {
31  return i == 0 ? _u : _v ;
32  }
33 
34  double u() const { return _u ; }
35 
36  double v() const { return _v ; }
37 
38  double& u() { return _u; }
39  double& v() { return _v; }
40 
41  private:
42  double _u, _v ;
43 
44  };
45  } } // namespace
46 
47 
48 
49 
50 #endif
double u() const
Definition: Vector2D.h:34
double v() const
Definition: Vector2D.h:36
double operator[](unsigned i) const
Definition: Vector2D.h:29
Simple 2D vector helper class; moved out of ISurface definition.
Definition: Vector2D.h:23
Vector2D(double u_val, double v_val)
Definition: Vector2D.h:27