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

src/client/proxies/TriMeshProxy.hh

00001 /*
00002  * Copyright Staffan Gimåker 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_TRI_MESH_PROXY_HH_INCLUDED
00012 #define PEEKABOT_CLIENT_TRI_MESH_PROXY_HH_INCLUDED
00013 
00014 
00015 #include "ScalableProxy.hh"
00016 #include "VertexBasedProxy.hh"
00017 
00018 #include <boost/scoped_ptr.hpp>
00019 #include <boost/cstdint.hpp>
00020 #include <cstddef>
00021 #include <vector>
00022 
00023 
00024 namespace peekabot
00025 {
00026     namespace client
00027     {
00036         class PEEKABOT_API IndexSet
00037         {
00038             friend class TriMeshProxyBase;
00039 
00040         public:
00041             IndexSet();
00042 
00043             IndexSet(const IndexSet &other);
00044 
00045             ~IndexSet();
00046 
00047             IndexSet &operator=(const IndexSet &other);
00048 
00052             void add_triangle(
00053                 boost::uint32_t v1,
00054                 boost::uint32_t v2,
00055                 boost::uint32_t v3);
00056 
00060             void add_quad(
00061                 boost::uint32_t v1,
00062                 boost::uint32_t v2,
00063                 boost::uint32_t v3,
00064                 boost::uint32_t v4);
00065 
00071             void add_convex_polygon(
00072                 const std::vector<boost::uint32_t> &inds);
00073 
00074             void clear();
00075 
00076             bool empty() const;
00077 
00078         private:
00079             class Impl;
00080             boost::scoped_ptr<Impl> m_impl;
00081         };
00082 
00083 
00087         class PEEKABOT_API TriMeshProxyBase : public ScalableProxyBase,
00088                                               public VertexBasedProxyBase
00089         {
00090         public:
00091             TriMeshProxyBase();
00092 
00093             TriMeshProxyBase(TriMeshProxyBase &p);
00094 
00095             DelayedDispatch set_indices(const IndexSet &indices);
00096 
00097             DelayedDispatch add_indices(const IndexSet &indices);
00098         };
00099 
00100 
00105         class PEEKABOT_API TriMeshProxy : public TriMeshProxyBase
00106         {
00107         public:
00108             TriMeshProxy();
00109 
00110             TriMeshProxy(TriMeshProxyBase &p);
00111 
00112             TriMeshProxy &operator=(const TriMeshProxy &p);
00113 
00114             TriMeshProxy &operator=(const TriMeshProxyBase &p);
00115 
00119             DelayedDispatch assign(const ObjectProxyBase &p);
00120 
00124             DelayedDispatch assign(
00125                 PeekabotClient &client,
00126                 const std::string &path);
00127 
00132             DelayedDispatch assign(
00133                 const ObjectProxyBase &parent,
00134                 const std::string &rel_path);
00135 
00147             DelayedDispatch add(
00148                 PeekabotClient &client,
00149                 const std::string &path,
00150                 NameConflictPolicy conflict_policy = AUTO_ENUMERATE_ON_CONFLICT);
00151 
00164             DelayedDispatch add(
00165                 const ObjectProxyBase &parent,
00166                 const std::string &name,
00167                 NameConflictPolicy conflict_policy = AUTO_ENUMERATE_ON_CONFLICT);
00168         };
00169     }
00170 }
00171 
00172 
00173 #endif // PEEKABOT_CLIENT_TRI_MESH_PROXY_HH_INCLUDED

Generated on Sun Jan 30 2011 for peekabot by  doxygen 1.7.1