Equalizer  1.12.0
Parallel Rendering Framework
view.h
1 
2 /* Copyright (c) 2008-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 EQ_VIEW_H
20 #define EQ_VIEW_H
21 
22 #include <eq/api.h>
23 #include <eq/types.h> // member
24 #include <eq/visitorResult.h> // enum
25 
26 #include <eq/fabric/view.h> // base class
27 #include <eq/fabric/viewport.h> // member
28 
29 namespace eq
30 {
31 namespace detail { class View; }
32 
42 class View : public fabric::View< Layout, View, Observer >
43 {
44 public:
46  EQ_API explicit View( Layout* parent );
47 
49  EQ_API virtual ~View();
50 
57  Pipe* getPipe() { return _pipe; }
58 
63  EQ_API const Pipe* getPipe() const { return _pipe; }
64 
66  EQ_API Config* getConfig();
67 
69  EQ_API const Config* getConfig() const;
70 
72  EQ_API ServerPtr getServer();
74 
88  EQ_API virtual bool handleEvent( const Event& event );
90 
91 protected:
101  virtual bool configInit() { return true; }
102  friend class detail::InitVisitor;
103 
105  virtual bool configExit() { return true; }
106  friend class detail::ExitVisitor;
108 
110  EQ_API virtual void deserialize( co::DataIStream& is,
111  const uint64_t dirtyBits );
112 
114  EQ_API const Frustum& getBaseFrustum() const;
115 
117  EQ_API virtual void detach();
118 
119 private:
120  detail::View* const _impl;
121 
122  Pipe* _pipe; // for render-client views
123  friend class Pipe;
124 };
125 }
126 
127 #endif //EQ_VIEW_H
EQFABRIC_API Frustum()
Construct a new frustum.
virtual EQ_API bool handleEvent(const Event &event)
Handle a received (view) event.
A configuration is a visualization session driven by an application.
Definition: config.h:55
EQ_API View(Layout *parent)
Construct a new view.
A Pipe represents a graphics card (GPU) on a Node.
Definition: pipe.h:50
virtual EQ_API ~View()
Destruct this view.
lunchbox::RefPtr< Server > ServerPtr
A reference-counted pointer to an eq::Server.
Definition: eq/types.h:213
virtual bool configExit()
Exit this view.
Definition: view.h:105
Base data transport class for views.
EQ_API Config * getConfig()
virtual bool configInit()
Initialize this view.
Definition: view.h:101
The Equalizer client library.
Definition: eq/agl/types.h:23
A layout groups one or more View, logically belonging together.
Definition: layout.h:46
A View is a 2D area of a Layout.
Definition: view.h:42
EQ_API const Frustum & getBaseFrustum() const
EQ_API const Pipe * getPipe() const
Definition: view.h:63
Pipe * getPipe()
Definition: view.h:57
EQ_API ServerPtr getServer()