server/frameData.h

00001 
00002 /* Copyright (c) 2006-2009, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQSERVER_FRAMEDATA_H
00019 #define EQSERVER_FRAMEDATA_H
00020 
00021 #include <eq/client/frameData.h>
00022 #include <eq/client/frame.h>      // for FrameType
00023 
00024 namespace eq
00025 {
00026 namespace server
00027 {
00031     class FrameData : public net::Object
00032     {
00033     public:
00037         FrameData();
00038 
00044         void setFrameNumber( const uint32_t number ) { _frameNumber = number; }
00045         uint32_t getFrameNumber() const { return _frameNumber; }
00046 
00048         void setPixelViewport( const eq::PixelViewport& pvp ) 
00049             { _data.pvp = pvp; }
00050 
00052         void setOffset( const Vector2i& offset ) 
00053             { _data.offset = offset; }
00055         const Vector2i& getOffset() const { return _data.offset; }
00056 
00058         void setBuffers( const uint32_t buffers ) 
00059             { _data.buffers = buffers; }
00060         uint32_t getBuffers() const { return _data.buffers; }
00061 
00063         void setRange( const eq::Range& range )
00064             { _data.range = range; }
00065 
00067         void setPixel( const eq::Pixel& pixel )
00068             { _data.pixel = pixel; }
00069         
00071         void setZoom( const eq::Zoom& zoom ) { _zoom = zoom; }
00072         const eq::Zoom& getZoom() const      { return _zoom; }
00073 
00075         eq::Frame::Type getType()const{ return _data.frameType; }
00076 
00082         void setType( const eq::Frame::Type type ){ _data.frameType = type; }
00083 
00085 
00086     protected:
00087         virtual ~FrameData(){}
00088         virtual ChangeType getChangeType() const { return INSTANCE; }
00089         virtual void getInstanceData( net::DataOStream& os );
00090         virtual void applyInstanceData( net::DataIStream& is );
00091 
00092     private:
00093         friend class Frame;
00094         eq::FrameData::Data _data;
00095         
00097         eq::Zoom _zoom;
00098 
00100         uint32_t _frameNumber;
00101     };
00102 }
00103 }
00104 #endif // EQSERVER_FRAMEDATA_H
Generated on Mon Aug 10 18:58:33 2009 for Equalizer 0.9 by  doxygen 1.5.8