OffObservation.cpp
Go to the documentation of this file.
1 // (C) Copyright Renaud Detry 2007-2015.
2 // Distributed under the GNU General Public License and under the
3 // BSD 3-Clause License (See accompanying file LICENSE.txt).
4 
5 /** @file */
6 
8 
9 
10 namespace nuklei {
11 
12  const double OffObservation::TOL = 1e-5;
13 
14 
15  OffObservation::OffObservation()
16  {
17  NUKLEI_TRACE_BEGIN();
18  ColorDescriptor d;
19  k_.setDescriptor(d);
20  NUKLEI_TRACE_END();
21  }
22 
23  OffObservation::OffObservation(const kernel::r3& k) : k_(k)
24  {}
25 
26  void OffObservation::setLoc(Vector3 loc)
27  {
28  NUKLEI_TRACE_BEGIN();
29  k_.loc_ = loc;
30  NUKLEI_TRACE_END();
31  }
32  Vector3 OffObservation::getLoc() const { return k_.loc_; }
33 
34  void OffObservation::setWeight(weight_t weight)
35  {
36  NUKLEI_TRACE_BEGIN();
37  k_.setWeight(weight);
38  NUKLEI_TRACE_END();
39  }
40  weight_t OffObservation::getWeight() const { return k_.getWeight(); }
41 
42  const Color& OffObservation::getColor() const
43  {
44  NUKLEI_TRACE_BEGIN();
45  return dynamic_cast<const ColorDescriptor&>(k_.getDescriptor()).getColor();
46  NUKLEI_TRACE_END();
47  }
48  void OffObservation::setColor(const Color& color)
49  {
50  NUKLEI_TRACE_BEGIN();
51  dynamic_cast<ColorDescriptor&>(k_.getDescriptor()).setColor(color);
52  NUKLEI_TRACE_END();
53  }
54 
55 
56 
57 }
58 
Public namespace.
Definition: Color.cpp:9
double weight_t
Type for particle weights.
Definition: Definitions.h:31
© Copyright 2007-2013 Renaud Detry.
Distributed under the terms of the GNU General Public License (GPL).
(See accompanying file LICENSE.txt or copy at http://www.gnu.org/copyleft/gpl.html.)
Revised Sun Sep 13 2020 19:10:06.