CrdObservation.h
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 
7 #ifndef NUKLEI_CRDOBSERVATION_H
8 #define NUKLEI_CRDOBSERVATION_H
9 
10 
11 #include <vector>
12 #include <string>
13 #include <utility>
14 #include <stdexcept>
15 #include <iostream>
16 #include <boost/shared_ptr.hpp>
17 
18 #include <nuklei/Definitions.h>
19 #include <nuklei/Color.h>
20 #include <nuklei/LinearAlgebra.h>
21 #include <nuklei/Observation.h>
22 
23 namespace nuklei {
24 
25  class CrdObservation : public Observation
26  {
27  public:
28  static const double TOL;
29 
30  Type type() const { return CRD; }
31 
32  NUKLEI_UNIQUE_PTR<kernel::base> getKernel() const
33  {
34  return k_.clone();
35  }
36 
37  void setKernel(const kernel::base& k)
38  {
39  NUKLEI_TRACE_BEGIN();
40  k_ = dynamic_cast<const kernel::r3&>(k);
41  NUKLEI_TRACE_END();
42  }
43 
45  CrdObservation(const kernel::r3& k);
46  ~CrdObservation() {};
47 
48  void setLoc(Vector3 loc);
49  Vector3 getLoc() const;
50 
51  void setWeight(weight_t weight);
52  weight_t getWeight() const;
53 
54  void setColor(const Color& color);
55  const Color& getColor() const;
56 
57  private:
58  kernel::r3 k_;
59  };
60 
61 }
62 
63 #endif
Definition: Observation.h:17
Public namespace.
Definition: Color.cpp:9
double weight_t
Type for particle weights.
Definition: Definitions.h:31
Polymorphic kernel class.
Definition: Kernel.h:45
Definition: Kernel.h:626
Definition: Color.h:18
base::ptr clone() const
Clone the kernel.
Definition: Kernel.h:280
© 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.