BuiltinVTKObservation.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 namespace nuklei {
10 
11  const double BuiltinVTKObservation::TOL = 1e-5;
12 
13 
14  BuiltinVTKObservation::BuiltinVTKObservation()
15  {
16  NUKLEI_TRACE_BEGIN();
17  ColorDescriptor d;
18  RGBColor c(.5,.5,.5);
19  d.setColor(c);
20  k_.setDescriptor(d);
21  NUKLEI_TRACE_END();
22  }
23 
24  BuiltinVTKObservation::BuiltinVTKObservation(const kernel::r3& k) : k_(k)
25  {}
26 
27  void BuiltinVTKObservation::setLoc(Vector3 loc)
28  {
29  NUKLEI_TRACE_BEGIN();
30  k_.loc_ = loc;
31  NUKLEI_TRACE_END();
32  }
33  Vector3 BuiltinVTKObservation::getLoc() const { return k_.loc_; }
34 
35  void BuiltinVTKObservation::setWeight(weight_t weight)
36  {
37  NUKLEI_TRACE_BEGIN();
38  k_.setWeight(weight);
39  NUKLEI_TRACE_END();
40  }
41  weight_t BuiltinVTKObservation::getWeight() const { return k_.getWeight(); }
42 
43  const Color& BuiltinVTKObservation::getColor() const
44  {
45  NUKLEI_TRACE_BEGIN();
46  return dynamic_cast<const ColorDescriptor&>(k_.getDescriptor()).getColor();
47  NUKLEI_TRACE_END();
48  }
49  void BuiltinVTKObservation::setColor(const Color& color)
50  {
51  NUKLEI_TRACE_BEGIN();
52  dynamic_cast<ColorDescriptor&>(k_.getDescriptor()).setColor(color);
53  NUKLEI_TRACE_END();
54  }
55 
56 
57 
58 
59 
60 
61 }
62 
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.