Line data Source code
1 :
2 : /* Copyright (c) 2006-2016, Stefan Eilemann <eile@equalizergraphics.com>
3 : * Daniel Nachbaur <danielnachbaur@gmail.com>
4 : *
5 : * This library is free software; you can redistribute it and/or modify it under
6 : * the terms of the GNU Lesser General Public License version 2.1 as published
7 : * by the Free Software Foundation.
8 : *
9 : * This library is distributed in the hope that it will be useful, but WITHOUT
10 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 : * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 : * details.
13 : *
14 : * You should have received a copy of the GNU Lesser General Public License
15 : * along with this library; if not, write to the Free Software Foundation, Inc.,
16 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 : */
18 :
19 : #ifndef EQSERVER_FRAMEDATA_H
20 : #define EQSERVER_FRAMEDATA_H
21 :
22 : #include <eq/fabric/frame.h> // for Frame::Type
23 : #include <eq/fabric/frameData.h> // member
24 : #include <eq/server/types.h>
25 :
26 : namespace eq
27 : {
28 : namespace server
29 : {
30 : /** A holder for a Frame Data and parameters. */
31 : class FrameData : public fabric::FrameData, public co::Object
32 : {
33 : public:
34 : /** Construct a new FrameData. */
35 : FrameData();
36 0 : virtual ~FrameData(){}
37 :
38 : /** @name Data Access */
39 : //@{
40 : /** Set the number of the frame when this data was last used. */
41 0 : void setFrameNumber( const uint32_t number ) { _frameNumber = number; }
42 0 : uint32_t getFrameNumber() const { return _frameNumber; }
43 :
44 : /** Set the position of the data relative to the window. */
45 0 : void setOffset( const Vector2i& offset ) { _offset = offset; }
46 : /** @return the position of the data relative to the window. */
47 0 : const Vector2i& getOffset() const { return _offset; }
48 :
49 : /** Set the output frame zoom factor. */
50 0 : void setZoom( const Zoom& zoom_ ) { _zoom = zoom_; }
51 0 : const Zoom& getZoom() const { return _zoom; }
52 : //@}
53 :
54 : protected:
55 0 : virtual ChangeType getChangeType() const { return INSTANCE; }
56 : virtual void getInstanceData( co::DataOStream& os );
57 : virtual void applyInstanceData( co::DataIStream& is );
58 :
59 : private:
60 : /** The zoom factor of the output frame after readback. */
61 : Zoom _zoom;
62 :
63 : /** Position wrt destination view. */
64 : Vector2i _offset;
65 :
66 : /** The number of the config frame when this data was last used. */
67 : uint32_t _frameNumber;
68 : };
69 : }
70 : }
71 : #endif // EQSERVER_FRAMEDATA_H
|