• Main Page
  • Related Pages
  • Classes
  • Files
  • File List

src/client/proxies/VertexBasedProxy.hh

00001 /*
00002  * Copyright Staffan Gimåker 2008-2010.
00003  *
00004  * ---
00005  *
00006  * Distributed under the Boost Software License, Version 1.0.
00007  * (See accompanying file LICENSE_1_0.txt or copy at
00008  * http://www.boost.org/LICENSE_1_0.txt)
00009  */
00010 
00011 #ifndef PEEKABOT_CLIENT_VERTEX_BASED_PROXY_HH_INCLUDED
00012 #define PEEKABOT_CLIENT_VERTEX_BASED_PROXY_HH_INCLUDED
00013 
00014 
00015 #include "ObjectProxy.hh"
00016 #include "../DelayedDispatch.hh"
00017 #include "../../Deprecated.hh"
00018 
00019 #include <boost/scoped_ptr.hpp>
00020 #include <cstddef>
00021 
00022 
00023 namespace peekabot
00024 {
00025     namespace client
00026     {
00033         class PEEKABOT_API VertexSet
00034         {
00035             friend class VertexBasedProxyBase;
00036 
00037         public:
00038             VertexSet();
00039 
00040             VertexSet(const VertexSet &other);
00041 
00042             ~VertexSet();
00043 
00044             VertexSet &operator=(const VertexSet &other);
00045 
00049             void add_vertex(
00050                 float x, float y, float z) PEEKABOT_DEPRECATED;
00051 
00055             void add(float x, float y, float z);
00056 
00057             void clear();
00058 
00059             std::size_t size() const;
00060 
00061             bool empty() const;
00062 
00063         private:
00064             class Impl;
00065             boost::scoped_ptr<Impl> m_impl;
00066         };
00067 
00068 
00078         class PEEKABOT_API ColoredVertexSet
00079         {
00080             friend class VertexBasedProxyBase;
00081 
00082         public:
00083             ColoredVertexSet();
00084 
00085             ColoredVertexSet(const ColoredVertexSet &other);
00086 
00087             ~ColoredVertexSet();
00088 
00089             ColoredVertexSet &operator=(const ColoredVertexSet &other);
00090 
00091             void add(
00092                 float x, float y, float z,
00093                 float r, float g, float b);
00094 
00095             void clear();
00096 
00097             std::size_t size() const;
00098 
00099             bool empty() const;
00100 
00101         private:
00102             class Impl;
00103             boost::scoped_ptr<Impl> m_impl;
00104         };
00105 
00106 
00110         class PEEKABOT_API VertexBasedProxyBase : virtual public ObjectProxyBase
00111         {
00112         public:
00113             typedef peekabot::client::VertexSet VertexSet;
00114 
00115 
00116             VertexBasedProxyBase();
00117 
00118             VertexBasedProxyBase(const VertexBasedProxyBase &p);
00119 
00126             DelayedDispatch set_vertices(const VertexSet &vertices);
00127 
00133             DelayedDispatch add_vertices(const VertexSet &vertices);
00134 
00138             DelayedDispatch set_vertices(const ColoredVertexSet &vertices);
00139 
00143             DelayedDispatch add_vertices(const ColoredVertexSet &vertices);
00144 
00154             DelayedDispatch add_vertex(
00155                 float x, float y, float z) PEEKABOT_DEPRECATED;
00156 
00160             DelayedDispatch clear_vertices();
00161 
00177             DelayedDispatch set_max_vertices(boost::uint32_t n);
00178 
00189             DelayedDispatch set_vertex_overflow_policy(
00190                 VertexOverflowPolicy overflow_policy);
00191         };
00192 
00197         class PEEKABOT_API VertexBasedProxy : public VertexBasedProxyBase
00198         {
00199         public:
00200             VertexBasedProxy();
00201 
00202             VertexBasedProxy(const VertexBasedProxyBase &p);
00203 
00204             VertexBasedProxy &operator=(const VertexBasedProxy &p);
00205 
00206             VertexBasedProxy &operator=(const VertexBasedProxyBase &p);
00207 
00211             DelayedDispatch assign(const ObjectProxyBase &p);
00212 
00216             DelayedDispatch assign(
00217                 PeekabotClient &client,
00218                 const std::string &path);
00219 
00224             DelayedDispatch assign(
00225                 const ObjectProxyBase &parent,
00226                 const std::string &rel_path);
00227         };
00228     }
00229 }
00230 
00231 
00232 #endif // PEEKABOT_CLIENT_VERTEX_BASED_PROXY_HH_INCLUDED

Generated on Sun Jan 30 2011 for peekabot by  doxygen 1.7.1