Blue Brain BioExplorer
FieldParameters.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2024, EPFL/Blue Brain Project
3  *
4  * The Blue Brain BioExplorer is a tool for scientists to extract and analyse
5  * scientific data from visualization
6  *
7  * This file is part of Blue Brain BioExplorer <https://github.com/BlueBrain/BioExplorer>
8  *
9  * This library is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU Lesser General Public License version 3.0 as published
11  * by the Free Software Foundation.
12  *
13  * This library is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #pragma once
24 
25 #include "AbstractParameters.h"
26 
27 SERIALIZATION_ACCESS(FieldParameters)
28 
29 namespace core
30 {
31 class FieldParameters final : public AbstractParameters
32 {
33 public:
35 
37  void print() final;
38 
39  void setGradientShading(const bool enabled) { _updateValue(_gradientShading, enabled); }
40  bool getGradientShading() const { return _gradientShading; }
41 
42  void setGradientOffset(const double value) { _updateValue(_gradientOffset, value); }
43  double getGradientOffset() const { return _gradientOffset; }
44 
45  void setSamplingRate(const double value) { _updateValue(_samplingRate, value); }
46  double getSamplingRate() const { return _samplingRate; }
47 
48  void setDistance(const double value) { _updateValue(_distance, value); }
49  double getDistance() const { return _distance; }
50 
51  void setCutoff(const double value) { _updateValue(_cutoff, value); }
52  double getCutoff() const { return _cutoff; }
53 
54  void setEpsilon(const double value) { _updateValue(_epsilon, value); }
55  double getEpsilon() const { return _epsilon; }
56 
57  void setAccumulationSteps(const uint64_t value) { _updateValue(_randomAccumulation, value); }
58  uint64_t getAccumulationSteps() const { return _randomAccumulation; }
59 
60  void setUseOctree(const bool value) { _updateValue(_useOctree, value); }
61  bool getUseOctree() const { return _useOctree; }
62 
63 protected:
64  void parse(const po::variables_map& vm) final;
65 
69 
70  bool _gradientShading{false};
71  double _gradientOffset{0.001};
72  double _samplingRate{0.125};
73  double _distance{1.f};
74  double _cutoff{1500.f};
75  double _epsilon{1e-6};
76  uint64_t _randomAccumulation{0};
77  bool _useOctree{true};
78 
80 };
81 } // namespace core
#define SERIALIZATION_FRIEND(type)
Definition: Macros.h:32
#define SERIALIZATION_ACCESS(type)
Definition: Macros.h:25
void _updateValue(T &member, const T &newValue, const bool triggerCallback=true)
Definition: BaseObject.h:87
void setCutoff(const double value)
void setUseOctree(const bool value)
void setEpsilon(const double value)
uint64_t getAccumulationSteps() const
void setSamplingRate(const double value)
void setGradientShading(const bool enabled)
double getEpsilon() const
double getDistance() const
bool getGradientShading() const
double getGradientOffset() const
void parse(const po::variables_map &vm) final
double getSamplingRate() const
void setGradientOffset(const double value)
void setDistance(const double value)
bool getUseOctree() const
double getCutoff() const
void setAccumulationSteps(const uint64_t value)
glm::vec< 3, uint32_t > Vector3ui
Definition: MathTypes.h:134
glm::vec< 3, double > Vector3d
Definition: MathTypes.h:143