CrdObservation.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 CrdObservation::TOL = 1e-5;
13 
14 
15  CrdObservation::CrdObservation()
16  {
17  NUKLEI_TRACE_BEGIN();
18  ColorDescriptor d;
19  k_.setDescriptor(d);
20  NUKLEI_TRACE_END();
21  }
22 
23  CrdObservation::CrdObservation(const kernel::r3& k) : k_(k)
24  {}
25 
26  void CrdObservation::setLoc(Vector3 loc)
27  {
28  NUKLEI_TRACE_BEGIN();
29  k_.loc_ = loc;
30  NUKLEI_TRACE_END();
31  }
32  Vector3 CrdObservation::getLoc() const { return k_.loc_; }
33 
34  void CrdObservation::setWeight(weight_t weight)
35  {
36  NUKLEI_TRACE_BEGIN();
37  k_.setWeight(weight);
38  NUKLEI_TRACE_END();
39  }
40  weight_t CrdObservation::getWeight() const { return k_.getWeight(); }
41 
42  const Color& CrdObservation::getColor() const
43  {
44  NUKLEI_TRACE_BEGIN();
45  return dynamic_cast<const ColorDescriptor&>(k_.getDescriptor()).getColor();
46  NUKLEI_TRACE_END();
47  }
48  void CrdObservation::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 
Public namespace.
Definition: Color.cpp:9
double weight_t
Type for particle weights.
Definition: Definitions.h:31
weight_t getWeight() const
Returns this kernel's weight.
Definition: Kernel.h:215
void setWeight(const weight_t w)
Sets this kernel's weight.
Definition: Kernel.h:217
© 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.