Equalizer  1.2.1
viewData.h
00001 
00002 /* Copyright (c) 2011, Stefan Eilemann <eile@eyescale.ch> 
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 EQSEQUEL_VIEWDATA_H
00019 #define EQSEQUEL_VIEWDATA_H
00020 
00021 #include <seq/api.h>
00022 #include <seq/types.h>
00023 #include <co/serializable.h>               // base class
00024 
00025 namespace seq
00026 {
00028     class ViewData : public co::Serializable
00029     {
00030     public:
00032         SEQ_API ViewData();
00033 
00035         SEQ_API virtual ~ViewData();
00036 
00047         SEQ_API virtual bool handleEvent( const eq::ConfigEvent* event );
00048 
00050         SEQ_API void spinModel( const float x, const float y, const float z );
00051 
00053         SEQ_API void moveModel( const float x, const float y, const float z );
00054 
00065         SEQ_API void showStatistics( const bool on );
00066 
00075         virtual SEQ_API bool update();
00077 
00081         const Matrix4f& getModelMatrix() const { return _modelMatrix; }
00082 
00084         bool getStatistics() const { return _statistics; }
00086 
00087     protected:
00088         virtual void serialize( co::DataOStream& os, const uint64_t dirtyBits );
00089         virtual void deserialize( co::DataIStream& is,
00090                                   const uint64_t dirtyBits );
00091 
00092     private:
00094         enum DirtyBits
00095         {
00096             DIRTY_MODELMATRIX = co::Serializable::DIRTY_CUSTOM << 0, // 1
00097             DIRTY_STATISTICS = co::Serializable::DIRTY_CUSTOM << 1 // 2
00098         };
00099 
00100         Matrix4f _modelMatrix;
00101         int32_t _spinX, _spinY;
00102         int32_t _advance;
00103         bool _statistics;
00104     };
00105 }
00106 #endif // EQSEQUEL_VIEWDATA_H
Generated on Fri Jun 8 2012 15:44:33 for Equalizer 1.2.1 by  doxygen 1.8.0