Equalizer  1.6.1
eqPly.h
1 
2 /* Copyright (c) 2006-2011, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * - Redistributions of source code must retain the above copyright notice, this
8  * list of conditions and the following disclaimer.
9  * - Redistributions in binary form must reproduce the above copyright notice,
10  * this list of conditions and the following disclaimer in the documentation
11  * and/or other materials provided with the distribution.
12  * - Neither the name of Eyescale Software GmbH nor the names of its
13  * contributors may be used to endorse or promote products derived from this
14  * software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26  * POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef EQ_PLY_H
30 #define EQ_PLY_H
31 
32 #include <eq/eq.h>
33 
34 #include "vertexBufferDist.h"
35 #include "vertexBufferRoot.h"
36 
37 #ifndef M_PI_2
38 # define M_PI_2 1.57079632679489661923
39 #endif
40 
42 namespace eqPly
43 {
44  class LocalInitData;
45 
46  typedef mesh::VertexBufferRoot Model;
47  typedef VertexBufferDist ModelDist;
48 
49  typedef std::vector< Model* > Models;
50  typedef std::vector< ModelDist* > ModelDists;
51 
52  typedef Models::const_iterator ModelsCIter;
53  typedef ModelDists::const_iterator ModelDistsCIter;
54 
56  class EqPly : public eq::Client
57  {
58  public:
59  EqPly( const LocalInitData& initData );
60  virtual ~EqPly() {}
61 
63  int run();
64 
66  static const std::string& getHelp();
67 
68  protected:
70  virtual void clientLoop();
71 
72  private:
73  const LocalInitData& _initData;
74  };
75 
76  enum ColorMode
77  {
81  COLOR_ALL
82  };
83 
84  enum LogTopics
85  {
86  LOG_STATS = eq::LOG_CUSTOM << 0, // 65536
87  LOG_CULL = eq::LOG_CUSTOM << 1 // 131072
88  };
89 }
90 
91 namespace lunchbox
92 {
93 template<> inline void byteswap( eqPly::ColorMode& value )
94  { byteswap( reinterpret_cast< uint32_t& >( value )); }
95 }
96 #endif // EQ_PLY_H
97 
User-defined log topics (65536)
Definition: client/log.h:35
virtual void clientLoop()
Definition: eqPly.cpp:182
Render using the colors defined in the ply file.
Definition: eqPly.h:78
Render in solid white (mostly for anaglyph stereo)
Definition: eqPly.h:80
The client represents a network node of the application in the cluster.
Definition: client/client.h:38
int run()
Run an eqPly instance.
Definition: eqPly.cpp:83
Manages the argument parsing and non-distributed part of the initialization data. ...
ColorMode
Definition: eqPly.h:76
The EqPly application instance.
Definition: eqPly.h:56
static const std::string & getHelp()
Definition: eqPly.cpp:74
Use a unique color to demonstrate decomposition.
Definition: eqPly.h:79