Equalizer  2.1.0
Parallel Rendering Framework
equalizer.h
1 
2 /* Copyright (c) 2012-2017, Daniel Nachbaur <danielnachbaur@gmail.com>
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #ifndef EQFABRIC_EQUALIZER_H
19 #define EQFABRIC_EQUALIZER_H
20 
21 #include <eq/fabric/api.h>
22 #include <eq/fabric/vmmlib.h>
23 
24 namespace co
25 {
26 class DataOStream;
27 class DataIStream;
28 }
29 
30 namespace eq
31 {
32 namespace fabric
33 {
34 namespace detail
35 {
36 class Equalizer;
37 }
38 
40 class Equalizer
41 {
42 public:
44  EQFABRIC_API Equalizer();
45 
47  EQFABRIC_API Equalizer(const Equalizer& rhs);
48 
50  EQFABRIC_API Equalizer& operator=(const Equalizer& rhs);
51 
53  EQFABRIC_API virtual ~Equalizer();
54 
55  enum Mode
56  {
57  MODE_DB = 0,
60  MODE_2D
61  };
62 
66  EQFABRIC_API void setFrozen(const bool onOff);
67 
69  EQFABRIC_API bool isFrozen() const;
70 
72  EQFABRIC_API void setMode(const Mode mode);
73 
75  EQFABRIC_API Mode getMode() const;
76 
78  EQFABRIC_API void setDamping(const float damping);
79 
81  EQFABRIC_API float getDamping() const;
82 
84  EQFABRIC_API void setFrameRate(const float frameRate);
85 
87  EQFABRIC_API float getFrameRate() const;
88 
90  EQFABRIC_API void setBoundary(const Vector2i& boundary);
91 
93  EQFABRIC_API void setBoundary(const float boundary);
94 
96  EQFABRIC_API const Vector2i& getBoundary2i() const;
97 
99  EQFABRIC_API float getBoundaryf() const;
100 
102  EQFABRIC_API void setResistance(const Vector2i& resistance);
103 
105  EQFABRIC_API void setResistance(const float resistance);
106 
108  EQFABRIC_API const Vector2i& getResistance2i() const;
109 
111  EQFABRIC_API float getResistancef() const;
112 
114  EQFABRIC_API void setAssembleOnlyLimit(const float limit);
115 
117  EQFABRIC_API float getAssembleOnlyLimit() const;
118 
120  EQFABRIC_API void setTileSize(const Vector2i& size);
121 
123  EQFABRIC_API const Vector2i& getTileSize() const;
125 
126  EQFABRIC_API void serialize(co::DataOStream& os) const;
127  EQFABRIC_API void deserialize(co::DataIStream& is);
128 
129  EQFABRIC_API void backup();
130  EQFABRIC_API void restore();
131 
132 private:
133  detail::Equalizer* _data;
134  detail::Equalizer* _backup;
135 };
136 
137 EQFABRIC_API co::DataOStream& operator<<(co::DataOStream& os, const Equalizer&);
138 
139 EQFABRIC_API co::DataIStream& operator>>(co::DataIStream& is, Equalizer&);
140 
141 EQFABRIC_API std::ostream& operator<<(std::ostream& os, const Equalizer::Mode);
142 }
143 }
144 
145 #endif // EQFABRIC_EQUALIZER_H
Adapt for sort-first using horizontal stripes.
Definition: equalizer.h:58
EQ_API std::ostream & operator<<(std::ostream &os, const EventICommand &command)
Print the event command to the given output stream.
Defines export visibility macros for library EqualizerFabric.
Definition: equalizer.h:24
The Equalizer client library.
Definition: eq/agl/types.h:23
Adapt for sort-first using vertical stripes.
Definition: equalizer.h:59
Base data transport class for equalizers.
Definition: equalizer.h:40