Blue Brain BioExplorer
VolumeParameters.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(VolumeParameters)
28 
29 namespace core
30 {
32 {
33 public:
35 
37  void print() final;
38 
40  const Vector3ui& getDimensions() const { return _dimensions; }
41  void setDimensions(const Vector3ui& dim) { _updateValue(_dimensions, dim); }
42 
44  const Vector3d& getElementSpacing() const { return _elementSpacing; }
45  void setElementSpacing(const Vector3d& spacing) { _updateValue(_elementSpacing, spacing); }
46 
48  const Vector3d& getOffset() const { return _offset; }
49 
50  void setGradientShading(const bool enabled) { _updateValue(_gradientShading, enabled); }
51  bool getGradientShading() const { return _gradientShading; }
52 
53  void setGradientOffset(const double value) { _updateValue(_gradientOffset, value); }
54  double getGradientOffset() const { return _gradientOffset; }
55 
56  void setSingleShade(const bool enabled) { _updateValue(_singleShade, enabled); }
57  bool getSingleShade() const { return _singleShade; }
58 
59  void setPreIntegration(const bool enabled) { _updateValue(_preIntegration, enabled); }
60  bool getPreIntegration() const { return _preIntegration; }
61 
62  void setAdaptiveSampling(const bool enabled) { _updateValue(_adaptiveSampling, enabled); }
63  bool getAdaptiveSampling() const { return _adaptiveSampling; }
64 
67 
68  void setSamplingRate(const double value) { _updateValue(_samplingRate, value); }
69  double getSamplingRate() const { return _samplingRate; }
70 
71  void setSpecular(const Vector3d& value) { _updateValue(_specular, value); }
72  const Vector3d& getSpecular() const { return _specular; }
73 
74  void setUserParameters(const Vector3d& value) { _updateValue(_userParameters, value); }
75  const Vector3d& getUserParameters() const { return _userParameters; }
76 
77  void setClipBox(const Boxd& value) { _updateValue(_clipBox, value); }
78  const Boxd& getClipBox() const { return _clipBox; }
79 
80 protected:
81  void parse(const po::variables_map& vm) final;
82 
86 
87  bool _gradientShading{false};
88  double _gradientOffset{0.001};
89  bool _singleShade{true};
90  bool _preIntegration{false};
92  bool _adaptiveSampling{true};
93  double _samplingRate{0.125};
94  Vector3d _specular{0.3, 0.3, 0.3};
97 
99 };
100 } // 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 setElementSpacing(const Vector3d &spacing)
double getGradientOffset() const
void setAdaptiveSampling(const bool enabled)
const Vector3d & getOffset() const
const Boxd & getClipBox() const
bool getAdaptiveSampling() const
bool getGradientShading() const
void setSingleShade(const bool enabled)
const Vector3d & getSpecular() const
void parse(const po::variables_map &vm) final
const Vector3d & getElementSpacing() const
void setSpecular(const Vector3d &value)
void setUserParameters(const Vector3d &value)
void setDimensions(const Vector3ui &dim)
const Vector3ui & getDimensions() const
void setAdaptiveMaxSamplingRate(const double value)
double getSamplingRate() const
double getAdaptiveMaxSamplingRate() const
void setGradientShading(const bool enabled)
void setGradientOffset(const double value)
void setClipBox(const Boxd &value)
const Vector3d & getUserParameters() const
void setSamplingRate(const double value)
bool getPreIntegration() const
void setPreIntegration(const bool enabled)
glm::vec< 3, uint32_t > Vector3ui
Definition: MathTypes.h:134
glm::vec< 3, double > Vector3d
Definition: MathTypes.h:143