RayZaler 0.1
The free opto-mechanical simulation framework
RayTracingHeuristic.h
1//
2// Copyright (c) 2025 Gonzalo José Carracedo Carballal
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU Lesser General Public License as
6// published by the Free Software Foundation, either version 3 of the
7// License, or (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful, but
10// WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU Lesser General Public License for more details.
13//
14// You should have received a copy of the GNU Lesser General Public
15// License along with this program. If not, see
16// <http://www.gnu.org/licenses/>
17//
18
19#ifndef _RAY_TRACING_HEURISTIC_H
20#define _RAY_TRACING_HEURISTIC_H
21
22#include <list>
23#include <string>
24
25namespace RZ {
26 class OMModel;
27 class RayBeam;
28 class OpticalSurface;
29 class RayTracingHeuristicFactory;
30
32 OMModel *m_model = nullptr;
33 std::list<OpticalSurface *> m_visible;
34 RayTracingHeuristicFactory *m_factory = nullptr;
35
36 protected:
37 OMModel *model() const;
38
39 public:
40 std::list<OpticalSurface *> &visibleList();
41 std::list<OpticalSurface *> const &visibleList() const;
42
44 RayTracingHeuristicFactory *factory() const;
45 virtual void updateVisibility(const RayBeam &) = 0;
46 virtual ~RayTracingHeuristic();
47 };
48
50 public:
51 virtual std::string name() const = 0;
52 virtual RayTracingHeuristic *make(OMModel *model) = 0;
53 };
54}
55
56#endif // _RAY_TRACING_HEURISTIC_H
Definition: OMModel.h:204
Definition: RayTracingHeuristic.h:49
Definition: RayTracingHeuristic.h:31
Definition: RayBeam.h:88