00001 00002 /* Copyright (c) 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_CANVAS_H 00019 #define EQ_CANVAS_H 00020 00021 #include <eq/client/frustum.h> // base class 00022 #include <eq/client/types.h> 00023 #include <eq/client/visitorResult.h> // enum 00024 00025 #include <eq/net/object.h> 00026 #include <string> 00027 00028 namespace eq 00029 { 00030 namespace server 00031 { 00032 class Canvas; 00033 } 00034 class CanvasVisitor; 00035 00046 class Canvas : public Frustum 00047 { 00048 public: 00052 EQ_EXPORT Canvas(); 00053 00055 EQ_EXPORT virtual ~Canvas(); 00056 00062 Config* getConfig() { return _config; } 00064 const Config* getConfig() const { return _config; } 00065 00067 uint32_t getActiveLayoutIndex() const { return _activeLayout; } 00068 00070 EQ_EXPORT const Layout* getActiveLayout() const; 00071 00073 const SegmentVector& getSegments() const { return _segments; } 00074 00076 const LayoutVector& getLayouts() const { return _layouts; } 00078 00084 EQ_EXPORT virtual void useLayout( const uint32_t index ); 00085 00092 EQ_EXPORT VisitorResult accept( CanvasVisitor& visitor ); 00093 00095 EQ_EXPORT virtual void deregister(); 00097 00098 enum DirtyBits 00099 { 00100 DIRTY_LAYOUT = Frustum::DIRTY_CUSTOM << 0, 00101 DIRTY_CHILDREN = Frustum::DIRTY_CUSTOM << 1, 00102 DIRTY_FILL1 = Frustum::DIRTY_CUSTOM << 2, 00103 DIRTY_FILL2 = Frustum::DIRTY_CUSTOM << 3, 00104 DIRTY_CUSTOM = Frustum::DIRTY_CUSTOM << 4 00105 }; 00106 00107 protected: 00109 EQ_EXPORT void serialize( net::DataOStream& os, 00110 const uint64_t dirtyBits ); 00111 00113 EQ_EXPORT virtual void deserialize( net::DataIStream& is, 00114 const uint64_t dirtyBits ); 00115 private: 00117 Config* _config; 00118 friend class Config; 00119 00121 uint32_t _activeLayout; 00122 00124 LayoutVector _layouts; 00125 00127 SegmentVector _segments; 00128 00129 union // placeholder for binary-compatible changes 00130 { 00131 char dummy[64]; 00132 }; 00133 }; 00134 } 00135 #endif // EQ_CANVAS_H
0.9 by
1.5.8