examples/eqPly/channel.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 EQ_PLY_CHANNEL_H
00019 #define EQ_PLY_CHANNEL_H
00020 
00021 #include "eqPly.h"
00022 
00023 //#include "frameData.h"
00024 #include "typedefs.h"
00025 
00026 #include <eq/eq.h>
00027 
00028 
00029 namespace eqPly
00030 {
00031     class FrameData;
00032     class InitData;
00033 
00037     class Channel : public eq::Channel
00038     {
00039     public:
00040         Channel( eq::Window* parent ) : eq::Channel( parent ) {}
00041 
00042     protected:
00043         virtual ~Channel() {}
00044 
00045         virtual bool configInit( const uint32_t initID );
00046         virtual void frameClear( const uint32_t frameID );
00047         virtual void frameDraw( const uint32_t frameID );
00048         virtual void frameReadback( const uint32_t frameID );
00049         virtual void frameViewFinish( const uint32_t frameID );
00050 
00052         virtual void applyFrustum() const;
00053 
00054     private:
00055         void _drawModel( const Model* model );
00056         void _drawOverlay();
00057         void _drawHelp();
00058         void _updateNearFar( const mesh::BoundingSphere& boundingSphere );
00059         void _initFrustum( eq::FrustumCullerf& frustum, 
00060                            const mesh::BoundingSphere& boundingSphere );
00061 
00062         const FrameData& _getFrameData() const;
00063         const Model*     _getModel();
00064     };
00065 }
00066 
00067 
00068 
00069 #endif // EQ_PLY_CHANNEL_H
00070 
Generated on Mon Aug 10 18:58:31 2009 for Equalizer 0.9 by  doxygen 1.5.8